Re: best practice with helper AppleScript - another solution
Re: best practice with helper AppleScript - another solution
- Subject: Re: best practice with helper AppleScript - another solution
- From: Kenneth Ferry <email@hidden>
- Date: Mon, 30 Jun 2003 20:43:33 -0400
Hello,
I think I have a pretty clean way of accomplishing this - I wrote a small utility class (KFAppleScript) that executes AppleScript handlers with arguments. It isn't just compiling a little script, it's messing with the AppleEvents. The prototype for the most useful method is
- (id)executeHandler:(NSString *)handlerName
error:(NSDictionary **)errorInfo
withParameters:(id)firstArg, ...;
.
Like the 'call method' command from AppleScript, the class translates simple arguments (collections, strings, integers*, booleans*) to their AppleScript forms and translates the return value to an appropriate Objective-C class if it can find one. You can download it here:
http://homepage.mac.com/kenferry/software.html
I'd appreciate if anyone who has comments/suggestions/errors using it would let me know.
-Ken
*well, NSNumbers whose data is an integer or a boolean
On Tuesday, June 24, 2003, at 09:19PM, Christopher Corbell <email@hidden> wrote:
>
What's the best practice for integrating an AppleScript
>
with an Obj-C Cocoa app?
_______________________________________________
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.