Bill, I tried your approach and saw no improvement. But I noticed that I got my keystrokes back when I reloaded the application and that made me review the _run verb. I noticed the sentence below and added it to the end of the paint verb.
wd' setfocus g' That seems to have done the trick. So unless more testing uncovers another problem, maybe that solves my problem. Btw, the way I used your sys_timer_z_ is outlined next. delay=: 6!:3 DELAY=: 0.2 NB. in paint '' NB. wd'timer 500' NB. .... NB. wd'timer 0' sys_timer_z_=: monad define delay DELAY ) Thanks, so much, > > Brian, > > 'paint verb' is a verb that will be executed when a 'paint event' occur, so > that 'try 500' should be directly call 'paint verb' 500 times but to > make 'paint event' to happen 500 times. For each time 'paint event' > occurs, the os (not you yourself) wll call that 'paint vern'. > > A simple example of using timer. (not work under jconsole) > > NB. a global noun > ntry__=: 10 > > NB. things to do in each step > sys_timer_z_=: 3 : 'smoutput ntry__=:<:ntry__' > > NB. start timer, sys_timer_z_ will be executed every 5000ms (5 second) > wd 'timer 5000' > > NB. and you wait, and will see it print and decrement ntry each 5 sec > > NB. the timer will never stop, to stop the timer, you type > > wd 'timer 0' > > or you can change sys_timer so that it only executes for a fixed > number of times. > > sys_timer_z_=: 3 : 0 > if. 0=ntry__ do. wd 'timer 0' return. end. > smoutput ntry__=:<:ntry__ > ) > > -- > regards, > -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
