Re: returning nil on initialization
Re: returning nil on initialization
- Subject: Re: returning nil on initialization
- From: Clark Cox <email@hidden>
- Date: Thu, 1 Apr 2004 20:24:18 -0500
On Apr 01, 2004, at 17:45, Scott Anguish wrote:
>
On Apr 1, 2004, at 4:40 PM, John Stiles wrote:
>
>
>> I'm under the impression that the result of [super init] and the
>
>> variable self will always be the same.
>
>
>
> This is not true. The super is free to return something else. (I
>
> don't know of any concrete examples, but Objective-C books sometimes
>
> warn about this.)
>
>
>
>
even if super does change self, it'll be reflected in the value of
>
self that the subclass is using.
No, that's why the assignment is part of the idiom.
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.