• 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: Dealing with faults in CoreData / AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dealing with faults in CoreData / AppleScript


  • Subject: Re: Dealing with faults in CoreData / AppleScript
  • From: Jim Correia <email@hidden>
  • Date: Fri, 20 Nov 2009 10:00:38 -0500

On Nov 19, 2009, at 10:19 PM, Greg Hoover wrote:

> I've been working through adding scriptability to my CoreData application but ran into a snag: accessing relationships may return a fault instead of the actual set of objects.  Is there an "accepted" way of solving this issue?  I don't want the accessor to "always" fault the objects in, just when they're being accessed from AppleScript.  Is creating another accessor the proper way to get around this?

Can you be more specific about the problem you are having and what specifically you are trying to do?

In particular, I’m not sure what you mean by:

	I don't want the accessor to "always" fault the objects in, ust when they’re being accessed from AppleScript.

Unless you prefetch relationships, they will be a fault. (If you need to know, you can test this with -hasFaultForRelationshipNamed:. If you need to access the related objects though, you need to fire the fault.

- Jim


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

References: 
 >Dealing with faults in CoreData / AppleScript (From: Greg Hoover <email@hidden>)

  • Prev by Date: Re: NSRunloop + shared thread
  • Next by Date: Re: Stretching NSImage PNGs smoothly
  • Previous by thread: Dealing with faults in CoreData / AppleScript
  • Next by thread: resizing PDF obtained from dataWithPDFInsideRect:
  • Index(es):
    • Date
    • Thread