[Pharo-dev] can Spec applications add additional items to standard SystemWindow menu

Benjamin benjamin.vanryseghem.pharo at gmail.com
Sat Oct 19 09:21:20 EDT 2013


Now, you can :P

See case 11958[1]

Ben
[1] https://pharo.fogbugz.com/default.asp?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...
> 
> 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
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131019/34eed8b2/attachment-0002.html>


More information about the Pharo-dev mailing list