You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,
nice control
the problem is when you select a nsmenuitem
this function is called func splitMenuAction(_ sender: Any) but you can't know what is dsfcombobutton are the parent ?
suggestion
set func splitMenuAction(_ sender: Any,_ combo:Any) or use for each NSMenuItem use the property
representedObject for set the dsfcombobutton pointer.
the goal are when you select a item, update the title of dsfcombobutton
thanks,
The text was updated successfully, but these errors were encountered:
I've been trying to keep this control as api-close to NSComboButton (in Ventura), hence some of the api decisions made here.
I'd rather the library not automatically set the representedObject for each menu item to the combobutton. Why?
It would have to parse each menu (and potentially submenu) for each menu item and update the representedObject, even if the user didn't care about it.
If the user has a custom representedObject for a menuItem, it would be changed when the menu was added without the caller knowing so.
Ultimately the behaviour of what the menu item does is up to you rather than the library, so I don't think forcing the combobutton to set the represented object for each menu item is the right idea (especially since other users might want to use the representedobject for other things and I don't want to stomp theirs).
the goal are when you select a item, update the title of dsfcombobutton
As you mentioned, you can manually add the DSFComboButton control to each menu item as the representedObject. This prevents the library from forcing a methodology on the caller.
Hope this clears things up. Thanks for the feedback!
hi,
nice control
the problem is when you select a nsmenuitem
this function is called func splitMenuAction(_ sender: Any) but you can't know what is dsfcombobutton are the parent ?
suggestion
set func splitMenuAction(_ sender: Any,_ combo:Any) or use for each NSMenuItem use the property
representedObject for set the dsfcombobutton pointer.
the goal are when you select a item, update the title of dsfcombobutton
thanks,
The text was updated successfully, but these errors were encountered: