Transient Property and lazy-loading issue
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