home *** CD-ROM | disk | FTP | other *** search
- /* An example of using the dissidents rx_intui.library TIMEOUT feature */
-
- wind=GetWindow('Time Out',,,,640,75,,,)
- IF wind == '' | wind == 0 THEN SAY 'Window open error'
-
- /* Let's ask for a TIMEOUT of 1 sec */
- err=SetTime(wind,10)
-
- /* Loop until CLOSEWINDOW. Print # of timeouts. Note that every 2 seconds */
- /* a new timeout total appears. Also, note that if the user makes this */
- /* window inactive, then the updates stop. This is because we didn't ask */
- /* to receive INACTIVEWINDOW and ACTIVEWINDOW, and set and clear NO_SLEEP */
- /* when receiving each respectively. */
- class = 1
- time = 1
- DO WHILE class > 0
- spec=WaitMsg(wind)
- PARSE var spec class part1 part2 part3
-
- /* Only do this part if a timeout event */
- IF class = 10 THEN DO
- /* When we get up to 20 timeouts, disable the feature */
- IF time == 20 THEN err=SetTime(wind,)
- /* Increment the # of timeouts and print the value */
- err=Text('# of timeouts = 'time,wind,5,40)
- time=time+1
- END
-
- END
-
- err=EndWindow(wind)
-