NSTableView 's Action Invocation Bindings
NSTableView 's Action Invocation Bindings
- Subject: NSTableView 's Action Invocation Bindings
- From: Francis Derive <email@hidden>
- Date: Wed, 6 Jun 2007 18:23:54 +0200
Hello,
I want to replace the action of clicking an NSButton by the action
invoked by (double)Clicking an NSTableView with these bindings :
doubleClickArgument
A multiple-value binding that specifies the object passed as a
parameter to the selector when
NSTableView receives a double click.
doubleClickTarget
An object that receives a message corresponding to selector name
when the NSTableViewis double
clicked.
In IB, the 1st binding looks like this :
doubleClickArgument -> selectionIndex[NewMessages (NSArrayController)]
Should give the row index on which it has been (double)clicked.
I wouldn't mind if it were "selection" in place of "selectionIndex" :)
Also, here I have
Selector name : @selector(viewMsg:)
where - (void) viewMsg:(id) sender was the initial ( with NSButton to
click for the same action )
- (IBAction) viewMsg:(id) sender
implemented by the nib File's Owner.
and the second :
doubleClickTarget --> msgTag [File's Owner (MessageCenterController)]
where unsigned int msgTag is an instance variable of
MessageCenterController.
Don't know what it is doing there.
Doesn't work :
(Double) clicking on a row doesn't do anything - having trace viewMsg
by NSLog( ...
- (void) viewMsg:(id) sender {
NSLog(@"MessageCenterController viewMsg:%@\n", sender);
}
But (double) clicking in the table view - but outside of the inserted
rows - gives me being sent in the debugger ...
and this
2007-06-06 18:09:34.764 Info-Direct[7226] MessageCenterController -
msgTag 0
2007-06-06 18:09:34.765 Info-Direct[7226] MessageCenterController -
msgTag 0
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden