• 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
Transient Property and lazy-loading issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Transient Property and lazy-loading issue


  • Subject: Transient Property and lazy-loading issue
  • From: Kevin <email@hidden>
  • Date: Tue, 10 Nov 2009 17:51:40 -0600

I have a Core Data entity with a transient property that is setup to lazy-load its value in an on-demand accessor. The value is an image which is loaded from file.

The issue: when the object is faulted (i.e. the fault fires), the accessor for my transient property gets called which ends up loading the image from file.

Presently, I'm overcoming this by calling [self isFault] in the on- demand accessor, and if it returns true, I simply return nil. This works but I'd like to know if there's a better way. Also, I remain confused as to why the accessor for my transient property gets called during faulting.

Kevin
_______________________________________________

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


  • Prev by Date: iphone Development mentor
  • Next by Date: Re: Localization of System Preferences Pane
  • Previous by thread: iphone Development mentor
  • Next by thread: Strange NSNumberFormatter behavior
  • Index(es):
    • Date
    • Thread