Re: Bindings for dynamically populated menu
Re: Bindings for dynamically populated menu
- Subject: Re: Bindings for dynamically populated menu
- From: Sean McBride <email@hidden>
- Date: Wed, 09 Apr 2014 13:22:45 -0400
- Organization: Rogue Research Inc.
On Mon, 7 Apr 2014 07:01:19 -0700, Jerry Krinock said:
>Cocoa Bindings are useful to magically keep visible user interface
>elements in sync with data, although the magic comes with some pain,
>sometimes quite considerable. But menus only appear when the user
>clicks on them and disappear when the mouse goes up. Therefore it is
>natural to update menus, with menuNeedsUpdate:, when clicked, and there
>is no need to update them when they are not visible. Conclusion: Using
>Cocoa Bindings on menus is all pain for no gain.
A menu's selection is always visible, and I've found bindings on popup menus can be useful to deal with the selection. If the object represented by the popup's selection is deleted (by some other piece of UI) then the popup's selection can be updated automagically with bindings.
But certainly the minute you want separators or other dynamic content, binding become less useful.
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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