Contextual menu for NSTableCellView in NSOutlineView
Contextual menu for NSTableCellView in NSOutlineView
- Subject: Contextual menu for NSTableCellView in NSOutlineView
- From: Konidaris Christos <email@hidden>
- Date: Wed, 10 Feb 2016 19:10:44 +0200
I cannot get contextual menus to work inside the cells of my view-based NSOutlineView.
In my cell view I have one standard NSImageView and one NSTextFieldCell. I set the menu for the outline view in IB. When I (right) click on a cell outside the two views the contextual menu appears. When I click on one of the two fields it does not. I can see from the logs that the menu delegate's menuNeedsUpdate: is not called in this case. I tried setting the same menu as the menu for these views in IB with the same result. I get the same behavior when I implement -menuForEvent:(NSEvent *)event for my NSOutlineView subclass instead of setting the menu in IB.
I also tried implementing -menuForEvent:(NSEvent *)event for my NSTableCellView subclass with no better luck. This all in Xcode 7.2.1, deployment target set to 10.9, no ARC.
Does anybody know what I am missing for the contextual menu to work for my cell views?
Thanks in advance,
- Christos Konidaris
_______________________________________________
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