• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unimplemented Selector Warning 3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unimplemented Selector Warning 3


  • Subject: Re: Unimplemented Selector Warning 3
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Tue, 21 Aug 2012 23:44:59 +0700


On 21 Aug 2012, at 22:07, Andy Lee <email@hidden> wrote:

On Aug 21, 2012, at 2:18 AM, Gerriet M. Denkmann <email@hidden> wrote:

(I hope you don't see this more than once - some problems with Mail)


I messed around with my Build Settings - activating more warnings. (Almost) always a good idea.

I have:
NSView *someSubclassOfView = ....;
if ( [ someSubclassOfView respondsToSelector: @selector(getRow:column:forPoint:) ] )
{
// this is a browser or a matrix or something else
// do something...
}

And get a warning: "Unimplemented selector 'getRow:column:forPoint:'".

What line is the warning coming from? If you are doing

   BOOL isOnCell = [someSubclassOfView getRow:&row
                                       column:&column
                                     forPoint:point];

The problem might be that someSubclassOfView is declared as an NSView. You can fix with a cast:

   BOOL isOnCell = [(NSTableView *)someSubclassOfView getRow:&row
                                                      column:&column
                                                    forPoint:point];

But when I do:
if ( [ (NSMatrix *)someSubclassOfView respondsToSelector: @selector(getRow:column:forPoint:) ] )
I get the same error message. Same with casting to NSTableView.



Same problem with:
#import "Server.h" // declares: - (void) reset;
[ currentServers makeObjectsPerformSelector: @selector(reset) ];

And:
#import "SomeClass.h" // declares: - (void) someMethod: something;
SomeClass *someClass = ...;
[ someClass performSelectorOnMainThread: @selector(someMethod:)  withObject: nil  waitUntilDone: NO ];

I don't know about these. Is the warning definitely coming from the performSelector lines?
Xcode highlights this line in yellow. And puts a warning triangle in front of it. So it seems like "Yes".


What are the warnings you activated? I can try to reproduce the problem.
I activated many. Tried to set them to "No" to get rid of the warnings, but no success.

Here some stuff which gets included:

ARCHS = $(ARCHS_STANDARD_64_BIT)
SDKROOT = macosx
VALID_ARCHS = i386 x86_64
COMBINE_HIDPI_IMAGES = YES
GCC_WARN_UNINITIALIZED_AUTOS = YES
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES
GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES

Kind regards,

Gerriet.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Unimplemented Selector Warning 3 (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Unimplemented Selector Warning 3 (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: What are your tips for navigating the Xcode interface faster?
  • Next by Date: Re: Unimplemented Selector Warning 3
  • Previous by thread: Re: Unimplemented Selector Warning 3
  • Next by thread: NSToolbar + NSPopupButton-Action menu: View is clipping its content
  • Index(es):
    • Date
    • Thread