Mantis - Squeak
|Viewing Issue Advanced Details|
|ID:||Category:||Severity:||Reproducibility:||Date Submitted:||Last Update:|
|1431||Morphic||minor||always||07-08-05 00:47||07-08-05 00:48|
|ETA:||none||Fixed in Version:|
|Summary:||0001431: [BUG] Embedded TextMorph autoFill with empty text problem!|
"John R. Pierce" <firstname.lastname@example.org>:
I uncovered a problem with TextMorph's that are embedded in Morphs with the
autofill property turned on. It seems to exhibit itself in both 3.6 and 3.7.
Basically, if the underlying text of the TextMorph gets set to an empty string,
then when the user starts typing in an empty TextMorph, the new text will not
get shown until a layoutChanged is called (and subsequent repaint cycle).
It appears TextMorph>>updateFromParagraph does call layoutChanged, but that call
doesn't seem to help. Attached is a little bit of code to see the problem:
morph := Morph new.
morph extent: 100 @ 20.
text := TextMorph new.
morph addMorph: text.
color: Color white;
"Now go try to type in the TextMorph and see what I mean"
"Then run the following code to get the TextMorph to re-display the new text"
morph invalidRect: morph bounds. "This is only necessary on 3.6"
If you use a larger embedding morph then the one I had in my sample, you will
actually see the new text showing up on the second line of the morph. This may
be a clue as to what is going on.
Lastly, I noticed this can be fixed by hacking updateFromParagraph and adding an
"ActiveWorld doOneCycle" call right after the call to "self fit" (near the top
of the method).
|Steps To Reproduce:|
|Additional Information:||Problem still present in in 3.8-6665|