• 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
Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell


  • Subject: Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
  • From: Robert Martin <email@hidden>
  • Date: Mon, 15 Sep 2008 16:01:24 -0400

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 (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: Graham Cox <email@hidden>
References: 
 >Can't get to work setDoubleAction on NSMatrix with NSButtonCell (From: "Oleg Krupnov" <email@hidden>)

  • Prev by Date: Re: NSXMLParser and character entities?
  • Next by Date: Abusing targetForAction: with non-action selectors
  • Previous by thread: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
  • Next by thread: Re: Can't get to work setDoubleAction on NSMatrix with NSButtonCell
  • Index(es):
    • Date
    • Thread