• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't get to work setDoubleAction on NSMatrix with NSButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
      • From: Robert Martin <email@hidden>
  • Prev by Date: Re: async NSOperation and NSOperationQueue
  • Next by Date: Re: async NSOperation and NSOperationQueue
  • Previous by thread: Re: async NSOperation and NSOperationQueue
  • Next by thread: Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
  • Index(es):
    • Date
    • Thread