NSButton argument binding doesn't pass argument?
        Posted  
        
            by 
                Jeff
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jeff
        
        
        
        Published on 2013-07-01T17:02:54Z
        Indexed on 
            2013/07/01
            17:05 UTC
        
        
        Read the original article
        Hit count: 519
        
I have a NSCollectionView with a NSButton in the collection view item. The xib's owner is set to my BatchListViewController and the controller has the method
@interface BatchListViewController : NSViewController
-(IBAction)another_click;
@end
I set the binding for target to be:

This works fine but I also want to send the underlying model to the another_click method. According to the Apple docs,
The objects specified in the argument bindings are passed as parameters to the selector specified in the target binding when the NSButton is clicked.
So I set the binding for argument to be:

This runs fine if I keep the selector method's signature the same another_click: but if I change it to 
-(IBAction)another_click:(id)arg;
I get the dreaded error:
BatchListViewController another_click]: unrecognized selector sent to instance
What am I doing wrong? Apple's docs say this is possible but I haven't been able to find an example of this working. Even other SO threads are saying this isn't possible but that can't be right.
© Stack Overflow or respective owner