On Fri, Oct 10, 2008 at 3:20 PM, DKJ <[EMAIL PROTECTED]> 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.)

It's up to you. Unlike other languages, Cocoa dictionaries are not
type homogenous (ObjC in general has a weak type system and its
objects are statically typed). It is up to the caller of objectForKey:
(which returns id) to check the type of the returned object and make
sure it is what you are expecting it to be.

-Colin
_______________________________________________

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]

Reply via email to