--- a/Context.st Fri Oct 28 02:21:17 1994 +0100
+++ b/Context.st Fri Oct 28 02:21:37 1994 +0100
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Context.st,v 1.19 1994-10-10 00:20:00 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Context.st,v 1.20 1994-10-28 01:21:37 claus Exp $
'!
!Context class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Context.st,v 1.19 1994-10-10 00:20:00 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Context.st,v 1.20 1994-10-28 01:21:37 claus Exp $
"
!
@@ -158,7 +158,7 @@
selector and same arguments to the same receiver before.
Used to detect recursive errors or recursive printing - for example."
- |c rec numArgs "{Class: SmallInteger }"|
+ |c rec "numArgs" "{Class: SmallInteger }"|
rec := 0.
c := self sender.
@@ -171,13 +171,13 @@
the method, but the class, in which the search started ...
"
(c searchClass whichClassImplements:selector) == (self searchClass whichClassImplements:selector) ifTrue:[
-"/ "
-"/ finally, look for different arguments
-"/ "
-"/ numArgs := self numArgs.
-"/ 1 to:numArgs do:[:argIndex |
-"/ (self argAt:argIndex) == (c argAt:argIndex) ifFalse:[^ false]
-"/ ].
+"/ "
+"/ finally, look for different arguments
+"/ "
+"/ numArgs := self numArgs.
+"/ 1 to:numArgs do:[:argIndex |
+"/ (self argAt:argIndex) == (c argAt:argIndex) ifFalse:[^ false]
+"/ ].
^ true
]
].
@@ -381,28 +381,30 @@
printReceiver
"print the receiver of the context - used for MiniDebugger only"
- |class implementorClass|
+ self receiverPrintString print.
+
+"/ |class implementorClass|
- class := receiver class.
- (class == SmallInteger) ifTrue:[
- '(' print. receiver print. ') ' print
- ].
- class name print.
+"/ class := receiver class.
+"/ (class == SmallInteger) ifTrue:[
+"/ '(' print. receiver print. ') ' print
+"/ ].
+"/ class name print.
- selector notNil ifTrue:[
- implementorClass := self searchClass whichClassImplements:selector.
- implementorClass notNil ifTrue: [
- (implementorClass ~= receiver class) ifTrue: [
- '>>>' print.
- implementorClass name print
- ]
- ] ifFalse:[
- self searchClass ~~ receiver class ifTrue:[
- '>>>' print. self searchClass name print
- ].
- '>>>**NONE**' print
- ]
- ]
+"/ selector notNil ifTrue:[
+"/ implementorClass := self searchClass whichClassImplements:selector.
+"/ implementorClass notNil ifTrue: [
+"/ (implementorClass ~= receiver class) ifTrue: [
+"/ '>>>' print.
+"/ implementorClass name print
+"/ ]
+"/ ] ifFalse:[
+"/ self searchClass ~~ receiver class ifTrue:[
+"/ '>>>' print. self searchClass name print
+"/ ].
+"/ '>>>**NONE**' print
+"/ ]
+"/ ]
!
fullPrint
@@ -422,10 +424,11 @@
receiverPrintString
"return a string describing the receiver of the context"
- |newString receiverClassName implementorClass|
+ |receiverClass receiverClassName newString implementorClass|
- receiverClassName := receiver class name.
- (receiver class == SmallInteger) ifTrue:[
+ receiverClass := receiver class.
+ receiverClassName := receiverClass name.
+ (receiverClass == SmallInteger) ifTrue:[
newString := '(' , receiver printString , ') ' , receiverClassName
] ifFalse:[
newString := receiverClassName
@@ -434,12 +437,12 @@
selector notNil ifTrue:[
implementorClass := self searchClass whichClassImplements:selector.
implementorClass notNil ifTrue: [
- (implementorClass ~~ receiver class) ifTrue: [
+ (implementorClass ~~ receiverClass) ifTrue: [
newString := newString , '>>>',
implementorClass name printString
]
] ifFalse:[
- self searchClass ~~ receiver class ifTrue:[
+ self searchClass ~~ receiverClass ifTrue:[
newString := newString , '>>>' , self searchClass name
].
newString := newString , '>>>**NONE**'