Custom World menu for own apps

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

Custom World menu for own apps

Torsten Bergmann
Just for the records:

in Pharo 1.2. it is now possible to define an own custom pragma
that is used to define a world menu. This is especially usefull
when you create a (commercial) application based on Pharo.

How it works:
=============

1. Define your new world context menu by providing class methods
   with your own custom world menu entries. Instead of using the
   usual "worldMenu" pragma we use a custom pragma, here
   "myAppWorldMenu":
   

     menuCommandOn: aBuilder
         <myAppWorldMenu>
         (aBuilder item: #'About MyApp')
          action: [ 'HelloWorld' inspect ];
                icon: ThemeIcons pharoIcon


2. Switch the world state to use the custom pragram:
 
    WorldState desktopMenuTitle: 'My shiny App'.
    WorldState desktopMenuPragmaKeyword: 'myAppWorldMenu'

If you want the old one back just evaluate:

    WorldState desktopMenuTitle: 'World'.
    WorldState desktopMenuPragmaKeyword: 'worldMenu'


Maybe someone can add this to the open pharo book or give me
an account, a short howto and time to include it.
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

_______________________________________________
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: Custom World menu for own apps

Alain Plantec-4
thanks!
Alain

Le 20/09/2010 14:48, Torsten Bergmann a écrit :

> Just for the records:
>
> in Pharo 1.2. it is now possible to define an own custom pragma
> that is used to define a world menu. This is especially usefull
> when you create a (commercial) application based on Pharo.
>
> How it works:
> =============
>
> 1. Define your new world context menu by providing class methods
>     with your own custom world menu entries. Instead of using the
>     usual "worldMenu" pragma we use a custom pragma, here
>     "myAppWorldMenu":
>
>
>       menuCommandOn: aBuilder
> <myAppWorldMenu>
> (aBuilder item: #'About MyApp')
> action: [ 'HelloWorld' inspect ];
> icon: ThemeIcons pharoIcon
>
>
> 2. Switch the world state to use the custom pragram:
>
>      WorldState desktopMenuTitle: 'My shiny App'.
>      WorldState desktopMenuPragmaKeyword: 'myAppWorldMenu'
>
> If you want the old one back just evaluate:
>
>      WorldState desktopMenuTitle: 'World'.
>      WorldState desktopMenuPragmaKeyword: 'worldMenu'
>
>
> Maybe someone can add this to the open pharo book or give me
> an account, a short howto and time to include it.
>    


_______________________________________________
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: Custom World menu for own apps

Mariano Martinez Peck
In reply to this post by Torsten Bergmann
I have just created you a user and sent you by email the data...

thanks

mariano

On Mon, Sep 20, 2010 at 2:48 PM, Torsten Bergmann <[hidden email]> wrote:
Just for the records:

in Pharo 1.2. it is now possible to define an own custom pragma
that is used to define a world menu. This is especially usefull
when you create a (commercial) application based on Pharo.

How it works:
=============

1. Define your new world context menu by providing class methods
  with your own custom world menu entries. Instead of using the
  usual "worldMenu" pragma we use a custom pragma, here
  "myAppWorldMenu":


    menuCommandOn: aBuilder
        <myAppWorldMenu>
        (aBuilder item: #'About MyApp')
               action: [ 'HelloWorld' inspect ];
               icon: ThemeIcons pharoIcon


2. Switch the world state to use the custom pragram:

   WorldState desktopMenuTitle: 'My shiny App'.
   WorldState desktopMenuPragmaKeyword: 'myAppWorldMenu'

If you want the old one back just evaluate:

   WorldState desktopMenuTitle: 'World'.
   WorldState desktopMenuPragmaKeyword: 'worldMenu'


Maybe someone can add this to the open pharo book or give me
an account, a short howto and time to include it.
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

_______________________________________________
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: Custom World menu for own apps

Gary Chambers-4
Maybe add to the HelpBrowser in image?

Regards, Gary
----- Original Message -----
Sent: Monday, September 20, 2010 3:44 PM
Subject: Re: [Pharo-project] Custom World menu for own apps

I have just created you a user and sent you by email the data...

thanks

mariano

On Mon, Sep 20, 2010 at 2:48 PM, Torsten Bergmann <[hidden email]> wrote:
Just for the records:

in Pharo 1.2. it is now possible to define an own custom pragma
that is used to define a world menu. This is especially usefull
when you create a (commercial) application based on Pharo.

How it works:
=============

1. Define your new world context menu by providing class methods
  with your own custom world menu entries. Instead of using the
  usual "worldMenu" pragma we use a custom pragma, here
  "myAppWorldMenu":


    menuCommandOn: aBuilder
        <myAppWorldMenu>
        (aBuilder item: #'About MyApp')
               action: [ 'HelloWorld' inspect ];
               icon: ThemeIcons pharoIcon


2. Switch the world state to use the custom pragram:

   WorldState desktopMenuTitle: 'My shiny App'.
   WorldState desktopMenuPragmaKeyword: 'myAppWorldMenu'

If you want the old one back just evaluate:

   WorldState desktopMenuTitle: 'World'.
   WorldState desktopMenuPragmaKeyword: 'worldMenu'


Maybe someone can add this to the open pharo book or give me
an account, a short howto and time to include it.
--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

_______________________________________________
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

_______________________________________________
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: Custom World menu for own apps

hilaire
In reply to this post by Alain Plantec-4
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Custom World menu for own apps

hilaire
In reply to this post by Torsten Bergmann
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Custom World menu for own apps

Stéphane Ducasse
In reply to this post by Torsten Bergmann
this is a clear example that a good infrastructure makes your life so simple.
Thanks alain
Thanks torsten for the how to.

On Sep 20, 2010, at 2:48 PM, Torsten Bergmann wrote:

> Just for the records:
>
> in Pharo 1.2. it is now possible to define an own custom pragma
> that is used to define a world menu. This is especially usefull
> when you create a (commercial) application based on Pharo.
>
> How it works:
> =============
>
> 1. Define your new world context menu by providing class methods
>   with your own custom world menu entries. Instead of using the
>   usual "worldMenu" pragma we use a custom pragma, here
>   "myAppWorldMenu":
>
>
>     menuCommandOn: aBuilder
> <myAppWorldMenu>
> (aBuilder item: #'About MyApp')
> action: [ 'HelloWorld' inspect ];
> icon: ThemeIcons pharoIcon
>
>
> 2. Switch the world state to use the custom pragram:
>
>    WorldState desktopMenuTitle: 'My shiny App'.
>    WorldState desktopMenuPragmaKeyword: 'myAppWorldMenu'
>
> If you want the old one back just evaluate:
>
>    WorldState desktopMenuTitle: 'World'.
>    WorldState desktopMenuPragmaKeyword: 'worldMenu'
>
>
> Maybe someone can add this to the open pharo book or give me
> an account, a short howto and time to include it.
> --
> Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
> Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
>
> _______________________________________________
> 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