Ah, yes... the systimer event handler is the only way to go here.

Basically,

1) you implement the body of your loop as a monadic verb which ignores
its y argument. Let's call that verb xyzzy.

2a) You define sys_timer_z_=: xyzzy

2b) You decide on a polling interval -- lets say 1234 milliseconds,
and you set it to running using the wd timer mechanism: wd 'timer
1234' (You'll want to use a shorter interval once you're confident
that things work right. But it's probably good to start slow.)

https://code.jsoftware.com/wiki/Guides/Window_Driver/Event_Handling
https://code.jsoftware.com/wiki/Guides/Window_Driver/Command_Reference

Note that debugging this can be interesting, because of how errors
will interfere with what you are trying to do to debug it. So the
first time you run into a problem you'll probably have to shut down J
(make sure your work is saved in scripts), and then after that you'll
probably want to start working with techniques for regaining control
and/or extracting useful information to isolate the errors. (Not
complicated / still needs experience and understanding.)

But this should at least get you started.

Good luck,

-- 
Raul

On Sat, Jan 2, 2021 at 5:32 PM cilz <[email protected]> wrote:
>
> HI Raul,
>
> As I tried to explain in my previous posts -though sorry for my not so
> good english- I want to display something and then refresh this display
> if a condition is not met. That's the reason why I thought to use a
> "while" loop. But as Bob has shown on his example on SO, the while loop
> holds the display until the loop ends. For me this is an unexpected
> behaviour... Here where I am...
>
> Should I say that I would like this solution to run inside jqt as well
> as jconsole if possible.
>
> Thanks, Eric
>
> Le 02/01/2021 à 23:22, Raul Miller a écrit :
> > What is the problem that you're trying to solve here?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to