hello,
I have a small program to receive data from a client.exe program via websocket.
This program is for a Customer DualDisplay POS system.
The program AbDisplay.exe receive de data but I need to refresh the getlist without clicking the button.
What I want is that when data is entered the abdisplay autorefresh the getlist.
This is possible!?
Many thanks..
AutoFresh GetList
Re: AutoFresh GetList
Why is it not possible for you to use DC_GetRefresh(GetList).
The eXpress train is coming - and it has more cars.
Re: AutoFresh GetList
Roger,
Maybe it didn't explain well..
I want a passive small program without any buttons and without user intervention.
How can i refresh the getlist without user intervention?
Edit abdisplay.prg and delete or disable the pushbutton comand and compile.
than run abdisplay.
than run cliente.exe and send a message.
The abdisplay receive the message but the getlist does not refresh the browse and the gets.
The dcbrowse have "Autorefesh" but this does not refresh the gets..
Many thanks
Maybe it didn't explain well..
I want a passive small program without any buttons and without user intervention.
How can i refresh the getlist without user intervention?
Edit abdisplay.prg and delete or disable the pushbutton comand and compile.
than run abdisplay.
than run cliente.exe and send a message.
The abdisplay receive the message but the getlist does not refresh the browse and the gets.
The dcbrowse have "Autorefesh" but this does not refresh the gets..
Many thanks
Pedro Alexandre
Re: AutoFresh GetList
Do the following:
Code: Select all
Public GetList := {}
Procedure MAIN()
LOCAL GetOptions //, GetList := {} << GetList is now PUBLIC
METHOD EchoServer:onBinary( cBinary )
xData := Bin2Var(cBinary)
IF Len( xData ) > 0
cNomeArtigo := xData[1]
nQtd := xData[2]
nPvp := xData[3]
nTotal := nQtd*nPvp
nGTotal += nTotal
aadd( aConta, {nQtd,cNomeArtigo,nTotal} )
DC_GetRefresh(GetList) // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Endif
RETURN self
The eXpress train is coming - and it has more cars.
Re: AutoFresh GetList
I had already tried this way..
[img][/[img]
[img][/[img]
- Attachments
-
- EE.jpg (42.77 KiB) Viewed 10684 times
Pedro Alexandre
Re: AutoFresh GetList
Here is a solution that will work.
This one has been tested.
I had not tested the last solution I gave you.
It appears that Xbase++ didn't like refreshing the main thread directly from the EchoClient thread.
I have had this problem in many other apps and always solved the problem by pushing an event into the thread that contains the main window.
This is done by adding the following code: (files are attached).
#define REFRESH_GETLIST xbeP_User + 100
...
Public oMainWindow
...
DCUSEREVENT REFRESH_GETLIST ACTION {||DC_GetRefresh(GetList)}
...
DCREAD GUI .. PARENT @oMainWindow
...
PostAppEvent(REFRESH_GETLIST,,,oMainWindow)
Sleep(10)
This one has been tested.
I had not tested the last solution I gave you.
It appears that Xbase++ didn't like refreshing the main thread directly from the EchoClient thread.
I have had this problem in many other apps and always solved the problem by pushing an event into the thread that contains the main window.
This is done by adding the following code: (files are attached).
#define REFRESH_GETLIST xbeP_User + 100
...
Public oMainWindow
...
DCUSEREVENT REFRESH_GETLIST ACTION {||DC_GetRefresh(GetList)}
...
DCREAD GUI .. PARENT @oMainWindow
...
PostAppEvent(REFRESH_GETLIST,,,oMainWindow)
Sleep(10)
- Attachments
-
- PedroAlex.zip
- (3.78 KiB) Downloaded 662 times
The eXpress train is coming - and it has more cars.