Composite NSImage as Core Data transient attribute
Composite NSImage as Core Data transient attribute
- Subject: Composite NSImage as Core Data transient attribute
- From: "Mark Hill" <email@hidden>
- Date: Thu, 28 Jun 2007 18:12:19 +0100
I have a CoreData Entity called Composite which has a to_many relationship
with an Image Entity
Does it make sense to store the composite NSImage (re-generated each time
one of its images is updated) thus:
@interface TextureEntity : NSManagedObject {
NSImage *compositeImage;
}
and treating it as a transient attribute in the model for KVC?
So that my NSView object's drawRect could just request
valueForKey:@"composite"
This iVar would be set during awakeFromFetch and again when its position is
updated by being dragged in the view, where I'd use something like [texture
compositeFromImages]; to rebuild and reflect those changes.
Or should I keep this View related stuff away from the Model?
It seems to me that in this instance @"composite" is really nothing more
than a model attribute.
Thanks.
_______________________________________________
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