Explicit run handler usage
Explicit run handler usage
In the following ASOC myTasker becomes connected to an instance of myTask when the nib is loaded.
The app loads and myTask executes.
My questions are:
1. myTask isn't an NSObject subclass - yet it works. Is it safe to assume that this will always be the case?
2. if I change the code to use an explicit run handler (version 2) the run handler does not get called. Why?
=========
VERSION 1
=========
-- file 1.applescript
script cocoa_applescript_testAppDelegate
property parent : class "NSObject"
property myTasker : missing value
on applicationWillFinishLaunching_(aNotification)
tell myTasker to execute()
end applicationWillFinishLaunching_
end script
-- file 2.applescript
script myTask
on execute()
display dialog "here"
end execute
end script
=========
VERSION 2
=========
-- file 1.applescript
script cocoa_applescript_testAppDelegate
property parent : class "NSObject"
property myTasker : missing value
on applicationWillFinishLaunching_(aNotification)
tell myTasker to run
end applicationWillFinishLaunching_
end script
-- file 2.applescript
script myTask
on run
display dialog "here"
end run
end script
Regards
Jonathan Mitchell
Developer
http://www.mugginsoft.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden