Re: Extending AppleScript "open" in Cocoa apps
Re: Extending AppleScript "open" in Cocoa apps
- Subject: Re: Extending AppleScript "open" in Cocoa apps
- From: Dustin Voss <email@hidden>
- Date: Tue, 3 Feb 2004 16:31:13 -0800
On 2 Feb, 2004, at 9:07 PM, Don Briggs wrote:
Hello again, Dustin
On Feb 2, 2004, at 8:46 PM, Dustin Voss wrote:
Is it possible to add parameters to AppleScript's "open" command, so
that my users can script something like this:
open "irc.freenode.net" with nick "|Agent"
Would I have to override NSOpenCommand? Come to think of it, where is
NSOpenCommand?
I don't find an NSOpenCommand in the Cocoa API, either.
I would suggest the Create command instead.
Implement it in the container class.
What would I have to do in my .sdef file?
You might want to start with the more common plist pair,
{*.scriptSuite, *.scriptTerminology.}
So my users would script something like this:
make new server connection with properties { name: "irc.freenode.net",
nick: "|Agent" }
The NSCreateCommand documentation says that it creates an instance of
my server connection class and inserts it into the container. But the
docs do not say what method it calls to create the instance with the
given properties. Does it call some method named (wild-ass guess)
initWithProperties: or what?
That aside, I would prefer to allow them to script something like this:
make new server connection to "irc.freenode.net" with nick "|Agent"
Can this be done? Do I have to override NSCreateCommand to support it?
What would I do in my .sdef or .scriptSuite/.scriptTerminology files?
Again, I can't find much documentation on extending the core suite. I'm
sorry if this is covered somewhere; perhaps you could provide a link?
I'm grateful for your help in any case.
_______________________________________________
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.