[REBOL] Re: VID question: global words
From: robert:muench:robertmuench at: 4-Nov-2002 17:14
> -----Original Message-----
> From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
> On Behalf Of Romano Paolo Tenca
> Sent: Monday, November 04, 2002 1:50 PM
> To: [rebol-list--rebol--com]
> Subject: [REBOL] Re: VID question: global words
> It is correct, because in this example f1 f2 f3 are set words
> linked to the context system/words. If you pass to Layout
> words linked to another context (user defined), layout will
> use that user defined context.
Hi, ok. That's what I assumed. Ok, what to do if I want to mix words
from different contexts in one layout:
A: context [a: none]
B: context [b: none]
a/a: field "a/a"
b/b: field "b/b"
c: field "C"
IIRC a/a can't be used in layout.
> In Rebol it is better to think in term of contexts not of
> words: the question is what is the context to which is linked
> the set word f1:?
Yep, still to many years C++ programming ;-)).
> Layout will use that context. Here I pass a
> word linked to an object context and Layout will use that context.
> o: context [f1: none layout [f1: button]]
> type? o/f1;==object!
Ok, but for this you have to create layout within the context of the
object as well. IMO there is no necessarly a direct relation between an
object and a layout.
> The word box2/f1 does not exists: has not been created.
Ups, sorry I used a bad syntax here. I just want to referr to the second
f1 definition not the first :-(. But now I think the global word f1 will
be set to a new value.
> First, you must create it with the 'with expression:
> Layout will create and bind the words for you.
Hell, this is quite complicated. Thansk for the answer, I have to read
it some more times and pay around with it. Robert