[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
performSelector: withObject: withObject:
From: |
Keeron Ögren |
Subject: |
performSelector: withObject: withObject: |
Date: |
Tue, 31 May 2005 17:22:18 -0800 |
Hello,
I hope this is the right list for this question - I
trying to learn how to develop under GNUstep.
Well - new to Objective-C I run into a problem - I get
a error when trying to use selectors. Not when
using NSObject method performSelector: withObject: for
one argument of data but when using
performSelector: withObject: withObject. I get error:
obj/myApp: Uncaught exception
NSInvalidArgumentException, reason: Can not determine
type information for +[Tester command1:]
if I use this testcode (simplifed as to do nothing but
demostrate:
//////////////////////////////////////////////////////////////////////
@interface Tester:NSObject
+(id)test:(NSData*)myData extra:(NSString*)myText;
+(id)commandToRun:(NSData*)myData
extra:(NSString*)myText;
@end
@implementation Tester
+(id)test:(NSData*)myData extra:(NSString*)myText
{
SEL address@hidden(commandToRun:);
[Tester performSelector:commandSelector
withObject:myData withObject:myText];
return nil;
}
+(id)commandToRun:(NSData*)myData
extra:(NSString*)myText
{
printf("success\n");
return nil;
}
@end
/////////////////////////////////////////////////////////////////////////
with a single withObject: it works - is it a bug or am
I missing somthing?
/
Keeron
- performSelector: withObject: withObject:,
Keeron Ögren <=