Le 21 août 08 à 00:02, Matthew Mashyna a écrit :

I have an NSTableView subclass whose only override method is rightMouseDown. I override it so I can have it select the table row before validating and presenting the context menu (by then passing it up to [super rightMouseDown]).

This works nicely but I have found that it does not work for control clicks. For a another view item I overrode mouseDown to check for the control key and call [self rightMouseDown] if needed.

For NSTableView I can catch rightMouseDown but I can't seem to catch mouseDown. When I control click a row the context men comes up over a non-selected item which, ironically enough, gives me an out-of- context menu.

How can I get control clicks on my NSTableView ?


Instead of trying to catch mouse events, override -[NSView menuForEvent:theEvent]



_______________________________________________

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