[REBOL] Re: View and objects?
From: rotenca:telvia:it at: 4-Oct-2002 1:13
> I have a probleme with view.
> if i make an object including a layout:
> Essai: make object! [ lay: layout [ text: field "" ]]
> Essai1: make Essai
> view/new does not display a new windows, and if i try to find a way to do
so, the values of the two text field are the >same even if they are not part
of the saée object. How can I go around this problem??
You must think to essai/lay like a pointer to an object.
Make Essai duplicates the pointer, not the object referenced by the pointer.
If you duplicate also the object referenced with something like:
make essay [lay: make lay]
The same problem arises for the object referenced by lay, which surely, being
a vid face, has pointers to others objects and so on.
A program could find all the references to objects in lay and duplicate them,
but it is not a simple solution.
For layout objects a more simple solution could be keeping the layout as a
block and recalculate it every time:
essai: context [layb: [button] lay: layout layb]
essai2: make essai [lay: layout layb]