An observation about executing AppleScripts from within Cocoa
An observation about executing AppleScripts from within Cocoa
- Subject: An observation about executing AppleScripts from within Cocoa
- From: Glenn Howes <email@hidden>
- Date: Fri, 13 Sep 2002 10:57:31 -0700
Hi,
I've been trying every which way to execute AppleScripts from within
my first Cocoa application and however I tried: using NSAppleScript, or
making Carbon calls, I always ran up against the problem of the scripts
not recognizing handlers and objects specific to my application. Well,
I think I found a solution, I now call
[NSScriptSuiteRegistry sharedScriptSuiteRegistry];
before dealing with my scripts and things work. There seems to be a
problem with my script suite getting registered dynamically when called
by a script compiled and executed from within the application's own
context as it is registered when called by external scripts. Mayhap
this is documented somewhere but I didn't see it.
Hoping to save others some frustration.
--glenn
_______________________________________________
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.