On Wed, Aug 8, 2012, at 04:37 PM, Kyle Sluder wrote: > It does make it easier for subviews that want to perform their own > NSEvent handling to do so, but now I'm having the darndest time figuring > out how that interacts with the highlight NSTableView draws around > right-clicked rows. It's supposed to be tied to whether you call > NSTableView's implementation of -menuForEvent: (which is crazy and I'm > going to file a Radar on), but I can't get it to show up in a very > simple demo app with just a plain old NSTableView and a data source.
Alright, I've figured out why I wasn't getting the right-click highlighting, even when using NSTableView's default implementation: I'd accidentally hooked up my menu to the scroll view's menu outlet, rather than to the table view's. So now we're back to a situation that makes a lot more sense, given what we've discussed in this thread. If you override -menuForEvent: and don't call super, you don't get the right values for -clickedRow: and -clickedColumn:, and you don't get the right-click menu highlighting. As I mentioned, I already filed the first; the second is now filed as <rdar://problem/12067701> (NSTableView won't show right-click highlight if -menuForEvent doesn't call super). Thanks to Corbin for listening, and to Graham for motivating me to figure out just what the heck is going on in NSTableView so I can fix the code I happen to be working on at the moment. :) --Kyle Sluder _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com