On Oct 10, 2008, at 3:20 PM, DKJ wrote:

I've made an NSDictionary where the values are strings. Is there a difference between setting a value as [NSNull null] and setting it as @""? (I've been using the former.)

Is there a difference? Definitely. One is an instance of NSString, the other is an instance of NSNull. NSNull is not special. It's an object just like any other.

Whether you want to use an empty string or an NSNull is up to you. If an empty string is a legal value, then you could use NSNull to represent there being no value given. (Or just simply don't have anything in the dictionary.)


--
Seth Willits




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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]

Reply via email to