Am 01.03.2010 um 08:12 schrieb Eagle Offshore:
> NSManagedObject* obj; // gets created somehow
>
> [obj setValue: nil forKey: @"bar"]; // succeeds where NSDictionary fails
> [obj setValue: [NSNull null] forKey: @"bar"]; // fails where NSDictionary
> succeeds
>
> so - this is conceptually buggy thinking and the thoughtful developer could
> be forgiven for being VERY SURPRISED by this behavior that is NOT DOCUMENTED.
Wat if you use subclasses of NSManagedObject as I always do?
[obj setBar:[NSNull null]] // has to fail, I need a string!
Your comparison to NSDictionary is wrong. NSManagedObject is a (good working)
placeholder for a class with properties and not just a container like
NSDictionary.
If you build a method that takes an NSString you would not want NSNull in it,
do you?
atze
_______________________________________________
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]