Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I have a Transformable that is used as an NSDictionary, and what I want to do is configure my managed object so that in the absence of a value for a given key, any call to valueForKey:key will return a default value.
 
With an NS
I have a Transformable that is used as an NSDictionary, and what I want to do is configure my managed object so that in the absence of a value for a given key, any call to valueForKey:key will return a default value.
as Mascots suggests, if you are using an NSManagedObject subclass you can set default attribute values in the awakeFromInsert method.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.