I want a Spec application to add an additional item to the System Window Menu. Is this possible? So far I have missed how it might be done.

This System Window Menu seems to come from...

SystemWindow>>offerWindowMenu
   | aMenu |
   aMenu := self buildWindowMenu.
   model ifNotNil:
       [model addModelItemsToWindowMenu: aMenu].
   aMenu popUpEvent: self currentEvent in: self world

where #buildWindowMenu produces a standard menu from pragmas
and custom model specific menu items can be added with #addModelItemsToWindowMenu:.

In the case of PharoLauncher, 'model' is a MorphicWindowAdapter for which #addModelItemsToWindowMenu: is a null-method inherited from Object. So maybe 'model' needs to be a different class somehow? Alternatively, I see that SpecWindow inherits from SystemWindow, so maybe #buildWindowMenu can be overridden to add menu items from subclasses of ComposableModel ?

cheers -ben

Reply via email to