> Okay, I've spent all afternoon
Why do that ? If you hit a wall after a half hour, send a mail.
> [button setAction:@selector(sayHello:window)];
When using selectors with JSTalk or JSCocoa, just use Javascript
strings and they will be automatically converted.
Use
[button setAction:'sayHello:']
or (Methods starting with 'set' and taking one argument can be called
like this)
button.action = 'sayHello:'
respondsToSelector works the same way :
if ([button respondsToSelector:'sayHello:'])
As Ross said, you can't pass arguments with these. Selectors are just
method names.
-Patrick