Changing the world menu

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Changing the world menu

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

Stéphane Ducasse

On Sep 9, 2010, at 11:49 AM, Hilaire Fernandes wrote:

> How can I change programmatically the world menu?
> Which class to look at?

PasteUpMorph?
Setting?


>
> Hilaire
>
> --
> Dr. Geo, to discover geometry on Linux, Windows, MAC and XO
> http://community.ofset.org/index.php/DrGeo
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

Marcus Denker-4

On Sep 9, 2010, at 12:29 PM, Stéphane Ducasse wrote:

>
> On Sep 9, 2010, at 11:49 AM, Hilaire Fernandes wrote:
>
>> How can I change programmatically the world menu?
>> Which class to look at?
>
> PasteUpMorph?
> Setting?
>

Check the senders of worldMenu, e.g.
 

SettingsBrowser>>#menuCommandOn: aBuilder
        <worldMenu>
        (aBuilder item: #'Settings')
                parent: #System;
                order: 1;
                icon: MenuIcons smallConfigurationIcon;
                action: [SettingBrowser open];
                help: 'Opens a SystemSettingBrowser which allows you to alter many system settings'


--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

Marcus Denker-4

On Sep 9, 2010, at 2:13 PM, Hilaire Fernandes wrote:

> Okay I see.
> I will propose a little refactoring of WorldState so one can change the
> world menu programmatically.
Yes, what is missing is a way to reset the menuBuilder in the WorldState so that
it creates a new one.

        Marcus


--
Marcus Denker  -- http://www.marcusdenker.de
INRIA Lille -- Nord Europe. Team RMoD.


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

Alain Plantec-4
Le 09/09/2010 14:17, Marcus Denker a écrit :

> On Sep 9, 2010, at 2:13 PM, Hilaire Fernandes wrote:
>
>    
>> Okay I see.
>> I will propose a little refactoring of WorldState so one can change the
>> world menu programmatically.
>>      
> Yes, what is missing is a way to reset the menuBuilder in the WorldState so that
> it creates a new one.
>    
Is it what you are looking for ?

PasteUpMorph>>resetWorldMenu
     menuBuilder
         ifNotNil: [menuBuilder reset]


to be used as follow:
----------
World resetWorldMenu
----------

Alain

> Marcus
>
>
> --
> Marcus Denker  -- http://www.marcusdenker.de
> INRIA Lille -- Nord Europe. Team RMoD.
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>    


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

Alain Plantec-4

>> Yes, what is missing is a way to reset the menuBuilder in the
>> WorldState so that
>> it creates a new one.
> Is it what you are looking for ?
argh, no, you need to re-create the menuBuilder with the new pragma keyword.
and yes it is missing :(

maybe something like:

setMenuPragmaKeywordTo: aSymbol
     menuBuilder := PragmaMenuBuilder pragmaKeyword: aSymbol model: self

Alain


>
> PasteUpMorph>>resetWorldMenu
>     menuBuilder
>         ifNotNil: [menuBuilder reset]
>
>
> to be used as follow:
> ----------
> World resetWorldMenu
> ----------
>
> Alain
>>     Marcus
>>
>>
>> --
>> Marcus Denker  -- http://www.marcusdenker.de
>> INRIA Lille -- Nord Europe. Team RMoD.
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

hilaire
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Changing the world menu

Stéphane Ducasse
thanks!

Stef

On Sep 9, 2010, at 3:35 PM, Hilaire Fernandes wrote:

> I have proposed a patch ready for integration to easily change the world
> menu
>
> http://code.google.com/p/pharo/issues/detail?id=2930
>
> Hilaire
>
> Le 09/09/2010 14:36, Alain Plantec a écrit :
>>
>>>> Yes, what is missing is a way to reset the menuBuilder in the
>>>> WorldState so that
>>>> it creates a new one.
>>> Is it what you are looking for ?
>> argh, no, you need to re-create the menuBuilder with the new pragma
>> keyword.
>> and yes it is missing :(
>>
>> maybe something like:
>>
>> setMenuPragmaKeywordTo: aSymbol
>>    menuBuilder := PragmaMenuBuilder pragmaKeyword: aSymbol model: self
>>
>> Alain
>>
>>
>>>
>>> PasteUpMorph>>resetWorldMenu
>>>    menuBuilder
>>>        ifNotNil: [menuBuilder reset]
>>>
>>>
>>> to be used as follow:
>>> ----------
>>> World resetWorldMenu
>>> ----------
>>>
>>> Alain
>>>>    Marcus
>>>>
>>>>
>>>> --
>>>> Marcus Denker  -- http://www.marcusdenker.de
>>>> INRIA Lille -- Nord Europe. Team RMoD.
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> [hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>
>
> --
> Dr. Geo, to discover geometry on Linux, Windows, MAC and XO
> http://community.ofset.org/index.php/DrGeo
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project