[REBOL] Re: Curious results
From: fsievert:uos at: 30-Jul-2001 9:37
> Here are 2 short scripts, almost identical, but
> with different results, and which raise questions
> of their own. Only the order of display changes.
>
> 1. Why does 'view lay' show 'Problem!' inside each
> box?
>
> ;example 1
> REBOL [Title: "Problem!"]
> lay: layout [ across b: box red c: box green]
> view b
> view c
> view lay
View sets c/text to the title of the script. The "text"-facet is used for
the title of a window. If you use b or c as a normal face after that, you
will see the text in the face.
> 2. What happens to red and green for b and c?
>
> ;example 2
> REBOL [Title: "Problem!"]
> lay: layout [ across b: box red c: box green]
> view lay
> view b
> view c
faces, which are used as a window should habe parent-face = none. After
the first 'view - command, they are set to the lay-face.
>> win-offset? b
== 128x20
(This shows: rebol will render the green/red color not at 0x0, but at
128x20. Since the face is not great enough, you don't see it.
This will fix it:
b/parent-face: none
c/parent-face: none
>> win-offset? b
== 0x0
Hope that helps,
Frank