- create a dockbar menu from a specStef refactored all dockingbar related things out of MenuMorph into DockingBarMenuMorph, the- create a popup menu from a spec
problem is, spec does not distinguish between
buildWithSpecAsPopup - buildWithSpecAsMenuadaptAsPopup - adaptAsMenubuildWidgetPopup - buildWidgetMenuBut it turns out I had to duplicate all the xPopup methods:I tried to implement this by providing a new buildWithSpecAsMenu and changed the
MorphicMenuAdapter to create a MenuMorph (for popup menus) and DockingBarMenuMorph (for the other one).
It is certainly a hack.But I am not sure.and this doesn't look right to me. As MorphicMenuAdapter is the only MorphicAdapter that
implements special adaptAsX method, all this (popup-)menu related build/adapt methods looks like a hack.
nicolaiMaybe someone with more knowledge about spec internals can take a look on this issue.
2014-12-14 21:15 GMT+01:00 stepharo <stepharo@free.fr>:So then this is probably my mistake. Now I will not have the time to work on it before at least a week.
Too many other things to do that are not Pharo related.
Stef
Le 14/12/14 17:24, Peter Uhn��k a ��crit��:
in which version of Pharo are you?
I cleaned a lot menu in 40 so this is probably related.
Do you have an example I could execute?
Yes this happens on Pharo 4.
��Yes, Pharo 4
ApplicationWithToolbar new openWithSpec
then, open the "File"-menu
-> MenuMorph(Object)>>doesNotUnderstand: #activatedFromDockingBar:��