• 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
Cocoa/Applescript question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa/Applescript question


  • Subject: Cocoa/Applescript question
  • From: Dave Sopchak <email@hidden>
  • Date: Sun, 4 May 2003 11:06:14 -0700

Greetings, list!

I have a couple of questions, I'm starting out with AS...been doing Cocoa for a year or so now...

I have a Cocoa app (a telescope controller) that I'd like to link into an existing astronomy app (Starry Night) via Apple Events sent through a Carbon plug in that I would write for Starry Night. The previous incarnation of my scope controller was a plug in for Starry Night, so I'm thinking the plug in part won't be a big deal.

Setting up the question: I've been reading up on AS and Cocoa stuff, especially on the O'Reilly page about accessing Cocoa objects with AS, and they have a good example of sending AS commands to a subclass of NSDocument. It seems that the Core Suite has support for a few Cocoa objects, none of which my Scope object or ScopeController object are subclasses of (NSObject and NSWindowController, respectively). In the XML property list, there is "Abstract Object" included in the list of supported objects.

My question is: would it be easier to change my Scope object to a subclass of say, NSWindow or NSDocument in order to get the "for free" scripting support, or would it be better (even possible) to roll my own scripting support from scratch? Also, I guess I'd be accessing my Scope object directly with AS, and thus would also have to post a notification to my ScopeController object that something else changed the instance vars in the Scope so the ScopeController can keep track.

Any and all pointers would be most appreciated.

Dave
_______________________________________________
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: Re: Quit on close Window?
  • Next by Date: Re: Which NSTabViewItem am I in?
  • Previous by thread: Re: NSWorkspaceDidMountNotification usage
  • Next by thread: Re: Which NSTabViewItem am I in?
  • Index(es):
    • Date
    • Thread