Re: How to support 'every' object in script interface
Re: How to support 'every' object in script interface
- Subject: Re: How to support 'every' object in script interface
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 26 Jun 2005 19:50:15 -0400
on 2005-06-26 5:53 PM, Steve Palmer at email@hidden wrote:
> However a key first step before I can deal with the distinction is to
> know where to handle the 'every' command. As I stated earlier,
> there's no documentation that I could find that explains which method
> has to be added where to handle it. From the stack trace below, Cocoa
> is clearly expecting to find a specific method and is not finding it.
> Are you able to advise me in that direction?
The information I've been giving you is about handling list and 'every'
direct parameters to your own custom commands. In that case, it's easy. You
put your command handler wherever you want it, and you put the name of your
handler method in your sdef file's definition for that command.
Here, however, you're dealing with the 'get' command, which is built in. I'm
not quite sure how you should handle it if it isn't working for you, since
you really aren't supposed to have to handle it yourself. That's what I
meant when I said it should "just work."
In my app, get list and get every... work just fine, and I don't handle the
get command at all in my code or in my sdef file.
For what it's worth, you'll find the 'get' and 'set' commands defined, along
with a bunch of other interesting things (such as record-type), in the
Intrinsics.sdef file, located at
/System/Library/Frameworks/Foundation.framework/Resources/Intrinsics.sdef.
The Cocoa method for the 'get' command is NSGetCommand, with a
direct-parameter type of specifier and a result of type any. The
documentation for NSGetCommand says "Most applications don't need to
subclass NSGetCommand or call its methods" since it all just works.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden