Core Data Binding: Reading a binary image (TIFF)
Core Data Binding: Reading a binary image (TIFF)
- Subject: Core Data Binding: Reading a binary image (TIFF)
- From: "Frederick C. Lee" <email@hidden>
- Date: Tue, 3 Jan 2006 17:33:54 -0800
Greetings:
I've encoded a NSImage to NSData object via the following:
NSData *encodedMap = [[gvNewMapView image] TIFFRepresentation];
Then I programmatically stuffed this 'encodedMap' into a binary
attribute of an entity object (NSManagedObject) using the
'setValue: ... forKey' method.
The XML data file and the debugger apparently says all is well.
Eventually I want to be able to load an image from an outside source,
archive it, and later retrieve it; hence using a reversible
NSValueTransformer to/from the one NSImageView.
But for the present moment, I would just like to READ an image binary
from a Core Data file.
Via the IB:
NSImageView binding:
value = NSUnarchiveFromData(selection.map)[Region Array Controller
(NSArrayController)]
But I can't view the archived image.
What I get is the following:
2006-01-03 16:05:22.183 Global Village[3981] *** -
[_NSFaultingMutableSet bytes]: selector not recognized [self = 0x3b6de0]
Question:
1) Do I need to override the supplied controller/NSValueTransformer
or can I just use the predefined stuff?
2) What am I missing?
Ric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden