Print methods: Show message sends as Class >> #selector (with the #),
so we can easily selecte the printed text and browse by clicking
ALT-B.
--- a/BlockContext.st Tue Nov 04 10:14:02 2008 +0100
+++ b/BlockContext.st Tue Nov 04 10:14:09 2008 +0100
@@ -171,34 +171,33 @@
return something useful, even in case internals of the system
got corrupted ... (i.e. avoid messageNotUnderstood here)"
- |cls who mHome m className sel
- method homeSel|
+ |cls who mHome m className sel homeSel|
(home isNil or:[home isContext not]) ifTrue:[
- "
- mhmh - an optimized blocks context
- should get the block here, and get the method from
- that one ...
- ... but in 2.x, there is no easy way to get to the block
- since that one is not in the context.
- Starting with 3.x, the new block calling scheme will fix this.
- "
+ "
+ mhmh - an optimized blocks context
+ should get the block here, and get the method from
+ that one ...
+ ... but in 2.x, there is no easy way to get to the block
+ since that one is not in the context.
+ Starting with 3.x, the new block calling scheme will fix this.
+ "
- "temporary kludge - peek into the sender context.
- If its a do-like method and there is a single block variable
- in the args or temporaries, that must be the one.
- This helps in some cases.
- "
- m isNil ifTrue:[
- ^ '[] (optimized) in ???'.
- ].
- ^ '[] (optimized) in ' , m mclass name , '-' , m selector.
+ "temporary kludge - peek into the sender context.
+ If its a do-like method and there is a single block variable
+ in the args or temporaries, that must be the one.
+ This helps in some cases.
+ "
+ m isNil ifTrue:[
+ ^ '[] (optimized) in ???'.
+ ].
+ ^ '[] (optimized) in ' , m mclass name , ' >> #' , m selector.
].
mHome := self methodHome.
mHome isNil ifTrue:[
- 'BlockContext [warning]: no methodHome' errorPrintCR.
- ^ '[] in ???'
+ 'BlockContext [warning]: no methodHome' errorPrintCR.
+ ^ '[] in ???'
].
"
@@ -206,34 +205,34 @@
"
((homeSel := mHome selector) == #doIt
or:[homeSel == #doIt:]) ifTrue:[
- sel := #doIt.
- cls := mHome receiver class.
+ sel := #doIt.
+ cls := mHome receiver class.
] ifFalse:[
- m := mHome method.
- m isNil ifTrue:[
- 'BlockContext [warning]: no method' errorPrintCR.
- ^ '[] in ???'
- ].
- who := m who.
- who notNil ifTrue:[
- cls := who methodClass
- ] ifFalse:[
- cls := receiver class.
- ].
- sel := homeSel printString.
+ m := mHome method.
+ m isNil ifTrue:[
+ 'BlockContext [warning]: no method' errorPrintCR.
+ ^ '[] in ???'
+ ].
+ who := m who.
+ who notNil ifTrue:[
+ cls := who methodClass
+ ] ifFalse:[
+ cls := receiver class.
+ ].
+ sel := homeSel printString.
].
cls isNil ifTrue:[
- 'BlockContext [warning]: no home class' errorPrintCR.
- className := '???'
+ 'BlockContext [warning]: no home class' errorPrintCR.
+ className := '???'
] ifFalse:[
- className := cls name.
- className isNil ifTrue:[
- 'BlockContext [warning]: nameless class' errorPrintCR.
- className := '???'
- ]
+ className := cls name.
+ className isNil ifTrue:[
+ 'BlockContext [warning]: nameless class' errorPrintCR.
+ className := '???'
+ ]
].
- ^ '[] in ' , className , '-' , sel
+ ^ '[] in ' , className , ' >> #' , sel
"Modified: 10.1.1997 / 21:26:21 / cg"
! !
@@ -241,5 +240,5 @@
!BlockContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.31 2008-09-15 17:59:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/BlockContext.st,v 1.32 2008-11-04 09:14:09 stefan Exp $'
! !