• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: question about null
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >question about null (From: Glenn Zelniker <email@hidden>)
 >Re: question about null (From: Joar Wingfors <email@hidden>)

  • Prev by Date: Problems subclassing NSWindowController while keeping bindings working
  • Next by Date: Re: Window from Shell Application
  • Previous by thread: Re: question about null
  • Next by thread: Re: question about null
  • Index(es):
    • Date
    • Thread