[Pharo-dev] can Spec applications add additional items to standard SystemWindow menu
benjamin.vanryseghem.pharo at gmail.com
Sat Oct 19 09:21:20 EDT 2013
Now, you can :P
See case 11958
On Oct 19, 2013, at 6:49 AM, btc at openInWorld.com wrote:
> 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...
> | 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev