List double click function
the following script not working, i know i have added palette instead of dialog. Kindly help to me
var w = new Window ("palette");
var list = w.add ("listbox", undefined, ["one", "two", "three"]);
list.selection = 0;
list.onDoubleClick = function () {
app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
app.findTextPreferences =app.changeTextPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = this.selection.text;
var res = app.activeDocument.findGrep();
alert(res.length)
//~ $.writeln (this.selection.text + " double-clicked.")
}
w.show ();