SqueakEnd'00 & Camp Smalltalk

Scott Wallace Scott.Wallace at disney.com
Wed Mar 15 10:13:41 UTC 2000

At 3:48 AM -0700 3/14/00, John M McIntosh wrote:
>It's late (in more ways that one) But SqueakEnd'00 Sunday has been posted.

... in the midst of which one finds...

> We noted the PlugableTextMorph is named PlugableText in the debugger,
> which is a hack. There was some discussion about the Squeak Central
> fellow who did that, but he wasn't present, perhaps this could be
> fixed? This does violate the spirit of printOn: that Tim mentioned
> above, tsk tsk-

Well, speaking as that discussed "Squeak Central fellow"...

(1)  I presume that people were referring to the wording of the 
window title used on an Inspector that's looking at a morph.  This 
does not involve the Debugger and does not relate to #printOn: in any 
way, so I might be wrong, but I can't think what else it could be.

(2)  The "hack" referred to is presumably the code in Morph method 
#defaultLabelForInspector, which was designed to make the window 
titles of Inspectors on Morphs be more compact as well as more 
informative, by showing the morph's "externalName".  Among other 
things, this results in the stripping (only in Inspector window 
titles) of the ubiquitous "-Morph" suffix from class names that have 
it, a step taken in part for reasons of real-estate economy in narrow 
Inspector windows.

(3)  While one may take exception to that inspector-titling heuristic 
(and obviously some people at the SqueakEnd did), it is not a 
violation of Tim's dictum regarding avoiding the hard-coding of class 
names in #printOn: methods, because it:

      *  Does not hard-code any class name.
      *  Is totally robust in the face of subclassing.
      *  Does not involve use or reimplementation of #printOn: at all.

(4)  Having said all that, this is certainly not anything I have 
strong feelings about.  If there are only a small number of people 
who, like some of the SqueakEnders, are offended by not seeing the 
"-Morph" suffix in the titles of Inspector windows open on morphs, 
they are encouraged to remove method Morph.defaultLabelForInspector. 
If *many* people in the community turn out to be unhappy about the 
shorter Inspector titles for -Morph classes, I would have no problem 
with removing the method in question from the released image; those 
that wanted it back could maintain it in their little "personalizing" 
fileins that most of us maintain to apply personal touches to each 
released image.

  -- Scott

PS:  Just as a matter of interest, there *are* in fact a few 
violators of Tim's #printOn: dictum in the image:

PlayingCardDeck is one -- its #printOn: method gratuituously 
hard-codes the string 'aCardDeck' rather than simply letting "super 
printOn: aStream" provide the class name.

ThreePhaseButtonMorph is another.  Here, the original author (not I) 
chose to save real-estate by printing out a short, hard-coded 
abbreviation for the lengthy class-name, an expedient that I left 
unchanged when I touched this method for other reasons.  This 
obviously doesn't hold up for subclasses.

TrashCanMorph is a third -- indeed it reimplements printOn: to 
circumvent the unrobust implementation of #printOn: in its 
superclass, the very ThreePhaseButtonMorph referred to above.

PPS:  Thank you, John McIntosh, for the very informative and readable report.

More information about the Squeak-dev mailing list