The Trunk: Environments-cwp.6.mcz

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

The Trunk: Environments-cwp.6.mcz

commits-2
Colin Putney uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-cwp.6.mcz

==================== Summary ====================

Name: Environments-cwp.6
Author: cwp
Time: 6 August 2012, 11:14:17.356 am
UUID: be16cbae-4177-4a75-bded-5550c61f49dd
Ancestors: Environments-cwp.5

Made Environment class>>uninstall complain to the transcript if there is no environment installed, rather than raise an error. Also, added a comment to Environment class>>initialize to explain why we're uninstalling rather than installing.

=============== Diff against Environments-cmm.4 ===============

Item was changed:
  ----- Method: Environment class>>initialize (in category 'as yet unclassified') -----
  initialize
+ self uninstall!
- self install!

Item was added:
+ ----- Method: Environment class>>uninstall (in category 'as yet unclassified') -----
+ uninstall
+ | globals sysdict |
+ self environment class == self ifFalse:
+ [Transcript
+ cr;
+ show: 'Can''t uninstall environments; they''re not currently installed'.
+ ^ self].
+
+ globals := Smalltalk globals instVarNamed: 'contents'.
+ sysdict := SystemDictionary new: globals size.
+ globals associationsDo: [:ea | sysdict add: ea].
+ Smalltalk globals becomeForward: sysdict.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Environments-cwp.6.mcz

Frank Shearar-3
On 6 August 2012 19:21,  <[hidden email]> wrote:

> Colin Putney uploaded a new version of Environments to project The Trunk:
> http://source.squeak.org/trunk/Environments-cwp.6.mcz
>
> ==================== Summary ====================
>
> Name: Environments-cwp.6
> Author: cwp
> Time: 6 August 2012, 11:14:17.356 am
> UUID: be16cbae-4177-4a75-bded-5550c61f49dd
> Ancestors: Environments-cwp.5
>
> Made Environment class>>uninstall complain to the transcript if there is no environment installed, rather than raise an error. Also, added a comment to Environment class>>initialize to explain why we're uninstalling rather than installing.
>
> =============== Diff against Environments-cmm.4 ===============
>
> Item was changed:
>   ----- Method: Environment class>>initialize (in category 'as yet unclassified') -----
>   initialize
> +       self uninstall!
> -       self install!
>
> Item was added:
> + ----- Method: Environment class>>uninstall (in category 'as yet unclassified') -----
> + uninstall
> +       | globals sysdict |
> +       self environment class == self ifFalse:
> +               [Transcript
> +                       cr;
> +                       show: 'Can''t uninstall environments; they''re not currently installed'.
> +               ^ self].
> +
> +       globals := Smalltalk globals instVarNamed: 'contents'.
> +       sysdict := SystemDictionary new: globals size.
> +       globals associationsDo: [:ea | sysdict add: ea].
> +       Smalltalk globals becomeForward: sysdict.!

Dale, this ought to be sufficient to unblock you, if you have the
energy to have another go.

frank