COScript.currentCOScript().setShouldKeepAround(true)
var dropdown = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(16, 82, 288, 25)];
[dropdown addItemWithTitle:@" "];
[dropdown addItemWithTitle:@"aa"];
[dropdown addItemWithTitle:@"bb"];
[dropdown setBordered:true];
[dropdown setAutoenablesItems:false];
[dropdown setFont:[NSFont systemFontOfSize:11]];
dropdown.setCOSJSTargetFunction(function(sender) {
log(sender.indexOfSelectedItem)
});
all function inside setCOSJSTargetFunction not working
log(sender.indexOfSelectedItem) not printed
how to fix it? thanks