Re: Applescript error - NSCannotCreateScriptCommandError
Re: Applescript error - NSCannotCreateScriptCommandError
- Subject: Re: Applescript error - NSCannotCreateScriptCommandError
- From: Steve Palmer <email@hidden>
- Date: Sat, 10 Jul 2004 23:27:59 +0100
Hmm... I added support for -objectSpecifier to the class and put a
breakpoint on it, but when I do:
set foo to name of current task
where 'current task' returns a Task object and 'name' is one of the
functions on the object (setName is another), the breakpoints aren't
hit on either the call to retrieve 'current task' or 'name'. I still
get "NSCannotCreateScriptCommandError" in the script editor. If I do
set foo to current task
then the breakpoint to retrieve 'current task' in the NSApplication
derived class is hit and THEN it hits the -objectSpecifier function.
I'm probably missing something fundamental. Is my AppleScript syntax
correct here? I should add that I did search the archives but none of
the original discussions enlightened me.
- Steve
On Jul 8, 2004, at 2:34pm, Nick Zitzmann wrote:
On Jul 8, 2004, at 7:21 AM, Steve Palmer wrote:
No. Is that important? None of the samples or tutorials that I've
seen mention it.
Yes. If you make an object accessible through AppleScript, then it
must implement -objectSpecifier or else you won't be able to use the
object as a script variable. For example, running "set theWidget to
make new widget at front of widgets" followed by "open theWidget" will
end with an error on that last line if -objectSpecifier is not
implemented.
I'm not sure where this is documented, but I think you'll find more
information about -objectSpecifier by checking the archives.
Nick Zitzmann
<http://www.chronosnet.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.
- Steve
_______________________________________________
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.