Hello,
I have a simple method declared like this:
- (void) testMe: (int) n;
For testing reasons, this doesn't anything more than printing out the value
of its argument (n).
In the main method I declare a SELector referring this method:
SEL mySEL = @selector(testMe:);
Now let's assume I want to call testMe(5). But instead of calling the method
directly, I want to use the selector mySEL. How is this done?
If I try something like this ( a is an object responding to testMe: )
[ a perform: mySEL:5 ];
the compiler yields that the object a does not respond to perform::, which
is actually right but shows me that the colon is not interpreted as
argument for the selector but for "perform".
So, how to pass arguments to a selector?
Kind regards
Georg
John C. Bollinger - 09 Mar 2006 03:20 GMT
> I have a simple method declared like this:
>
[quoted text clipped - 17 lines]
> is actually right but shows me that the colon is not interpreted as
> argument for the selector but for "perform".
Presumably someone around here will recognize the language you're using,
but it isn't Java, and this is comp.lang.JAVA.programmer. You are
likely to get more and better answers if you direct your question to a
more appropriate forum.

Signature
John Bollinger
jobollin@indiana.edu
Chris Uppal - 09 Mar 2006 10:34 GMT
> [ a perform: mySEL:5 ];
If this is Objective-C then you might be better off asking in either
comp.lang.objective-c
or one of the mac programming groups:
comp.sys.mac.programmer.*
-- chris
Georg J. Stach - 09 Mar 2006 16:49 GMT
I'm sorry,
during sending the question, my newsreader was in this group, just one above
objective-c...
Georg
John C. Bollinger - 10 Mar 2006 04:00 GMT
> If this is Objective-C
[...]
Ah, Mr. Presumably Someone Around Here, himself. :-)
I didn't want to name names, but I /was/ thinking of you in particular
when I wrote that bit of my response. Good show!

Signature
John Bollinger
jobollin@indiana.edu
Chris Uppal - 10 Mar 2006 09:26 GMT
> > If this is Objective-C
>
[quoted text clipped - 4 lines]
> I didn't want to name names, but I /was/ thinking of you in particular
> when I wrote that bit of my response. Good show!
<blush/>
-- chris