Call me on my mobile.
From: Alex Zavatone
Date: Friday, March 28, 2014
Subject: Re: Multiple methods named 'compare:' found
To: Gerriet M. Denkmann
Cc: Mailing Lists
Would you consider comparing the type or class of the items in question first?
On
Mar 28
, 2014, at 1:57 AM,
Would you consider comparing the type or class of the items in question first?
On Mar 28, 2014, at 1:57 AM, Gerriet M. Denkmann wrote:
>
> On 28 Mar 2014, at 12:46, Quincey Morris
> wrote:
>
>> On Mar 27, 2014, at 22:40 , Gerriet M. Denkmann wrote:
>>
>>> I do not want to switch off the war
On 28 Mar 2014, at 12:46, Quincey Morris
wrote:
> On Mar 27, 2014, at 22:40 , Gerriet M. Denkmann wrote:
>
>> I do not want to switch off the warning for the whole file, just for this
>> special line.
>
> IIRC, this should do it:
>
>> if ( [(id) a compare: b] == NSOrderedDescending ) then
( [ a compare: b] == NSOrderedDescending ) then ...
>
> Xcode Version 5.1 (5B130a) warns me that "Multiple methods named 'compare:'
> found".
>
> How do I switch off this warning (in this line only)?
> I do not want to switch off the warning for the whole file, j
On Mar 27, 2014, at 22:40 , Gerriet M. Denkmann wrote:
> I do not want to switch off the warning for the whole file, just for this
> special line.
IIRC, this should do it:
> if ( [(id) a compare: b] == NSOrderedDescending ) then …
without having to delve into pragmas.
___
I have:
id a,b;
if (something)
{
a = @(43);
b = some other NSNumber;
}
else
{
a = [ NSDate date];
b = some other NSDate;
}
if ( [ a compare: b] == NSOrderedDescending ) then ...
Xcode Version 5.1 (5B130a) warns me that "Multiple methods named 'compar
I must misunderstand what you are trying to accomplish. From the description of
Strict Selector Matching:
"Warn if multiple methods with differing argument and/or return types are found
for a given selector when attempting to send a message using this selector to a
receiver of type "id" or "Cla
On Feb 16, 2013, at 2:18 AM, Uli Kusterer wrote:
> If ClassA and RootA as well are actually identical, you could probably also
> use instancetype. (good summary here: http://nshipster.com/instancetype/)
instancetype is a good solution when applicable.
Another solution is to lie a little bit to
someObject = instance of ClassB;
> }
>
> id someRoot = [ someObject rootObject ];
>
> Here the compiler complains: "Multiple methods named 'rootObject' found".
> What can I do to get rid of this warning? (Other than switching the warning
: "Multiple methods named 'rootObject' found".
What can I do to get rid of this warning? (Other than switching the warning
off?)
Gerriet.
10.8.2, Xcode 4.6
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin r
10 matches
Mail list logo