Hi, I've encountered a problem with submenus in Spec's MenuModel. When opening a submenu it throws MNU MenuMorph>>activatedFromDockingBar:. It can be reproduced by opening "ApplicationWithToolbar new openWithSpec" and clicking on "File". I'm not familiar with the internals of Morphic so I do not know what the issue is. Also there seems to be some TxApplicationWithToolbar; is TX something I should be aware of? E.g. something that is going to replace Spec or something? Thanks, Peter
Hi peter 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? Stef
Hi,
I've encountered a problem with submenus in Spec's MenuModel. When opening a submenu it throws MNU MenuMorph>>activatedFromDockingBar:. It can be reproduced by opening "ApplicationWithToolbar new openWithSpec" and clicking on "File" I'm not familiar with the internals of Morphic so I do not know what the issue is.
Also there seems to be some TxApplicationWithToolbar; is TX something I should be aware of? E.g. something that is going to replace Spec or something? No I think that this is probably a Application for TxText. No Idea that it was there.
Thanks, Peter
2014-12-14 11:04 GMT+01:00 stepharo <stepharo@free.fr>:
Hi peter
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. ApplicationWithToolbar new openWithSpec then, open the "File"-menu -> MenuMorph(Object)>>doesNotUnderstand: #activatedFromDockingBar:
Stef
Hi,
I've encountered a problem with submenus in Spec's MenuModel. When opening a submenu it throws MNU MenuMorph>>activatedFromDockingBar:. It can be reproduced by opening "ApplicationWithToolbar new openWithSpec" and clicking on "File" I'm not familiar with the internals of Morphic so I do not know what the issue is.
Also there seems to be some TxApplicationWithToolbar; is TX something I should be aware of? E.g. something that is going to replace Spec or something?
No I think that this is probably a Application for TxText. No Idea that it was there.
Thanks, Peter
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:
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:
Stef refactored all dockingbar related things out of MenuMorph into DockingBarMenuMorph, the problem is, spec does not distinguish between - create a popup menu from a spec - create a dockbar menu from a spec 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). But it turns out I had to duplicate all the xPopup methods: buildWidgetPopup - buildWidgetMenu adaptAsPopup - adaptAsMenu buildWithSpecAsPopup - buildWithSpecAsMenu 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. But I am not sure. Maybe someone with more knowledge about spec internals can take a look on this issue. nicolai 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:
Hi nicolai could you publish your code somewhere? Le 20/12/14 01:32, Nicolai Hess a écrit :
Stef refactored all dockingbar related things out of MenuMorph into DockingBarMenuMorph, the problem is, spec does not distinguish between - create a popup menu from a spec - create a dockbar menu from a spec
I do not remember the use of DockingBarMenuMorph (sigh... doing too mnay things). But is it needed?
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).
But it turns out I had to duplicate all the xPopup methods: buildWidgetPopup - buildWidgetMenu adaptAsPopup - adaptAsMenu buildWithSpecAsPopup - buildWithSpecAsMenu
May be we should push your change.
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. But I am not sure.
It is certainly a hack. Menu were not really thought.
Maybe someone with more knowledge about spec internals can take a look on this issue.
nicolai
2014-12-14 21:15 GMT+01:00 stepharo <stepharo@free.fr <mailto: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:
I created an issue here https://pharo.fogbugz.com/f/cases/14829/Spec-MenuModel-submenu-not-working I also found the breaking commit https://github.com/pharo-project/pharo-core/commit/1c3c757366ba2cad8f367ee95... but Stef probably knows best what was going on there. Peter On Sat, Dec 20, 2014 at 8:03 PM, Nicolai Hess <nicolaihess@web.de> wrote:
2014-12-20 9:54 GMT+01:00 stepharo <stepharo@free.fr>:
Hi nicolai
could you publish your code somewhere?
see attachement dock_menu_spec.cs
participants (3)
-
Nicolai Hess -
Peter Uhnák -
stepharo