Re: beginSheet
Re: beginSheet
- Subject: Re: beginSheet
- From: Ryan Britton <email@hidden>
- Date: Thu, 25 May 2006 08:49:50 -0700
On May 25, 2006, at 8:34 AM, Keary Suska wrote:
Other than that, there are some general considerations (mostly
looking at
beginSheet:). If the documentation doesn't indicate that a
parameter is
optional (and you don't override that method), don't send a nil value.
contextInfo parameters that you don't use should be NULL instead of
nil--these are not the same thing. AFAIK, you can't pass nil as a
value of
type SEL. I imagine you should have seen a number of compiler
warnings (or,
if you didn't, warnings may be turned off).
NULL and nil are the same value, but they're cast differently. NULL
is (void *) 0 while nil is (id) 0. They are technically
interchangeable, but it's generally best to use them in their proper
contexts.
From MacTypes.h:
/
************************************************************************
********
Special values
NULL The C standard for an null pointer constant
nil In Objective-C, a null id defined in <objc/objc.h>
In C, an alias for NULL
************************************************************************
*********/
#ifndef NULL
#define NULL 0
#endif
#ifndef nil
#define nil 0
#endif
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden