Adding scripting support to Cocoa applications
Adding scripting support to Cocoa applications
- Subject: Adding scripting support to Cocoa applications
- From: "Ujwal S. Sathyam" <email@hidden>
- Date: Sun, 09 Mar 2003 23:42:35 -0800
Hi,
I like to think that I am a fairly bright person capable of grasping new concepts, but this scripting support for Cocoa has me stumped. Apple's documentation on adding Applescript support to Cocoa apps is just too dense for me. I am wondering if there is better documentation available. All I want to do in a script is tell my app to:
1. Instantiate an object of a certain class
2. set some properties
3. call an action method on the object.
I am getting stuck on step 1. I have an class "Foo" that is a direct descendant of NSObject. In my scriptTerminology, the name of the class is "foo" and the plural form is "foos", and the superclass in the scriptSuite is NSCoreSuite.AbstractObject.
When I try to instantiate an object of class foo in Applescript with:
tell application "MyApp"
make new foo at the beginning of foos
end tell
I get an error: NSCannotCreateScriptCommandError
Can some kind soul please help me out or give me pointers to the "Idiot's Guide to Adding Applescript to Cocoa Applications"?
Thanks,
Ujwal
_______________________________________________
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.