[ALLY] loops & events ?
From: olivier::auverlot::ac-lille::fr at: 3-Aug-2000 17:28
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01BFFD70.4DBC1700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I want to make a window with two buttons. The first ("START") is running a loop (1,2,3,4,...).
The second ("STOP") is stopping this work.
How can i do this ???
REBOL []
a: 0
view layout [
button "Start" [
continuer: true
print "start"
until [
a: a + 1
print a
(continuer = false)
]
]
button "Stop" [
print "stop"
continuer: false
]
]
Regards
Olivier ;-)
------=_NextPart_000_0005_01BFFD70.4DBC1700
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I want to make a window with two buttons. The first
("START") is running a loop (1,2,3,4,...). The second ("STOP") is stopping this
work.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>How can i do this ???</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><BR>REBOL []</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>a: 0</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>view layout [<BR> button "Start"
[<BR> continuer: true<BR> print
start
<BR> until [ <BR> a: a +
1<BR> print a<BR> (continuer false)<BR> ]<BR> ]</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> button "Stop" [<BR> print
stop
<BR> continuer: false<BR> ]<BR>]<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Olivier ;-)</FONT> </DIV></BODY></HTML>
------=_NextPart_000_0005_01BFFD70.4DBC1700--