custom AppleScript command and NSApp delegate
custom AppleScript command and NSApp delegate
- Subject: custom AppleScript command and NSApp delegate
- From: Christopher Corbell <email@hidden>
- Date: Wed, 5 Nov 2003 17:03:14 -0800
My app currently uses the default NSApplication object
and an application delegate object which is the app's
central controller.
I would like to add some custom AppleScript commands
which will basically map to application-level commands.
The application should be the target for these
commands in the AppleScript suite definition, i.e. I
don't want to expose the application's delegate class,
and the users's script should just say something like
tell application "theApp"
DoSpecialCommand
end tell
Do I have to subclass NSApplication in order to accomplish
this? Is there any way to get an NSScriptCommand object and
handler invocation forwarded to the application's delegate,
without exposing the delegate class in the script suite?
E.g., does the AppleScript machinery invoke some intermediate
call like doCommandBySelector: that a delegate might intercept?
Or have I entirely overlooked another way to do this
with the Foundation AppleScript mechanisms?
Thanks in advance,
Christopher
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.