[squeak-dev] Where's the border?

Bert Freudenberg bert at freudenbergs.de
Fri Oct 3 17:25:19 UTC 2008


Am 03.10.2008 um 08:55 schrieb Trygve Reenskaug:

> Two simple examples executed in a Workspace:
>
> | butt |
> butt := StringMorph contents: 'Play'.
> butt borderWidth: 5; borderColor: Color red.
> butt openInWorld
>
> | butt |
> butt := Morph new.
> butt borderWidth: 5; borderColor: Color red.
> butt openInWorld
>
> Plain Morph displays border as expected.
> The StringMorph has no border! (Inspecting it, I find that its  
> extension has a SimpleBorder, width = 5 and color = red. Yet it  
> doesn't show)
>
> What's happening?

StringMorph>>drawOn: does no super send.

> (Squeak Squeak3.10.gamma.7159.image)
>
> And I thought I was beginning to understand Morphic :-(

Morphic prefers compositing complex objects over having one object do  
complex things. So embed a String into a Morph to get a bordered String.

- Bert -



More information about the Squeak-dev mailing list