• 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
Not getting mouseDown: called when control-clicking in view in menu item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Not getting mouseDown: called when control-clicking in view in menu item


  • Subject: Not getting mouseDown: called when control-clicking in view in menu item
  • From: Tim Hewett <email@hidden>
  • Date: Thu, 15 May 2014 17:39:58 +0100

I have a NSMenuItem with a custom view (inheriting from NSImageView) which needs to react to mouseDown: events. An NSTrackingArea has been setup for the view’s frame to enable this.

When getting the events the modifierFlags are used to change behaviour, but this doesn’t work when control is held down - no mouseDown: event occurs at all (no problem with other modifier keys).

If mouseDown: is called with no modifier keys held down and then control is pressed, this can be seen in the modifier flags when the mouseUp: event occurs.

The TrackView in the MenuItemView sample code has been tested and gets mouseDown: events including when control is held down, the only difference seems to be that the view in that sample is defined in a XIB while the problem code’s view is created programmatically.

Is there a way that this app can get mouseDown: events when control is being held down?
_______________________________________________

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: Not getting mouseDown: called when control-clicking in view in menu item
      • From: Eric Shepherd <email@hidden>
  • Prev by Date: Re: How to speak Chinese on 10.9.2
  • Next by Date: Re: White rectangle behind UIAlertView when subview clipsToBounds
  • Previous by thread: Re: White rectangle behind UIAlertView when subview clipsToBounds
  • Next by thread: Re: Not getting mouseDown: called when control-clicking in view in menu item
  • Index(es):
    • Date
    • Thread