Re: Looking for clarification on Applescript event handlers
Re: Looking for clarification on Applescript event handlers
- Subject: Re: Looking for clarification on Applescript event handlers
- From: matt neuburg <email@hidden>
- Date: Mon, 11 Aug 2003 12:04:33 -0700
On Sun, 10 Aug 2003 16:43:44 -0400 (EDT), Chris Backas <email@hidden> said:
>
Hello all; sorry for the cross post, but I wasn't sure if
>
my knowledge gap fell more on the Cocoa or the Applescript
>
side.
>
>
The NSAppleScript class has an executeAppleEvent method,
>
which takes an AppleEventDescriptor as an argument. I've
>
seen on the Applescript side that one makes an event
>
handler something like:
>
>
on <some event>(<some argument>) <do stuff> end <some
>
event>
>
>
My confusion is, does that single AppleEventDescriptor I
>
pass encompass both <some event> and <some argument> ? If
>
I want to pass a list to a handler in an applescript, do I
>
need to declare my own kind of handler someplace with its
>
own ID, or are there preexisting ones that I'm meant to
>
utilize?
>
From the last sentence, it appears that your real question is how to call a handler in an existing script. You have, broadly speaking, two choices: load the existing script and call the handler (entirely in AppleScript), or construct an ascr/psbr Apple event. See the archives for more... m.
--------
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
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.