Aug 2007
More REBOL 3 Hype
26-Aug-2007 00:55 Filed in: REBOL 3
If you've worked with VID under REBOL 2, you know it
takes quite a bit of code to, say, attach a scroller
to a text area. VID under REBOL 2 knows nothing about
the relationship between a text area and a scroller,
and so you have to construct the mechanics to
translate the scroller position to a y-position in
the text-area and update it correctly.
The way VID is constructed under REBOL 3 allows the output value from one face to be attached to another face in a startlingly simple fashion. A new feature of each face is to process events from other faces and act on these data in any way that suits the face. This value is the same one as you get with GET-FACE. While this part is not yet complete, I think I can show this example:
ATTACH works on values that make sense. For FIELD, it shows the percentage value. For a scroll-panel, it scrolls it, etc.
This is all you need for a simple coupling!
But, even simpler, you can attach relatively to the two previously stated faces:
And now the progress bar will move as the slider moves. Simple!
(The LAYOUT function has been built into VIEW, so you don't have to type that anymore either.)
That's it for now.
The way VID is constructed under REBOL 3 allows the output value from one face to be attached to another face in a startlingly simple fashion. A new feature of each face is to process events from other faces and act on these data in any way that suits the face. This value is the same one as you get with GET-FACE. While this part is not yet complete, I think I can show this example:
l: layout [
a: slider
b: field
]
attach b a
view l
ATTACH works on values that make sense. For FIELD, it shows the percentage value. For a scroll-panel, it scrolls it, etc.
This is all you need for a simple coupling!
But, even simpler, you can attach relatively to the two previously stated faces:
view [progress slider attach]
And now the progress bar will move as the slider moves. Simple!
(The LAYOUT function has been built into VIEW, so you don't have to type that anymore either.)
That's it for now.
|
New skin again
25-Aug-2007 23:58 Filed in: Blog