Handling [super init] returning nil

2013-05-29 Thread Peter Teeson
In Apple's Concepts in Objective-C Programming discussing Issues with Initializers there is this code snippet id anObject = [[MyClass alloc] init]; if (anObject) { [anObject doSOmething]; // more messages… } else { // handle error } All the code I Googled does not address the nil case

Re: Handling [super init] returning nil

2013-05-29 Thread David Duncan
On May 29, 2013, at 9:36 AM, Peter Teeson ptee...@icloud.com wrote: In Apple's Concepts in Objective-C Programming discussing Issues with Initializers there is this code snippet id anObject = [[MyClass alloc] init]; if (anObject) { [anObject doSOmething]; // more messages… } else {