[snip]
Andrew's explanation probably answers this one. Incidentally, if the scores are 1000, 100, 10, and
1, then the 1 does not appear right-justified >in your example since there is (see TextMorph>>fit) a minimum size for TextMorphs. Using #contentsWrapped: instead of #contents: and >adding #rightFlush will correct this.
Thanks - I read too much into the name #contentsWrapped and didn't look at the comments. #contents forwards to #contentsAsIs which disables autolayout. #contentsWrapped allows auto layout.
Do you have any pointers on where to start exploring the layout code?
The names are editable, the scores are not. (why?)
Well, they are editable in my system, but then I dug around a bit and found I had "fixed" this
problem before. TextMorphs seem to think they >have an unlimited width and thus the first one on the line will answer true to #containsPoint: and the second one never sees it. My change is:
TextMorph>>containsPoint:
containsPoint: aPoint
(super containsPoint: aPoint) ifFalse: [^false]. self startingIndex > text size ifTrue: ["make null text frame visible" ^ super containsPoint: aPoint]. ^ self paragraph containsPoint: aPoint
Have you submitted this change to Squeak Central for inclusion in 2.3?
-david
squeak-dev@lists.squeakfoundation.org