[REBOL] Re: Executing one action while another is still active.
From: carl::cybercraft::co::nz at: 23-Feb-2002 11:31
On 23-Feb-02, alan parman wrote:
> Is there a way (perhaps with DETECT) to get View to do one faces
> action while another faces action is still "working".
> Specifically, I need something that will kill a currently executing
> action, something like hitting the "ESC" key in many programs.
> If an action is taking too long I want to stop it "mid stream".
> Pseudo code:
> sensor keycode escape [stop any currently active actions]
I generally use 'feel and 'engage to control things independently in
View. ie...
counter: 1
view layout [
b1: box
b2: box rate 10 feel [engage: [
; This is executed 10 times a second. See 'rate in the
; previous line.
b1/color: random 255.255.255 show b1
if counter [
counter: counter + 1
if counter > 5 [
counter: 1
b2/color: random 255.255.255 show b2
]
]
]]
button "Stop" [counter: none]
button "Start" [counter: 5]
]
HTH.
--
Carl Read