Behavior.st
changeset 22708 d5fdc5d3edfc
parent 22441 e1bf343ab352
child 22935 21b27365d08b
--- a/Behavior.st	Wed Apr 25 07:08:30 2018 +0200
+++ b/Behavior.st	Wed Apr 25 10:44:40 2018 +0200
@@ -1439,6 +1439,7 @@
 
 ! !
 
+
 !Behavior methodsFor:'RefactoringBrowser'!
 
 realClass
@@ -1928,7 +1929,8 @@
 
 cloneFrom:aPrototype
     "return an instance of myself with variables initialized from
-     a prototype. This is used when instances of obsolete classes are
+     a prototype. 
+     This is eg. used when instances of obsolete classes are
      binary loaded and a conversion is done on the obsolete object.
      UserClasses may redefine this for better conversions."
 
@@ -1936,15 +1938,15 @@
 
     indexed := false.
     aPrototype class isVariable ifTrue:[
-	self isVariable ifTrue:[
-	    indexed := true.
-	].
-	"otherwise, these are lost ..."
+        self isVariable ifTrue:[
+            indexed := true.
+        ].
+        "otherwise, these are lost ..."
     ].
     indexed ifTrue:[
-	newInst := self basicNew:aPrototype basicSize
+        newInst := self basicNew:aPrototype basicSize
     ] ifFalse:[
-	newInst := self basicNew
+        newInst := self basicNew
     ].
 
     newInst cloneInstanceVariablesFrom:aPrototype.
@@ -1953,23 +1955,23 @@
 
     "
      Class withoutUpdatingChangesDo:[
-	 Point subclass:#Point3D
-	   instanceVariableNames:'z'
-	   classVariableNames:''
-	   poolDictionaries:''
-	   category:'testing'.
-	 (Point3D cloneFrom:1@2) inspect.
+         Point subclass:#Point3D
+           instanceVariableNames:'z'
+           classVariableNames:''
+           poolDictionaries:''
+           category:'testing'.
+         (Point3D cloneFrom:1@2) inspect.
      ]
     "
 
     "
      Class withoutUpdatingChangesDo:[
-	 Point variableSubclass:#Point3D
-	   instanceVariableNames:'z'
-	   classVariableNames:''
-	   poolDictionaries:''
-	   category:'testing'.
-	 (Point3D cloneFrom:#(1 2 3)) inspect.
+         Point variableSubclass:#Point3D
+           instanceVariableNames:'z'
+           classVariableNames:''
+           poolDictionaries:''
+           category:'testing'.
+         (Point3D cloneFrom:#(1 2 3)) inspect.
      ]
     "
 
@@ -1977,19 +1979,19 @@
      |someObject|
 
      Class withoutUpdatingChangesDo:[
-	 Object subclass:#TestClass1
-	   instanceVariableNames:'foo bar'
-	   classVariableNames:''
-	   poolDictionaries:''
-	   category:'testing'.
-	 someObject := TestClass1 new.
-	 someObject instVarAt:1 put:'foo'; instVarAt:2 put:'bar'.
-	 Object subclass:#TestClass2
-	   instanceVariableNames:'bar foo'
-	   classVariableNames:''
-	   poolDictionaries:''
-	   category:'testing'.
-	 (TestClass2 cloneFrom:someObject) inspect.
+         Object subclass:#TestClass1
+           instanceVariableNames:'foo bar'
+           classVariableNames:''
+           poolDictionaries:''
+           category:'testing'.
+         someObject := TestClass1 new.
+         someObject instVarAt:1 put:'foo'; instVarAt:2 put:'bar'.
+         Object subclass:#TestClass2
+           instanceVariableNames:'bar foo'
+           classVariableNames:''
+           poolDictionaries:''
+           category:'testing'.
+         (TestClass2 cloneFrom:someObject) inspect.
      ]
     "
 !