CORE DATA: setImage (transient) and setImageData (binary) accessors don't fire.
CORE DATA: setImage (transient) and setImageData (binary) accessors don't fire.
- Subject: CORE DATA: setImage (transient) and setImageData (binary) accessors don't fire.
- From: "Frederick C. Lee" <email@hidden>
- Date: Sat, 14 Jan 2006 21:45:20 -0800
I'm still trying to put an image into permanent storage (via sliding,
inserting image into NSImageView).
I've studied the CoreRecipes example; it works with mediaData (binary).
The current documentation suggest I use NSImageView's Value vs Data
(ref. Core Recipes) binding;
using transient data.
I'm working with both 'imageData' (binary) and 'image' (transient).
My scenario has multiple Regions with each having multiple maps
(images).
I believe I have the 'plumbing' in place, that is, the NSString
fields work okay (read/update/save).
But I'm not getting ANY response to the setImage or SetImageData
accessor/mutators.
The image & imageData 'Get' accessors do fire, but return nils.
Specifically, the 'setImageData' accessor isn't firing.
I don't know why.
Any ideas?
===========================
Scenario:
[Region] --->> [Map]
image (transient)
imageData (binary)
name (string)
[Files' Owner] ---->> [Regions Array Controller] -->> [RegionMap
Array Controller]
[Regions Array Controller]:
Attribute: Region Entity
managedObjectContext --> File's Owner.
[RegionMap Array Controller]:
Attribute: Map Entity
contentSet = selection.map(Regions[NSArrayController)]
managedObjectContext = <disconnected> {blows up if connected}
Map's ImageView binding: Value = selection.image[RegionMap
[NSArrayController)]
===========================
@interface MapManagedObject : NSManagedObject {}
@implementation MapManagedObject
- (void)awakeFromFetch { <-- Okay
NSData *imageData = [self valueForKey:@"imageData"];
NSLog(@"{MapManagedObject.m: awakeFromFetch}");
}
- (void)willSave { <--- okay *** BUT 'image' is always nil ***
NSLog(@"{MapManagedObject.m: willSave}");
}
- (NSImage *)image { <-- okay
NSLog(@"{MapManagedObject.m: image}");
}
- (void)setImage:(NSImage *)anImage { <-- *** DOESN'T FIRE ***
NSLog(@"{MapManagedObject.m: setImage}");
}
- (NSData *)imageData { <-- okay
}
- (void)setImageData:(NSData *)value { <--- *** DOESN'T FIRE ***
}
- (NSString *)name { <-- okay
}
- (void)setName:(NSString *)value { <-- okay
}
_______________________________________________
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