On Jul 29, 2008, at 7:41 PM, Torsten Curdt wrote:
So I did't get why this should be ambiguous because NSApp obviously
can't be of type id. Well turns out - it actually is. And now it all
makes sense again :)
I've just replaced [NSApp ..] with [[NSApplication
sharedApplication] ...]
Glad
The compiler doesn't know what class the object belongs to. You're
sending the message either to a variable of type id or the result of
a method that returned id.The id type can hold any class, so if
there are two identically named methods with different signatures
(BOOL return type vs. voi
--- On Tue, 7/29/08, Torsten Curdt <[EMAIL PROTECTED]> wrote:
> Class A has method
>
> - (void) something:(Someclass*)s;
>
> Class B has method
>
> - (BOOL) something:(Someclass*)s;
>
> Why on earth am I getting a warning
>
> warning: multiple methods named '-something:'
> found
> usi
|-Wselector |(Objective-C and Objective-C++ only)
Warn if multiple methods of different types for the same selector
are found during compilation. The check is performed on the list of
methods in the final stage of compilation. Additionally, a check is
performed for each selector appea