On Mar 1, 2010, at 00:12, Eagle Offshore wrote: > But in general, KVC requires object wrappers for things you can't put into > containers.
In general (that is, in generic methods like valueForKey: and setValue:forKey:), KVC requires object pointers for values. It has nothing to do with containers -- the same is true for simple property values too. So, KVC has to convert scalar values to/from objects, for scalar properties. But it doesn't have to convert nil for object pointer properties, because nil is already a valid object pointer. The only complication comes when you specify nil for the value of a scalar property (still nothing to do with collections). In that case, KVC can't do the conversion, and it's handled by the setNilValueForKey: mechanism. > NSNull should result in nil when used KVC calls just like NSNumber results in > an integer. It doesn't, though. KVC doesn't do anything special with NSNull. NSNull is there for collections, not for KVC. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
