• 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: Selector not working for me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selector not working for me


  • Subject: Re: Selector not working for me
  • From: Ken Tozier <email@hidden>
  • Date: Mon, 2 May 2005 02:23:45 -0400


There's two errors in the next line:

if ([Seltest respondsToSelector: @selector(test1:)]==YES)
        NSLog(@"YES");

1. You should be using an instance of  Seltest rather than the class
2. The test1 method doesn't have any arguments so there's no need for the colon inside the @selector() part

try this:

Seltest    *test    = [[Seltest alloc] init];

if ([test responds to selector:@selector(test1)] == YES)
    NSLog(@"yes");

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

This email sent to email@hidden

References: 
 >Selector not working for me (From: John James <email@hidden>)

  • Prev by Date: Re: Selector not working for me
  • Next by Date: Re: Selector not working for me
  • Previous by thread: Re: Selector not working for me
  • Next by thread: Re: Selector not working for me
  • Index(es):
    • Date
    • Thread