FROM : Shawn Erickson
DATE : Sat Jul 08 03:23:32 2006
On 7/7/06, Rob Ross <<email_removed>> wrote:
> Are you saying you can write an init method with a signature like this:
>
> - (FooClass *)init;
>
> I thought that if you overrode a method from a superclass, the
> signatures must match (including the return type).
>
> Or am I wrong about that?
Sorry should have been more clear in my wording (was thinking of
designated initializers of various classes that I have)... you can
specify type for say -(MyBubba*) [MyBubba initWithGump:] and the
compiler will warn if you tried to assign it to a variable with the
wrong type.
-Shawn
DATE : Sat Jul 08 03:23:32 2006
On 7/7/06, Rob Ross <<email_removed>> wrote:
> Are you saying you can write an init method with a signature like this:
>
> - (FooClass *)init;
>
> I thought that if you overrode a method from a superclass, the
> signatures must match (including the return type).
>
> Or am I wrong about that?
Sorry should have been more clear in my wording (was thinking of
designated initializers of various classes that I have)... you can
specify type for say -(MyBubba*) [MyBubba initWithGump:] and the
compiler will warn if you tried to assign it to a variable with the
wrong type.
-Shawn






Cocoa mail archive

