> Il giorno 29/mag/2015, alle ore 19:38, Alex Zavatone <z...@mac.com> ha 
> scritto:
> 
> DOH.  Good catch.  Sorry, was typing out by hand instead of copying and 
> pasting.  I'm actually returning nil in the real class.
> 
> So, that should be this:
> 
> - (id)init {
>    if (self != [super init]) {
>        return nil;
>    }
> 
>    // Set up stuff here.
>    // We don't care if this gets long.
>    // We really don't.  This could go on and on.
>       
>    return self; 
> }

what if [super init] returned something different than self, yet not nil?

In that case, your code wouldn’t be correct, as a general rule...

-- 
Simone Tellini
http://tellini.info




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to