FROM : John James
DATE : Sun May 01 14:55:55 2005
I am probably doing some stupid newbie thing; please help.
i have a simple test case to try the selector feature. given the
following class definition and implementation:
--------------
#import <Cocoa/Cocoa.h>
@interface Seltest : NSObject
{}
-(void)test1;
-(void)test2:(NSString*)val;
@end
-----------
#import "seltest.h"
@implementation Seltest
-(void)test1
{NSLog(@"test1");}
-(void)test2:(NSString*)val
{NSLog(val);}
@end
-------------------
Elsewhere At runtime I try the following
if ([Seltest respondsToSelector: @selector(test1:)]==YES)
NSLog(@"YES");
else
NSLog(@"NO");
I always get NO!
Shouldn't it be YES?
Thanks for your help
DATE : Sun May 01 14:55:55 2005
I am probably doing some stupid newbie thing; please help.
i have a simple test case to try the selector feature. given the
following class definition and implementation:
--------------
#import <Cocoa/Cocoa.h>
@interface Seltest : NSObject
{}
-(void)test1;
-(void)test2:(NSString*)val;
@end
-----------
#import "seltest.h"
@implementation Seltest
-(void)test1
{NSLog(@"test1");}
-(void)test2:(NSString*)val
{NSLog(val);}
@end
-------------------
Elsewhere At runtime I try the following
if ([Seltest respondsToSelector: @selector(test1:)]==YES)
NSLog(@"YES");
else
NSLog(@"NO");
I always get NO!
Shouldn't it be YES?
Thanks for your help
| Related mails | Author | Date |
|---|---|---|
| John James | May 1, 14:55 | |
| Shawn Erickson | May 2, 08:00 | |
| Daniel DeCovnick | May 2, 08:01 | |
| Daniel DeCovnick | May 2, 08:02 | |
| Phil Larson | May 2, 08:03 | |
| Chris Parker | May 2, 08:13 | |
| Seth Willits | May 2, 08:16 | |
| Ken Tozier | May 2, 08:23 | |
| Dan Treiman | May 2, 08:29 | |
| Dan Treiman | May 2, 08:36 | |
| Stefan Jung | May 2, 09:18 | |
| Ken Tozier | May 2, 09:24 | |
| m | May 2, 09:25 | |
| Dan Bernstein | May 2, 11:27 | |
| Heinrich Giesen | May 2, 16:11 | |
| Andy Lee | May 2, 17:20 |






Cocoa mail archive

