Re: Core Data: undo and non-object attribute
Re: Core Data: undo and non-object attribute
- Subject: Re: Core Data: undo and non-object attribute
- From: Matteo Rossi <email@hidden>
- Date: Sat, 14 Oct 2006 22:18:21 +0200
Undo/redo is operating on the primitive values stored by the
NSManagedObject. You never set the primitive values for the x and y
keys, so they are always nil as far as the undo manager is concerned.
I've tried adding [self setPrimitiveValue:[NSNumber
numberWithDouble:value] forKey:@"x"] but it doesn't work anyway. Or
perhaps you're suggesting that I should manage undo in my own
setPrimitiveValue:forKey?
What exactly are you trying to achieve? Did you read the
documentation about ivars in NSManagedObject?
The problem is that I'm using a C-Structure as ivar. CD doesn't seem
to like it. In fact, docs report:
"If you choose to represent an attribute using a scalar type (such as
int or float), or as one of the structures supported by
NSKeyValueCoding (NSRect, NSPoint, NSSize, NSRange), then you should
implement accessor methods as illustrated in Listing 2. If you want
to use any other attribute type, then you should use a different
pattern, described in Non-Standard Attributes."
But it's not clear for me.
Thank you, anyway
_______________________________________________
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