Re: Contextual menu for NSTableCellView in NSOutlineView
Re: Contextual menu for NSTableCellView in NSOutlineView
- Subject: Re: Contextual menu for NSTableCellView in NSOutlineView
- From: Konidaris Christos <email@hidden>
- Date: Wed, 10 Feb 2016 23:54:51 +0200
Yes I did set it, to the outlineView’s delegate object.
> On 10 Feb 2016, at 23:32, Lee Ann Rucker <email@hidden> wrote:
>
> Did you set the menu's delegate? It doesn't know about the outlineView's delegate.
>
>> On Feb 10, 2016, at 9:10 AM, Konidaris Christos <email@hidden> wrote:
>>
>> 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