• 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: NSWindowController that closes itself
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindowController that closes itself


  • Subject: Re: NSWindowController that closes itself
  • From: email@hidden
  • Date: Wed, 14 Nov 2001 13:07:56 +0100

Am Mittwoch den, 14. November 2001, um 05:00, schrieb Erik M. Buck:

Testing (nil != delegate) is much more important that avoiding
sending -respondsToSelector: to nil since Apple could introduce a "nil
object" that has an address other than 0 yet any message to nil will still
return nil. Furthermore, the implicit conversion of the return value from
nil to NO is exactly the same thing you are doing when you test delegate
without a Boolean binary comparison operator.


Apple could not do that. "nil is defined as a null object and id with a value of 0". (See Page 52 of Objective-C).

if( ! delegate) or if( delegate) for that matter will always work.

Nat!
--- [ Sorry, but... ] ------------------------------
This mail has been written using Mail.app on a Lombard Apple Powerbook running Mac OS X. If you receive duplicates in content or intent, it is due to technical problems on my side.


References: 
 >Re: NSWindowController that closes itself (From: "Erik M. Buck" <email@hidden>)

  • Prev by Date: Re: OSALoad/OSACompile block when machine is asleep
  • Next by Date: Re: NSBitmapImageRep Colorspace Question
  • Previous by thread: Re: NSWindowController that closes itself
  • Next by thread: Re: NSWindowController that closes itself
  • Index(es):
    • Date
    • Thread