Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript error - NSCannotCreateScriptCommandError



Thanks Nick. No, I hadn't seen Don's application but overall I think my
problem is more about the Cocoa side than the
scriptSuite/scriptTerminology side. It isn't clear to me precisely what
implementation is needed for some of the more sophisticated constructs
in AppleScript.

For example, I want to allow:

set everyTask to every task

So what does the TestApp object expose? I tried adding a tasks function
that returned an NSArray but I just got an NSInternalScriptError. Can
anybody point me at some documents or code that demonstrate how to
support this in Cocoa?

I did look at the sample code but they seemed focused on simple things.
I ready have support for being able to set and retrieve preference
values and that works fine. Apple's own documentation is rather
unclear. I guess what I'm really looking for is a document that
explains how to map AppleScript constructs to actual code.

I appreciate that adding AppleScript support to an existing application
can be frustrating if you want more than the very basics but with Tiger
coming, it seems that Apple want us to put more emphasis on writing
scriptable applications in which case can I put forward a plea to Apple
to provide more sample code at
http://developer.apple.com/samplecode/AppleScript/index.html?

- Steve


On Jul 17, 2004, at 1:00pm, Nick Zitzmann wrote:

> On Jul 17, 2004, at 10:00 AM, Steve Palmer wrote:
>
>> I'm subclassing NSApplication and implementing the script accessors
>> in there. I hadn't thought of categorizing NSApplication but why
>> would that make a difference here?
>
> It just seems to me that would be a lot easier, unless you have a need
> to store some variables in the NSApplication subclass. I don't know if
> that will solve the problem, but it is what I've done in one
> application that uses AppleScript, and it worked for me...
>
> Pardon me if you have already seen this, but you might find some of
> Don Briggs' applications and sample code helpful in setting up
> AppleScript support: <http://homepage.mac.com/donbriggs/>
>
> 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.


References: 
 >Applescript error - NSCannotCreateScriptCommandError (From: Steve Palmer <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Nick Zitzmann <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Steve Palmer <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Nick Zitzmann <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Steve Palmer <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Nick Zitzmann <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Steve Palmer <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Nick Zitzmann <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Steve Palmer <email@hidden>)
 >Re: Applescript error - NSCannotCreateScriptCommandError (From: Nick Zitzmann <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.