Re: NSWindowController that closes itself
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.