Not getting mouseDown: called when control-clicking in view in menu item
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