Re: Pop Up Menu in NSTableView
Re: Pop Up Menu in NSTableView
- Subject: Re: Pop Up Menu in NSTableView
- From: Keary Suska <email@hidden>
- Date: Mon, 25 Mar 2013 08:03:36 -0600
On Mar 24, 2013, at 5:26 PM, Quincey Morris wrote:
>> As to the backtrace:
>
> That looks unsurprising. In particular, after the table view passed the mouse-down to the popup button, it didn't get involved again later.
>
> Are you sure the action method isn't being called twice, with different senders? With the breakpoint in place, you can do "po sender" in the debugger whenever it breaks, and the result will tell you the actual class of 'sender'. Then click the Continue button to see if you get to the breakpoint again.
Inspecting the sender is the trick--and don't be surprised at the result. I ran into this some time ago. Is the sender is the NSTableView, instead instead of the NSPopupButtonCell? IIRC, the only way to do what you want with a popup is to connect the action to each and every individual menu item rather than the cell as a whole.
Also, I don't think you will find bindings useful in this case at all. The data source and delegate methods will help most.
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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