• 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
Re: Providing AppleScript support for users in a Core Data app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Providing AppleScript support for users in a Core Data app


  • Subject: Re: Providing AppleScript support for users in a Core Data app
  • From: Ken Victor <email@hidden>
  • Date: Fri, 15 Dec 2006 10:40:52 -0800

sorry, but i don't have any easily extractable code i can send you. however, i can tell you the approach i've used.

all my core data entities have a unique, persistant, and non-changing user readable attribute that serves as the applescript ID for the entity. when appropriate, i will return lists of these ids. and of course, i've had to provide the appropriate methods to map these ids back into entities when executing AS commands.

hth,
ken

At 10:15 AM -0800 12/15/06, Richard Wolf wrote:
Hi guys,

I have a simple Core Data application and I would like to add AppleScript support to it. I'm neither hate nor love AppleScript ... I just know that AppleScript support will be expected. So there it is. :)

I have done some homework on this topic, and I gather the main hitch in providing AppleScript support to a Core Data app is that Core Data's collections are all unindexed and AppleScript requires that collection model objects be indexed. Apple's Cocoa scripting documentation is really vague there ... it does little more than describe the problem and a solution in the most cursory of ways. And an afternoon's worth of Googling returned little in the way of
tantalizing leads or references to sample code ... which kind of surprised me. Okay, maybe I'm not that surprised. I did see a post by Bill Cheeseman hinting that he might post some sample code ... but I can't find that code (and I really looked).


Does anyone have some sample code that he/she might be willing to share or other pointers as to how one would go about making an NSManagedObject available to AppleScript? I'll take as much explanation I can get ... but even some sample code with no comments would be greatly appreciated. If not, s'okay ... I'll attempt to figure it out ... but I thought I would ask first.

I bow to you guys!
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSFileManager & Root Permissions
  • Next by Date: Re: Efficient comparing of two directories
  • Previous by thread: Providing AppleScript support for users in a Core Data app
  • Next by thread: Cocoa newbie app architecture / dialog question
  • Index(es):
    • Date
    • Thread