changed: #receiverPrintString
authorClaus Gittinger <cg@exept.de>
Mon, 22 Oct 2012 10:19:29 +0200
changeset 14413 7acfc6568d15
parent 14412 711e16a1c8d2
child 14414 5966c2554334
changed: #receiverPrintString care for name of wrapped method's original when printing (it's not in the methodDict, so its inheritance is shown as 'NONE')
Context.st
--- a/Context.st	Sat Oct 20 22:54:26 2012 +0200
+++ b/Context.st	Mon Oct 22 10:19:29 2012 +0200
@@ -1737,6 +1737,21 @@
         "
         (selector ~~ #doIt and:[selector ~~ #doIt:]) ifTrue:[
             implementorClass := self methodClass.
+            implementorClass isNil ifTrue:[
+                "
+                 kludge for the frame called by a wrappedmethod;
+                 the wrappedmethod is in the class, so its mclass is correct.
+                 however, the originalmethod is invoked via performMethod, and its mclass
+                 is nil. Care for this here. Think about keeping the mclass in the original method.
+                "
+                method isWrapped ifFalse:[
+                    WrappedMethod allInstancesDo:[:wrapped |
+                        wrapped originalMethodIfWrapped == method ifTrue:[
+                            implementorClass := wrapped mclass.
+                        ].
+                    ].
+                ]
+            ].
         ].
 
         implementorClass notNil ifTrue: [
@@ -2451,7 +2466,7 @@
 !Context class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.174 2012-08-05 16:22:41 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.175 2012-10-22 08:19:29 cg Exp $'
 !
 
 version_SVN