[previous discussion snipped]
OK - perhaps I simplified it too much. Attached is a small changeset that adds a HallOfFame class for recording top scores for games. It has been spliced into Tim Olson's SameGame. In the class comment for HallOfFame is some code that will display 4 rows of hall of fame with varying length strings for the names and scores.
The names are all left justified (expected), the scores are all right justified. (why?) The names are editable, the scores are not. (why?)
I get the same results in 2.2 and 2.3Beta. There are some methods with the suffix "old" that provide more complicated experiments versions. I modeled this on Scott's Preferences panel (ok, I started with his code). I was trying to get the scores to right justify to no avail and finally ended up with this very simple version that justifies correctly but I don't understand why.
Content-Type: application/octet-stream; name="joel.27Dec1125am.cs" Content-Disposition: attachment; filename="joel.27Dec1125am.cs"
Attachment converted: Anon:joel.27Dec1125am.cs (????/----) (00005A17)
[previous discussion snipped]
OK - perhaps I simplified it too much. Attached is a small changeset that adds a HallOfFame class for recording top scores for games. It has been spliced into Tim Olson's SameGame. In the class comment for HallOfFame is some code that will display 4 rows of hall of fame with varying length strings for the names and scores.
The names are all left justified (expected), the scores are all right justified. (why?) The names are editable, the scores are not. (why?)
Same answer as before -- if you look at the morphs in the world (open Drop'NDrag and start manipulating them), you'll see that you have three morphs in a box, two with text of fixed length, and one of varying size in between them that fills the rest of the space. As noted, the text aren't justified in their respective boxes, they are moved to the outer corners of the box by the inside spacer.
As noted, for the phrase "justification" to mean anything with respect to a piece of text, you must specify also an area of (at least temporarily) fixed width in which the text is to reside.
Bob's example performs as indicated.
squeak-dev@lists.squeakfoundation.org