• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Adding scripting support to Cocoa applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Newbie document based application and menus question
  • Next by Date: Adding scripting support to Cocoa applications
  • Previous by thread: Newbie document based application and menus question
  • Next by thread: Adding scripting support to Cocoa applications
  • Index(es):
    • Date
    • Thread