Hello,
In Lion and Mountain Lion, I could add something like the following to the main script in a template application and it worked without problems:
performSelector_withObject_afterDelay_("finish", missing value, 20) -- or -- addObserver_selector_name_object_(me, "appQuit:", current application's NSWorkspaceDidTerminateApplicationNotification, missing value)
In Mavericks, the same application results in the selector or function not being found or a "Job appears to have crashed: Segmentation fault: 11" error. The keyword "me" and the reference to the script doesn't seem to work the same in the main.scpt, so the target for the selector isn't right - is this a new behavior, or was it wrong before?
Manually instantiating a class or using the new script library works OK, but if I can't use these kinds of Cocoa methods in the main script, it kind of defeats the purpose of having it, or am I missing something? Is the main.scpt just for regular (more or less) AppleScript?
Dave
|