[goodie] Kids' Refrigerator Magnets [FIX]

Thomas Kuehne kuehne at informatik.uni-kl.de
Wed Sep 5 10:29:57 UTC 2001


Dan,

I love the speaking magnets, what a wonderful idea.

I came across one problem though, which probably is not a problem for the most up to date squeakers but perhaps the issue is nevertheless interesting.

I am not a test pilot so I used Squeak 3.0 and after filing in everything works but after the magnets moved into position (immediately after the initial positioning) letters/numbers become invisible.

The reason for this is that the text color is set to the same color as the background color.

After a bit of tracking I found the culprit in 

Morhp>>fillStyle:
	"Set the current fillStyle of the receiver."
	self setProperty: #fillStyle toValue: aFillStyle.
	"Workaround for Morphs not yet converted"
	"color _ aFillStyle asColor."
	self changed

The workaround code -- in the case of TextMorphs has the unfortunate effect of setting the text color to the background color as well.
Removal of the one but the last line fixes the bug.

Perhaps that is worth pointing out to Squeak3.0 users who want to try your "speaking magnets" and perhaps the workaround should be reconsidered if it is still part of later Squeak versions.

Cheers,

    Thomas

P.S.: Perhaps it'll be nice if the speaker also changed the voice whenever one chooses to select a new face.

--
Dr. Thomas Kuehne
+49 178 4314387, http://www-agce.informatik.uni-kl.de/~kuehne
Experts are people who successfully calibrated their intuition. -- TK





More information about the Squeak-dev mailing list