Re: Get NSPopUpButton from NSMenuItem
Re: Get NSPopUpButton from NSMenuItem
- Subject: Re: Get NSPopUpButton from NSMenuItem
- From: Siegfried <email@hidden>
- Date: Thu, 09 Jun 2011 17:12:55 -0300
On 09/06/2011, at 17:06, Quincey Morris wrote:
> On Jun 9, 2011, at 12:51, Siegfried wrote:
>
>> From the other items, I just need to retrieve their tags so I didn't connect the action on the popup as it was an ivar already, and just created a specific action for the "Cusom" item.
>
> Is there any reason not to use a specific tag for the custom item?
No!
> It may seem like an uglier way to do it, but given that you've got to get back to the original popup button, I think it's less code overall to detect the tag in your common code instead of trying to route that one item differently.
It certainly is. It just happened that I didn't had this idea. It was in my face, but without your help I would never notice it.
> The only reason to avoid the tag approach is if there's no unique tag value you can set aside for this item.
There is: -1
Thanks a lot Quincey,
Best Wishes,
Siegfried_______________________________________________
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