[squeak-dev] Where's the border?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Where's the border?

Trygve
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?

(Squeak Squeak3.10.gamma.7159.image)

And I thought I was beginning to understand Morphic :-(
--Trygve

--
--

Trygve Reenskaug       mailto: [hidden email]

Morgedalsvn. 5A         http://heim.ifi.uio.no/~trygver

N-0378 Oslo               Tel: (+47) 22 49 57 27

Norway



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Where's the border?

Bert Freudenberg

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 -