Hi fivewinners.
Any idea on how to automatically refresh a xbrowse after a few minutes of inactivity (no key stroke)
Any help will be appreciated
Thanks in advance
From Chile
Adolfo
Automatic xbrowse refresh
Automatic xbrowse refresh
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
Re: Automatic xbrowse refresh
Hi ,
You can look at TIMER
DEFINE TIMER oTmr INTERVAL 6000 ACTION (oLbx:Refresh()) OF oWnd
ACTIVATE TIMER oTmr
You can look at TIMER
DEFINE TIMER oTmr INTERVAL 6000 ACTION (oLbx:Refresh()) OF oWnd
ACTIVATE TIMER oTmr
Re: Automatic xbrowse refresh
You have also setidleactin({||UDF()})
TestIdle.prg
TestIdle.prg
- armando.lagunas
- Posts: 340
- Joined: Mon Oct 05, 2009 3:35 pm
- Location: Curico-Chile
- Contact:
Re: Automatic xbrowse refresh
Adolfo:
yo lo hago en una window..
se actualiza cada 30 seg aprox.
la funcion Recargar_Datos( oBrw ), es donde realizo el proceso de carga del xbrowse...
espero de que te sirva.
Saludos
yo lo hago en una window..
se actualiza cada 30 seg aprox.
la funcion Recargar_Datos( oBrw ), es donde realizo el proceso de carga del xbrowse...
Code: Select all
static nCargo := 0
...
....
....
ACTIVATE WINDOW xWnd NORMAL ON INIT ( xWnd:Center(), GoTimer( xWnd, oBrw ) )
RETURN Nil
//-------------------------------------------------------------------------
STATIC FUNCTION GoTimer( xWnd, oBrw )
LOCAL oTmr
DEFINE TIMER oTmr OF xWnd INTERVAL 1 ACTION IIF( nCargo > 799, ( Recargar_Datos( oBrw ), nCargo := 0 ), nCargo += 1 )
ACTIVATE TIMER oTmr
RETURN Nil
//-------------------------------------------------------------------------
Saludos
Re: Automatic xbrowse refresh
Thanks to all ...
Jack
SetIdleAction() is only for 16 bits and can cause app freeze.
Armando.
I need to control the time after the last keystroke is done, not at a defined period of time
SP: Necesito controlar el tiempo despues de la ultima tecla presionada, no a un periodo de tiempo definido.
If the user is working in the xBrowse, I let him do his job because I have a routine to do it after he modiies or sees any data, but if he leaves his workplace, I'm want to refresh it after some minutes, so if he returns, he can see new or modified data.
That's the idea.
From Chile
Adolfo
Jack
SetIdleAction() is only for 16 bits and can cause app freeze.
Armando.
I need to control the time after the last keystroke is done, not at a defined period of time
SP: Necesito controlar el tiempo despues de la ultima tecla presionada, no a un periodo de tiempo definido.
If the user is working in the xBrowse, I let him do his job because I have a routine to do it after he modiies or sees any data, but if he leaves his workplace, I'm want to refresh it after some minutes, so if he returns, he can see new or modified data.
That's the idea.
From Chile
Adolfo
Ji,ji,ji... buena la cosa... "all you need is code"
http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
http://www.xdata.cl - Desarrollo Inteligente
----------
Lenovo Legion Y520, 16GB Ram, 1 TB NVME M.2, 1 TB SSD, GTX 1050
Re: Automatic xbrowse refresh
Hi,
When i start the xbrowe, i get the time() in a static / global var
When i use the on change, ik get the time in a the same static / global var
In the timer i compre the actual time with the static/gloval var and if it is too long, i do a frefresh() .
Philippe
When i start the xbrowe, i get the time() in a static / global var
When i use the on change, ik get the time in a the same static / global var
In the timer i compre the actual time with the static/gloval var and if it is too long, i do a frefresh() .
Philippe