Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

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

Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

metacello
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Product-Core

New issue 132 by [hidden email]: MetacelloBrowser: Register in Squeak  
World menu
http://code.google.com/p/metacello/issues/detail?id=132

Run the following for MBOBConfigurationBrowser
to make it Show up in the Squeak World menu
as well as the 'Apps' menu.

This can be implemented on
MBOBConfigurationBrowser
but may be unportable:

registerInWorldMenu
        self environment at: #TheWorldMenu ifPresent: [ :class |
                class registerOpenCommand: (Array
                        with: 'Metacello Browser'
                        with: (Array
                                with: self
                                with: #open)) ].


Alternatively, put the following in the postLoadScript for Squeak
in the Metacello-config  for the browser:


Smalltalk globals at: #TheWorldMenu ifPresent: [ :class |
        class registerOpenCommand: (Array
                with: 'Metacello Browser'
                with: (Array
                        with: MBOBConfigurationBrowser
                        with: #open)) ].



Reply | Threaded
Open this post in threaded view
|

Re: Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

abergel
I added the method registerInWorldMenu in the class MBOBConfigurationBrowser class. Let me know whether this is ok. I do not know who postLoadScript works, and I am not sure this is necessary.
Thanks for your contribution. This is cool!
In Version 1.60.1.
Can you confirm it works for you? I will then close the issue

Cheers,
Alexandre


On 15 Apr 2011, at 09:09, [hidden email] wrote:

> Status: New
> Owner: ----
> Labels: Type-Defect Priority-Medium Product-Core
>
> New issue 132 by [hidden email]: MetacelloBrowser: Register in Squeak World menu
> http://code.google.com/p/metacello/issues/detail?id=132
>
> Run the following for MBOBConfigurationBrowser
> to make it Show up in the Squeak World menu
> as well as the 'Apps' menu.
>
> This can be implemented on
> MBOBConfigurationBrowser
> but may be unportable:
>
> registerInWorldMenu
> self environment at: #TheWorldMenu ifPresent: [ :class |
> class registerOpenCommand: (Array
> with: 'Metacello Browser'
> with: (Array
> with: self
> with: #open)) ].
>
>
> Alternatively, put the following in the postLoadScript for Squeak
> in the Metacello-config  for the browser:
>
>
> Smalltalk globals at: #TheWorldMenu ifPresent: [ :class |
> class registerOpenCommand: (Array
> with: 'Metacello Browser'
> with: (Array
> with: MBOBConfigurationBrowser
> with: #open)) ].
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

metacello
In reply to this post by metacello

Comment #1 on issue 132 by [hidden email]: MetacelloBrowser:  
Register in Squeak World menu
http://code.google.com/p/metacello/issues/detail?id=132

I added the method registerInWorldMenu in the class  
MBOBConfigurationBrowser class. Let me know whether this is ok. I do not  
know who postLoadScript works, and I am not sure this is necessary.
Thanks for your contribution. This is cool!
In Version 1.60.1.
Can you confirm it works for you? I will then close the issue

Reply | Threaded
Open this post in threaded view
|

Re: Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

metacello
Updates:
        Status: Started

Comment #2 on issue 132 by [hidden email]: MetacelloBrowser:  
Register in Squeak World menu
http://code.google.com/p/metacello/issues/detail?id=132

(No comment was entered for this change.)

Reply | Threaded
Open this post in threaded view
|

Re: Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

metacello

Comment #3 on issue 132 by [hidden email]: MetacelloBrowser:  
Register in Squeak World menu
http://code.google.com/p/metacello/issues/detail?id=132

The point is that the registerInWorldMenu is
platform-specific to squeak and best located in the
MetacelloConfiguration as Post-Load Doit.
(see alternative in
http://code.google.com/p/metacello/issues/detail?id=132
)

As Alex states in that report
"I do not know who postLoadScript works, and I am not sure this is  
necessary."
I propose the following:

* revert: MetacelloBrowser-OB-UI-AlexandreBergel.44
* add:
ConfigurationOfMetacelloBrowser>>#squeakRegisterInWorldMenu
in 'doits'

squeakRegisterInWorldMenu

        Smalltalk globals at: #TheWorldMenu ifPresent: [ :class |
                class registerOpenCommand:
                        {'Metacello Browser' . {MBOBConfigurationBrowser .  #open} .
                        'The Metacello Browser allows loading and management of Metacello  
configurations'} ].

* I think this is best fitted in the stable version, hence:
* modify:
ConfigurationOfMetacelloBrowser>>#baseline159:
baseline159: spec
        <version: '1.59-baseline'>

"…"
        spec for: #'squeak' do: [
                spec project: 'Announcements' with: [
                                spec
                                        className: 'ConfigurationOfAnnouncements';
                                        versionString: '1.0';
                                        repository: 'http://www.squeaksource.com/MetacelloRepository' ].
                spec
                        package: 'MetacelloBrowser-Core' with: [
                                spec requires: 'Announcements' ].
+ speck
+ package: 'MetacelloBrowser-OB-UI' with: [
+ spec postLoadDoIt: #squeakRegisterInWorldMenu ].
                spec
                        group: 'Core' with: #('OB'). ].
"…"

* and probably release a 1.59.2

Reply | Threaded
Open this post in threaded view
|

Re: Issue 132 in metacello: MetacelloBrowser: Register in Squeak World menu

metacello
Updates:
        Status: Fixed
        Labels: -Product-Core Product-Browser

Comment #4 on issue 132 by [hidden email]: MetacelloBrowser: Register  
in Squeak World menu
http://code.google.com/p/metacello/issues/detail?id=132

Incorporated Tobias' suggestion. Created 1.59.2-baseline so fix available  
in 1.59.2 (dkh.299).

Tested in a Squeak4.2 Alpha image and the MetcelloBrowser shows up in the  
menu ....