setValue:forUndefinedKey:
setValue:forUndefinedKey:
- Subject: setValue:forUndefinedKey:
- From: Tore Halset <email@hidden>
- Date: Thu, 12 Oct 2006 01:03:31 +0200
Hello.
My object has some properties in a dictionary. It is like
NSManagedObject that has (I guess) the properties in a Dictionary.
Some of the properties have specific set/get methods, others do not.
They should all be accessible with key value coding. I have read
about setValue:forKey:'s search order at this web page:
http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/SearchImplementation.html
My current solution is to implement a setValue:forUndefinedKey: that
look up in the Dictionary for properties that do not have a separate
set method. It is working. Is this a good idea or should I override
setValue:forKey: instead?
- Tore.
_______________________________________________
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