Re: Method not seeing array as array
Re: Method not seeing array as array
- Subject: Re: Method not seeing array as array
- From: Shawn Erickson <email@hidden>
- Date: Wed, 2 Feb 2005 20:16:43 -0800
On Feb 2, 2005, at 8:13 PM, Andrew Farmer wrote:
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);
Yup.
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;
}
Yup
_______________________________________________
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