I wonder whether Button Cells are built to provide double-click actions (seems kind of weird if they do). Do you get 2 single-click actions?

From the NSMatrix double action docs: "The double-click action of an NSMatrix is sent after the appropriate single-click action (for the NSCell clicked or for the NSMatrix if theNSCell doesn’t have its own action). If there is no double-click action and the NSMatrix doesn’t ignore multiple clicks, the single-click action is sent twice."



On Sep 15, 2008, at 11:37 AM, Oleg Krupnov wrote:

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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to