[Pharo-project] how to register a tool in the open menu?
Hi guys does one of you know how when I load a package I can get an entry in the open... menu? Stef
On Wed, Oct 8, 2008 at 6:46 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
does one of you know how when I load a package I can get an entry in the open... menu?
SHWorkspace class>>initialize TheWorldMenu registerOpenCommand: {'Shout Workspace'. {self. #open}} -- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu)
You'll need to write a class-side initialize method in one of the classes that gets loaded... initialize "Initialize the application." (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [ TheWorldMenu registerOpenCommand: { 'Report Builder' . { self . #openDefault }. 'Report bulding tool' }] And, an unload is usually wise too... unload "Remove the world menu open menu entry." (TheWorldMenu respondsTo: #unregisterOpenCommand:) ifTrue: [TheWorldMenu unregisterOpenCommand: 'Report Builder'] Regards, Gary. ----- Original Message ----- From: "Stéphane Ducasse" <stephane.ducasse@inria.fr> To: "Pharo Development" <Pharo-project@lists.gforge.inria.fr> Sent: Wednesday, October 08, 2008 5:46 PM Subject: [Pharo-project] how to register a tool in the open menu?
Hi guys
does one of you know how when I load a package I can get an entry in the open... menu?
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Thanks! Stef On Oct 8, 2008, at 6:52 PM, Gary Chambers wrote:
You'll need to write a class-side initialize method in one of the classes that gets loaded...
initialize "Initialize the application."
(TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [ TheWorldMenu registerOpenCommand: { 'Report Builder' . { self . #openDefault }. 'Report bulding tool' }]
And, an unload is usually wise too...
unload "Remove the world menu open menu entry."
(TheWorldMenu respondsTo: #unregisterOpenCommand:) ifTrue: [TheWorldMenu unregisterOpenCommand: 'Report Builder']
Regards, Gary.
----- Original Message ----- From: "Stéphane Ducasse" <stephane.ducasse@inria.fr
To: "Pharo Development" <Pharo-project@lists.gforge.inria.fr> Sent: Wednesday, October 08, 2008 5:46 PM Subject: [Pharo-project] how to register a tool in the open menu?
Hi guys
does one of you know how when I load a package I can get an entry in the open... menu?
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Damien could you add the MethodFinder to the tools you add to the oneClick image. I added the registration mechanism. I will check the code of the model. Stef On Oct 8, 2008, at 6:52 PM, Damien Cassou wrote:
On Wed, Oct 8, 2008 at 6:46 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
does one of you know how when I load a package I can get an entry in the open... menu?
SHWorkspace class>>initialize TheWorldMenu registerOpenCommand: {'Shout Workspace'. {self. #open}}
-- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu) _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Wed, Oct 8, 2008 at 8:07 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Damien could you add the MethodFinder to the tools you add to the oneClick image.
As soon as you tell me it's ready and its repository. -- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu)
this is MethodFinder in Pharo
<stephane.ducasse@inria.fr> wrote:
Damien could you add the MethodFinder to the tools you add to the oneClick image.
As soon as you tell me it's ready and its repository.
-- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu) _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Thu, Oct 9, 2008 at 2:34 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
this is MethodFinder in Pharo
You must add it to the Universes. The how-to is at http://wiki.squeak.org/squeak/5899. Each time you make a significant update to the package and you think it's stable, you will also have to update the universe. Bye -- Damien Cassou Peter von der Ahé: «I'm beginning to see why Gilad wished us good luck». (http://blogs.sun.com/ahe/entry/override_snafu)
participants (3)
-
Damien Cassou -
Gary Chambers -
Stéphane Ducasse