Re: CoreData Mysterious Conditional Data Loss
Re: CoreData Mysterious Conditional Data Loss
- Subject: Re: CoreData Mysterious Conditional Data Loss
- From: Milen Dzhumerov <email@hidden>
- Date: Thu, 24 Sep 2009 14:59:11 +0100
On 24 Sep 2009, at 14:20, I. Savant wrote:
We're probably going to need a bit more information than this. You
say the icons are "gone". I assume your entity instances are still
there and all their other properties are present but only the NSImage
attribute is coming back with an empty image?
Correct.
In that case, how exactly are you creating / storing / accessing
this image? That seems to be the most relevant part to all this but
one which you've completely left out.
You got it right first time, many thanks. The images were created
using NSImage's initByReferencingFile: which I presume only references
the image file. That's what I thought at first (that CoreData stored
the path to the image within the bundle so when the bundle was moved,
it couldn't find the file) but then I looked at the raw data stored in
the XML file (which was base64 encoded) and saw the actual PNG data
with no filesystem paths. It seems that I there's more magic going on
behind the scenes. In any case, thanks for the help.
M
_______________________________________________
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