Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Timer Events

From: DNess:comcast at: 23-Jul-2003 10:31

I have a piece of REBOL code which generally does what I want except that I would like to refresh the image with new data once per second or so. I have simplified the code down to this representation ;---------------------REBOL Code Follows----------------------- REBOL [ Comment: {<$Demo of Timer Problem - Ver DN-2A(2) - [KKD-VIPD]$>} Title: "Demo of Timer Problem" Date: 2003-07-20 Version: 1.0.0 File: %problem.r Author: "David Ness" Purpose: "Shows my problem with Timers" Email: [DNess--Comcast--Net] Category: [view VID 2]] DataBox: [[9:30:00 "IST"] [4:00:00 "UTC"] [-3:00:00 "PDT"] [0:00:00 "EDT"]] ReFact: func[/local Facts a][Facts: [] foreach [line] DataBox [a: now + line/1 append/only Facts reduce to-list ["Test" a/time line/2 a/date]] return Facts] BoxSize: to-pair append [380] 30 * length? DataBox lay: layout [ style txtb text bold with [font: [color: black shadow: none size: 20]] backcolor pink list BoxSize[ across txtb blue shadow 0x1 60 center txtb 100 right txtb tan 50 center txtb 120 return] data ReFact ] view lay ;----------------------End of REBOL Code--------------------------- This works fine, but (obviously) only displays once. I'd like to have it re-fresh every second so I have tried adding: rate 1 feel [engage: func [face act evt][]] various places with various arguments, and so far all have failed to work. I am also at a loss what sort of definition to give in the func[...][....] as I don't seem to have a `face' involved in responding to the timer events. I think I have read most of the documentation associated with this, but would appreciate any pointers and/or clues that might be offered...