[REBOL] Re: view problem - updating windows
From: carl:cybercraft at: 27-Apr-2001 20:37
On 27-Apr-01, Julia Lipman wrote:
> Hi, I'm also new to the list - having a great time using REBOL!
> I've been having trouble getting an element of a layout to update on
> its own, without clicking a button. The only script I can find that
> does it is rebcam.r, which I can't get to run without errors. Does
> anyone know of an example script or piece of documentation that
> explains how to do this?
Hi Julia,
Try this...
rebol []
n1: 0
n2: 0
view layout [
a1: text to-string n1 100
with [
rate: 1 feel: make feel [
engage: [
n1: n1 + 1
a1/text: to-string n1 show a1
]
]
]
a2: text to-string n2 100
with [
rate: 10 feel: make feel [
engage: [
n2: n2 + 1
a2/text: to-string n2 show a2
]
]
]
button "Quit" [unview]
]
Someone else will have to explain why we need 'with, 'rate, 'feel and
'engage just to achieve this as I only know how to make it work.
Which of course may mean I'm doing it wrong, but it does seem to
work... (:
--
Carl Read
[carl--cybercraft--co--nz]