krfkeith / metacello

Automatically exported from code.google.com/p/metacello
0 stars 0 forks source link

MetacelloBrowser: Register in Squeak World menu #132

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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)) ].

Original issue reported on code.google.com by tobiasp...@gmail.com on 15 Apr 2011 at 1:09

GoogleCodeExporter commented 9 years ago
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

Original comment by alexandr...@gmail.com on 15 Apr 2011 at 2:01

GoogleCodeExporter commented 9 years ago

Original comment by alexandr...@gmail.com on 15 Apr 2011 at 2:01

GoogleCodeExporter commented 9 years ago
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

Original comment by alexandr...@gmail.com on 16 Apr 2011 at 12:54

GoogleCodeExporter commented 9 years ago
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 
....

Original comment by henrichs...@gmail.com on 17 Apr 2011 at 5:42

GoogleCodeExporter commented 9 years ago
bulk verify

Original comment by henrichs...@gmail.com on 18 Apr 2011 at 5:32