• 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: Using performSelector: on super
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using performSelector: on super


  • Subject: Re: Using performSelector: on super
  • From: James Bucanek <email@hidden>
  • Date: Tue, 5 Aug 2008 16:36:22 -0700

Charles Steinman <mailto:email@hidden> wrote (Tuesday, August 5, 2008 4:20 PM -0700):

--- On Tue, 8/5/08, James Bucanek <email@hidden> wrote:

In your original code, you had

SEL closeSelector = @selector(close);
if ([SuperSocket
instancesRespondToSelector:closeSelector]) {
...

This does not, as I think you believe, test to see if an
object of the class SuperSocket responds to the -close message. In


fact, it tests to see if the class object for SuperSocket responds to the +close message.

That isn't correct. The +instancesRespondToSelector: method tells whether *instances* of a class respond to a selector. To test whether the class object responds to a given selector, you'd use [SuperSocket respondsToSelector:].

My bad, you're absolutely correct. I just misread it as respondsToSelector:.

--
James Bucanek

_______________________________________________

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


References: 
 >Re: Using performSelector: on super (From: Charles Steinman <email@hidden>)

  • Prev by Date: control user interface of an external application
  • Next by Date: Re: [SOLVED] Resizing a NSImage in a Cocoa command line tool
  • Previous by thread: Re: Using performSelector: on super
  • Next by thread: Re: Using performSelector: on super
  • Index(es):
    • Date
    • Thread