when resending a method after it has been compiled
authorClaus Gittinger <cg@exept.de>
Thu, 07 Oct 1999 18:43:29 +0200
changeset 986 0398d8de8242
parent 985 082a5f214443
child 987 49a05e400448
when resending a method after it has been compiled from a lazy method, care for the original send being a super send (i.e. pass searchClass)
LazyMethod.st
--- a/LazyMethod.st	Wed Oct 06 22:44:39 1999 +0200
+++ b/LazyMethod.st	Thu Oct 07 18:43:29 1999 +0200
@@ -118,33 +118,33 @@
     "compile the method"
 
     self makeRealMethod isNil ifTrue:[
-	"
-	 compilation failed
-	"
-	selector := thisContext sender selector.
+        "
+         compilation failed
+        "
+        selector := thisContext sender selector.
 
-	class := self containingClass.
-	class notNil ifTrue:[
-	    spec := class name , '>>' , selector
-	] ifFalse:[
-	    spec := 'unknown>>' , selector
-	].
-	"
-	 this error is triggered, if the compilation of a lazy method
-	 failed - this happens for example, if a lazy methods code has been
-	 changed in a fileBrowser without checking the code for syntactical
-	 correctnes, or if the instvars of an autoloaded classes superclass 
-	 have been changed without changing the subclasses code ...
-	 You should enter the SystemBrowser on this method, and try accepting 
-	 to see what the problem is.
-	 The methods class is found in the local 'class',
-	 the selector is found in the local 'selector'.
+        class := self containingClass.
+        class notNil ifTrue:[
+            spec := class name , '>>' , selector
+        ] ifFalse:[
+            spec := 'unknown>>' , selector
+        ].
+        "
+         this error is triggered, if the compilation of a lazy method
+         failed - this happens for example, if a lazy methods code has been
+         changed in a fileBrowser without checking the code for syntactical
+         correctnes, or if the instvars of an autoloaded classes superclass 
+         have been changed without changing the subclasses code ...
+         You should enter the SystemBrowser on this method, and try accepting 
+         to see what the problem is.
+         The methods class is found in the local 'class',
+         the selector is found in the local 'selector'.
 
-	 As a general rule: never edit autoloaded classes from anything
-	 except the browser - to check that they work and are compilable.
-	"
-	^ CompilationFailedSignal raiseRequestWith:self
-				  errorString:('compilation of lazy method ' , spec , ' failed')
+         As a general rule: never edit autoloaded classes from anything
+         except the browser - to check that they work and are compilable.
+        "
+        ^ CompilationFailedSignal raiseRequestWith:self
+                                  errorString:('compilation of lazy method ' , spec , ' failed')
     ].
 
     "
@@ -157,10 +157,10 @@
     ObjectMemory flushCaches.
 
     ^ self valueWithReceiver:(sender receiver)
-		   arguments:(sender args)
-		    selector:(sender selector)
-		      search:nil
-		      sender:nil
+                   arguments:(sender args)
+                    selector:(sender selector)
+                      search:(sender searchClass)
+                      sender:nil
 ! !
 
 !LazyMethod methodsFor:'queries'!
@@ -182,6 +182,6 @@
 !LazyMethod class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/LazyMethod.st,v 1.27 1999-07-07 17:41:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/LazyMethod.st,v 1.28 1999-10-07 16:43:29 cg Exp $'
 ! !
 LazyMethod initialize!