I have an Entity with a transient UIImage* property "image." The getter and 
setter manage an iVar and read and write the image data to disk as a PNG file.

So, I create an Entity in my main MOC, observe the image property on it, then 
hand it to a child MOC to do some processing. The child fetches a new Entity 
based on its NSManagedObjectID, and goes to work. When it is done generating 
the image, it assigns it to the image property, then saves the MOC.

My code is observing the main instance's image property, but this doesn't fire 
on save. Other, persisted properties do fire.

I presume that if I were to back the image property with a persisted property 
and store the image data in Core Data, I could get it to fire, perhaps using 
+keyPathsForValuesAffectingImage. But I wanted to write the image data 
separately (not too worried about bloating Core Data, but I do like being able 
to inspect the image file during debugging).

Is this usage not possible (without some additional property to trigger on that 
is persisted, like lastModified date or something)?

I do have the image property listed in the Model as an undefined transient 
property.

-- 
Rick




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to