[REBOL] RFC: VID & formulars
From: robert::muench::robertmuench::de at: 12-Feb-2002 14:38
Hi, IIRC I mentioned/asked this a time ago but my knowledge of VID might not
have been good enough. So here is goes again. Let's use the following code as an
example...
dialog: [
across
button "1" [b1/offset/y: b1/offset/y + 20 show dialog]
button "2" [monitor system/words]
return
b1: box 20x20 coal
b2: box 20x20 coal
do [b2/offset/y: b1/offset/y + b1/size/y]
]
The line in the do [...] block does evaluate the pair! value and assigns it as
soon as this line is processed. So there is not the formular attached but
instead a static value!
What I would like to have is a way that I can either set a pair! value in this
case or the formular. If VID is redrawing the face, than the formular will be
evaluated again too. This would make it possible to change b1/offset/y and have
b2 move with it without having to remember to reposition b2 by hand.
There are two levels possible:
Easy: I have to show the faces manually so that all get updated. This is much
the same as moving the depending face by hand but it would free me to remember
about all the housekeeping funckions to call. I could just use show XYZ and the
formulars would be evaluated.
Hard: Have VID do the work for us. As soon as I change b1/offset/y VID
recognizes, that there is a contraint at b2/offset/y that dependes on
b1/offset/y and recalculates the value, sets the face to dirty and redraws
everything that is needed. This would make it necessary to have a
constraint-solver.
I hope you understand what I mean.
Is there a way to get such a kind of functionality through an other way? How
could it be done else?
--
Robert M. Münch
IT & Management Freelancer
Mobile: +49 (0)177 2452 802
Fax : +49 (0)721 8408 9112
Web : http://www.robertmuench.de