Smalltalk.st
changeset 211 58bb873aa83c
parent 202 40ca7cc6fb9c
child 213 3b56a17534fd
--- a/Smalltalk.st	Mon Nov 21 18:05:13 1994 +0100
+++ b/Smalltalk.st	Tue Nov 22 15:28:10 1994 +0100
@@ -26,7 +26,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.26 1994-11-17 14:18:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.27 1994-11-22 14:28:10 claus Exp $
 '!
 
 "
@@ -55,7 +55,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.26 1994-11-17 14:18:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.27 1994-11-22 14:28:10 claus Exp $
 "
 !
 
@@ -151,7 +151,7 @@
      Smalltalk versionString
     "
 "
-$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.26 1994-11-17 14:18:04 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.27 1994-11-22 14:28:10 claus Exp $
 "
 !
 
@@ -164,7 +164,7 @@
     RETURN ( _MKSTRING(VERSIONDATE_STRING COMMA_SND) );
 #endif
 %}.
-    ^ '21-oct-1994'
+    ^ '22-nov-1994'
 
     "
      Smalltalk versionDate
@@ -232,8 +232,19 @@
 
 initialize
     "initialize all other classes; setup dispatcher processes etc.
-     - this one is the first entry into the smalltalk world right after startup,
-       ususally followed by Smalltalk>>start"
+     This one is the first entry into the smalltalk world right after startup,
+     ususally followed by Smalltalk>>start.
+     Notice: this is not called when an image is restarted; in this
+     case the show starts in Smalltalk>>restart."
+
+    "
+     define low-level debugging tools - graphical classes are not prepared yet
+     to handle things. 
+     This will bring us into the MiniDebugger when an error occurs
+     during startup
+    "
+    Inspector := MiniInspector.
+    Debugger := MiniDebugger.
 
     self initGlobalsFromEnvironment.
 
@@ -243,7 +254,8 @@
     "
     Object initialize.
     ExternalStream initialize.
-    self initStandardStreams.
+
+    self initStandardStreams.    "/ setup Stdin, Stdout etc.
 
     "
      sorry, path must be set before ...
@@ -258,13 +270,6 @@
 	Workstation initialize
     ].
 
-    "
-     define low-level debugging tools - graphical classes are not prepared yet
-     to handle things ... 
-     - this will bring us into the MiniDebugger when an error occurs
-    "
-    Inspector := MiniInspector.
-    Debugger := MiniDebugger.
     Compiler := ByteCodeCompiler.
     Compiler isNil ifTrue:[
 	"
@@ -295,7 +300,7 @@
     self initStandardTools.
     self initInterrupts.
 
-    "Smalltalk initialize"
+    self initUserPreferences.    
 !
 
 initUserPreferences
@@ -307,17 +312,20 @@
 initGlobalsFromEnvironment
     "setup globals from the shell-environment"
 
-    |envString firstChar i langString terrString|
+    |envString i langString terrString|
 
     "
      extract Language and LanguageTerritory from LANG variable.
      the language and territory must not be abbreviated,
-     valid is for example: english_usa
-			   english
-			   german
-			   german_austria
+     valid are for example: english_usa
+			    english
+			    german
+			    german_austria
     "
 
+    Language := #english.
+    LanguageTerritory := #usa.
+
     envString := OperatingSystem getEnvironment:'LANG'.
     envString notNil ifTrue:[
 	i := envString indexOf:$_.
@@ -333,20 +341,8 @@
     ].
 
     "
-     this too is a leftover - once all refs to View3D
-     are removed, this will vanish ...
-     (please use: View>>defaultStyle:)
+     Smalltalk initGlobalsFromEnvironment
     "
-    envString := OperatingSystem getEnvironment:'VIEW3D'.
-    envString notNil ifTrue:[
-	firstChar := (envString at:1) asLowercase.
-	(firstChar == $t) ifTrue:[
-	    Smalltalk at:#View3D put:true
-	] ifFalse: [
-	    Smalltalk at:#View3D put:false
-	]
-    ]
-    "Smalltalk initGlobalsFromEnvironment"
 !
 
 initStandardTools
@@ -1115,7 +1111,7 @@
 	cls isBehavior ifTrue:[^ cls]
     ].
     (aString endsWith:'class') ifTrue:[
-	str := str copyTo:(str size - 5).
+	str := aString copyTo:(aString size - 5).
 	str knownAsSymbol ifTrue:[
 	    cls := self at:(str asSymbol) ifAbsent:[^ nil].
 	    cls isBehavior ifTrue:[^ cls]
@@ -1525,8 +1521,6 @@
      WARNING: this method is rubbish: it should only read things after the
 	      last '**snapshot**' - entry."
 
-    |upd|
-
     "
      tell Class to NOT update the changes file now ...
     "
@@ -1546,7 +1540,7 @@
      finally source file (.st) in that order.
      The file is first searched for using the class name, then the abbreviated name."
 
-    |shortName newClass upd ok nm|
+    |shortName newClass ok nm|
 
     Class withoutUpdatingChangesDo:
     [