[REBOL] Re: layout question
From: lmecir:mbox:vol:cz at: 25-Nov-2005 15:38
>First: Hi All
>these are my first step on the REBOL world, so consider me a newbie.
>In my "way to understand REBOL" i've tried to see what actually "layout" do
>so i type "source layout" and there are some line of code that i've
> new-face: make any [
> all [parent object? new new]
> all [parent word? new get-style new]
>so, it basically try to set "new-face" to the parent or parent style
>if a /parent is used right?
>why i need to type "new new" ?
this is hardly "new new". I think, that you need to know how ALL works.
Here is what is the meaning of all [parent object? new new]:
1) it checks PARENT. 2) If true, it checks, whether NEW is and object.
3) If true, it yields NEW as result.
A more understandable way of doing it might be:
new-face: make case [
all [parent object? new] [new]
all [parent word? new] [get-style new]