i doubt that'd even compile.. it'll probably say something like 'assigning void value should be ignored.' void isn't nil, it's just nothing.
not sure what you're trying to do, but you can differentiate between multiple buttons calling the same action with the tag instance variable - give each button a unique tag value, then do something like
Code:
-(IBAction)buttonPressed:(id)sender
{
switch ( [sender tag] )
{
case 1:
//blah blah blah
break;
case 2:
//blah blah etc.
break;
}
}
You could obviously call your own methods and return whatever you want from there.
I was wondering if I could use an IBAction method by invoking a selector at run-time which is a trick I'm trying with the ThreadWorker class (http://iharder.net/macosx/threadworker).
I'm away from any NS*-capable compiler for a while, so I can't experiment.
So I finally got back to my OS X box, and yes, you can set a variable equal to the return value of a method that returns void (or at least, IBAction). Essentially, you're setting the variable to nil. That's not a problem.