[REBOL] Re: tool for resizable windows posted
From: brett:codeconscious at: 1-Jun-2001 14:27
Hi Volker,
> Found nice trick to make a layout with locals:
> context[
> system/words/lay: layout [t1: area]
> lay/data: self
> ]
> now lay/data/t1 is unique for every layout :)
This should be it think:
o: context[
t1: none ; <--- Need this
system/words/lay: layout [t1: area]
lay/data: self
]
I seem to recall a post some time ago warning about changing the 'data field
of a face. Perhaps something about it being a reserved use of VID. But I
can't remember exactly :-/
For interest you could also do something convoluted like this (because
layout returns a face which is a type of object!):
sc: context [
lo: make layout [
t1: button "print data" [print
face/parent-face/special-context/context-data]
] [ special-context: none]
context-data: "Testing"
]
sc/lo/special-context: sc
view sc/lo
Regards,
Brett