[BUG] StringMorph needs textColor inst var and uses color inst var wrongly?

Ken Causey ken at ineffable.com
Fri May 3 21:44:03 UTC 2002


/me replies to himself.

So okay, I decide to play with fixing this.  Add an inst var of
textColor, add lazy init getter and setter.  Modify drawOn: and whoops! 
my image is locked and alt-. doesn't help.  Clearly I've swept the rug
out from under a host of existing StringMorphs in my image.

So, how do I go about making this sort of change?  I can't at the moment
see how to modify the image and not having StringMorph instances active.

Ken

On Fri, 2002-05-03 at 16:09, Ken Causey wrote:
> I'm playing around and try some code like:
> 
> (s _ SystemWindow labelled: 'Boogah')
> 	openInHand.
> s addMorph: (StringMorph new
> 		contents: 'Comments:';
> 		color: Color black)
> 	frame: (0 at 0.0 corner: 1 at 0.2).
> 
> And I don't see any StringMorph in the window.  I start looking around
> and find that the color is set to transparent.  Which would be find
> except that StringMorph uses color as it's text color, not the primary
> (i.e. background) color.  Seems to be this is incorrect.  Shouldn't
> there be a textColor attribute used as the color to draw the text and
> color be used as the background color?
> 
> Ken
> 
> 





More information about the Squeak-dev mailing list