[ENH] BlockFullPrintOn-LC (additional comments)

Doug Way dway at riskmetrics.com
Tue Nov 11 22:25:38 UTC 2003


(I lost the extra description which I meant to attach to the previous 
posting, here it is...)

I've always wanted to see this changeset get in, too.  Although version 
1 doesn't include the other changes which let the new print string show 
up in inspectors.  (Also, I'm unclear on how the existing #fullPrintOn: 
is used.)

So I created a v2 which modifies BlockContext>>printOn: so that a 
truncated print string for blocks shows up everywhere, in inspectors, 
explorers, etc.  Even in the debugger stack, which I hadn't anticipated, 
but it's kind of neat (although it may be too much information there, 
and it could always be removed).  Here's what a debugger stack looks 
like with this change... note the block descriptions mixed in:

NewHandleMorph(Object)>>halt
NewHandleMorph(EllipseMorph)>>drawOn:
FormCanvas(Canvas)>>draw:
FormCanvas(Canvas)>>drawMorph:
[] in NewHandleMorph(Morph)>>fullDrawOn: {[(aCanvas isVisible: self 
bounds)   ifTrue: [aCanvas drawMorph: self].  self...]}
FormCanvas>>roundCornersOf:in:during:
FormCanvas(Canvas)>>roundCornersOf:during:
NewHandleMorph(Morph)>>fullDrawOn:
FormCanvas(Canvas)>>fullDraw:
FormCanvas(Canvas)>>fullDrawMorph:
[] in WorldState>>drawWorld:submorphs:invalidAreasOn: {[:r |  rectToFill 
:= r.  i := 1.  [rectToFill isNil   or: [i > n]]   whileFa...]}
Rectangle>>allAreasOutsideList:startingAt:do:
Rectangle>>allAreasOutsideList:do:
[] in WorldState>>drawWorld:submorphs:invalidAreasOn: {[:dirtyRect | 
dirtyRect   allAreasOutsideList: validList   do: [:r |     rec...]}
Array(SequenceableCollection)>>do:
WorldState>>drawWorld:submorphs:invalidAreasOn:
[] in WorldState>>displayWorld:submorphs: {[worldDamageRects := self     
drawWorld: aWorld     submorphs: submorphs    ...]}
FormCanvas>>roundCornersOf:in:during:
FormCanvas(Canvas)>>roundCornersOf:during:
WorldState>>displayWorld:submorphs:
PasteUpMorph>>privateOuterDisplayWorld
PasteUpMorph>>displayWorld
[] in WorldState>>displayWorldSafely: {[aWorld displayWorld]}
BlockContext>>on:do:
---------------

#printOn: is mildly inefficient in that it converts back and forth from 
a stream to a string, but that's probably okay.

- Doug


dway at riskmetrics.com wrote:

>from preamble:
>
>"Change Set:		BlockContext-fullPrintOn
>Date:			6 January 2002
>Author:			Leandro Caniglia and Doug Way
>
>dew: V2, modifies BlockContext>>printOn: as well so that a truncated
>decompiled block appears in all inspectors, etc.
>
>md: Markus Gaelli digged this up from the past. I have not yet looked at
>it
>     at all, but I think something like this would be nice to add. ns is
>Sheldon 
>     Nicholl, see
>    
>http://lists.squeakfoundation.org/pipermail/squeak-dev/1998-January/0069
>47.html
>
>This change set implements the BlockContext>>fullPrintOn: method. It is
>especially useful when combined with the fullPrintOnInspector GOODIE,
>that replaces the use of printString in inspectors with that of
>fullPrintString.
>
>Full credit to 'ns' (don't remember who's she/he?) for the
>decompileBlock: method.
>"!
>
>  
>
>------------------------------------------------------------------------
>
>
>  
>





More information about the Squeak-dev mailing list