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

[REBOL] Re: Newbie question for today

From: antonr:iinet:au at: 7-Oct-2003 12:19

How about this: do-scan?: yes view/new lay: layout [ button "scan on" [do-scan?: yes] button "scan off" [do-scan?: no] ] ;;; <- (insert feel code, below) forever [wait [0:0:3] print now if do-scan? [print "do scan"]] 7-Oct-2003/12:12:13+10:00 do scan 7-Oct-2003/12:12:16+10:00 do scan ;;;; <--- here I pressed "scan off" button 7-Oct-2003/12:12:19+10:00 7-Oct-2003/12:12:22+10:00 7-Oct-2003/12:12:25+10:00 ... You would need to catch the close event of the window and turn the scan off or break the forever loop anyway. lay/feel: make lay/feel [ detect: func [face event][ if event/type = 'close [ do-scan?: no ] event ; return the event so it can be processed ] ] Anton.