Re: Method not seeing array as array
Re: Method not seeing array as array
- Subject: Re: Method not seeing array as array
- From: Andrew Farmer <email@hidden>
- Date: Wed, 2 Feb 2005 20:13:33 -0800
On 2 Feb 2005, at 17:43, Shawn Erickson wrote:
<snip>
...or the following for more complex cases (assumes dealloc will clean
stuff as needed)...
-(id)init
{
bool failed = NO;
if ((self = [super init]) == nil) {
return nil;
}
for(;;) {
I assume you meant
do { ... } while(0);
in which case a better pattern using block structures might be
- (id)init
{
if((self = [super init]) == nil)
return nil;
do {
if(!<stuffWorks>)
break;
if(!<moreStuffWorks>)
break;
return self;
} while(0);
[self release];
return nil;
}
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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