Re: question about null
Re: question about null
- Subject: Re: question about null
- From: Wim Lewis <email@hidden>
- Date: Wed, 28 Feb 2007 12:42:49 -0800
On Feb 27, 2007, at 3:42 PM, Joar Wingfors wrote:
On Feb 27, 2007, at 11:58 PM, Glenn Zelniker wrote:
the condition where value != nil and yet logging value results in
<null> ?
I don't think that can happen - Unless the contents of the string
happens to be that particular sequence of characters...
If you pass a non-string to NSLog or stringWithFormat:, etc., with
the "%@" format, then the object's -description method gets invoked
to convert it to a string. (Or possibly -descriptionWithLocale:, I
forget). For NSNumbers and the like, it returns the number converted
to its usual textual representation; for other property-list types,
it returns the old human-readable plist representation of the object;
for objects that don't override -description, it returns <NSClassName
0xXXXXXX>. And for NSNull, it returns @"<null>". :)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden