Re: Selector not working for me
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