Can't get to work setDoubleAction on NSMatrix with NSButtonCell
Can't get to work setDoubleAction on NSMatrix with NSButtonCell
- Subject: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
- From: "Oleg Krupnov" <email@hidden>
- Date: Mon, 15 Sep 2008 18:37:19 +0300
I've read all the docs and the archives of this list, but I can't seem
to find what's wrong with my code:
(in MyWindowController)
@interface MyWindowController : NSWindowController
{
IBOutlet NSMatrix* matrix;
}
@end
@implementation MyWindowController
- (void)windowDidLoad
{
// ok, at this point matrix != nil
[matrix setTarget:self];
// ok, at this point [matrix target] points to the instance of
MyWindowController
[matrix setDoubleAction:@selector(handleDoubleClick:)];
// ok, at this point [matrix doubleAction points to the
selector of handleDoubleClick
// so everything seems to be OK, but...
}
- (IBAction)handleDoubleClick:(id)sender
{
// it never arrives here :(
NSLog (@"hello");
}
@end
"matrix" is an outlet connected via IB and its value is valid in run time.
The cell type is NSButtonCell, which is non-editable, AFAIK.
I double-click on a button and nothing happens. The button receives
two click messages and the button's action is triggered two times, but
the matrix'es double click action is never sent.
I have no more ideas what could be wrong. Please advise!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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