• 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: Creating selector for nonexistent method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating selector for nonexistent method


  • Subject: Re: Creating selector for nonexistent method
  • From: Greg Parker <email@hidden>
  • Date: Tue, 29 Apr 2014 13:30:23 -0700

On Apr 29, 2014, at 11:38 AM, Charles Srstka <email@hidden> wrote:
> So it seems that even if the method is defined in a header, you need it to be in the @implementation block of a class for which you have the code in order to use @selector without setting off -Wselector. This means that @selector cannot be used for methods in framework classes.

Which compiler version is that? I think the compiler's diagnostics have been improved here.


> You will need to either use NSSelectorFromString, find a way to use a blocks-based approach (if it's possible), or just turn off -Wselector.

One of the selector warnings (-Wundeclared-selector, in my compiler) is not part of -Wall precisely because it can be prone to false positives. If you don't like it, turn it off.


--
Greg Parker     email@hidden     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Creating selector for nonexistent method
      • From: Charles Srstka <email@hidden>
References: 
 >Creating selector for nonexistent method (From: Arved von Brasch <email@hidden>)
 >Re: Creating selector for nonexistent method (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: Help with Help
  • Next by Date: Re: Creating selector for nonexistent method
  • Previous by thread: Re: Creating selector for nonexistent method
  • Next by thread: Re: Creating selector for nonexistent method
  • Index(es):
    • Date
    • Thread