[squeak-dev] The Inbox: Environments-cwp.6.mcz

commits at source.squeak.org commits at source.squeak.org
Wed May 22 21:33:16 UTC 2013


A new version of Environments was added to project The Inbox:
http://source.squeak.org/inbox/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.!



More information about the Squeak-dev mailing list