sicoobcooplivre Posted April 4, 2023 Share Posted April 4, 2023 @SherzodGood morning! Please, I need to trigger an event for all sessions, so that the mainform of each session refreshes a query to display a record counter in a label, so that each user knows a certain record. I don't want to use the unitimer, so I thought of using the example below, broadcast! Is it working on current version of unigui, using hyperserver? Thanks! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2023 Share Posted April 4, 2023 Hello @sicoobcooplivre 11 minutes ago, sicoobcooplivre said: Is it working on current version of unigui, using hyperserver? Please wait for build 1566. Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 @SherzodNo problem! And is there any way I can do what I want in the current version? My scenario was like this: I use an FBEvents in the VCL application, so every time I have a database update, the FBEvents updates the mainform data I want, without needing a ttimer! In Unigui I need to do the same thing, but I don't want to use Unitimer, I wanted some routine that triggers an event for all sessions, and then in each mainform I refresh a query to update my indicators! Is there any solution for this? Or any suggestions please? Thanks! Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 @Sherzod I tested the suggestion in the post below, it looks like it did in every session, but it has no effect on any! Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 4, 2023 Administrators Share Posted April 4, 2023 6 minutes ago, sicoobcooplivre said: @SherzodNo problem! And is there any way I can do what I want in the current version? My scenario was like this: I use an FBEvents in the VCL application, so every time I have a database update, the FBEvents updates the mainform data I want, without needing a ttimer! In Unigui I need to do the same thing, but I don't want to use Unitimer, I wanted some routine that triggers an event for all sessions, and then in each mainform I refresh a query to update my indicators! Is there any solution for this? Or any suggestions please? Thanks! Yes, you can use BroadcastMessage method. However, if you use HyperServer there are some small bugs that will be addressed in 1566. (Will be released soon) Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 Please, I really need a suggestion on how to update sessions, but without the unitimer, to show important data to users! Is there any alternative to help me? Thank you so much again! Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 In my case, the only thing I need is for each mainform to know that it has to refresh a query, I don't need to send a message, or any parameters, I just need each session to understand that it has received an event, and then I'll execute a refresh in a query that brings a counter and I will display in a label of all sessions, the same value! Is there any other solution please? Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 @SherzodI went to test the broadcast in the current version, just to find out, and I'm getting the error: Read timed out Can you tell me why? Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 @Sherzodplease, the error above is some configuration? I need to test the examples of websocket, because maybe it will suit me! thanks! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2023 Share Posted April 4, 2023 1 hour ago, sicoobcooplivre said: Can you tell me why? Which build are you using? Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 FMSoft_uniGUI_Complete_Professional_1.90.0.1565 I want to test the websocket examples, but it's giving me this error. I'm testing localhost, on my own pc! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 4, 2023 Share Posted April 4, 2023 Please see the demos first. Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 @Sherzod The error is happening in all websocket examples! Can you help me please? Quote Link to comment Share on other sites More sharing options...
picyka Posted April 4, 2023 Share Posted April 4, 2023 4 horas atrás, sicoobcooplivre disse: @SherzodFui testar a transmissão na versão atual, apenas para descobrir, e estou recebendo o erro: Leia o tempo limite Você pode me dizer por quê? Você pode ignorar essa exceção Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 Good afternoon! If I ignore it, does the event run normally, that is, it goes to the end, for all sessions normally? Thanks! Quote Link to comment Share on other sites More sharing options...
picyka Posted April 4, 2023 Share Posted April 4, 2023 Yes Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 4, 2023 Author Share Posted April 4, 2023 I will test it, thanks! But it wasn't supposed to show this error, right? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 4, 2023 Share Posted April 4, 2023 3 hours ago, sicoobcooplivre said: I will test it, thanks! But it wasn't supposed to show this error, right? http://forums.unigui.com/index.php?/topic/23163-about-the-new-websockets/&do=findComment&comment=130912 1 Quote Link to comment Share on other sites More sharing options...
irigsoft Posted April 5, 2023 Share Posted April 5, 2023 16 hours ago, sicoobcooplivre said: Please, I really need a suggestion on how to update sessions, but without the unitimer, to show important data to users! Is there any alternative to help me? Thank you so much again! Hi, I think you already have a solution to this with TuniThreatTimer. This component is used on the server side and you can use it to get data from the DB and store it in a global variable, this variable is visible in all sessions. 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 5, 2023 Share Posted April 5, 2023 http://forums.unigui.com/index.php?/topic/14772-how-can-i-receive-database-table-updates-periodically/&do=findComment&comment=81897 Or http://forums.unigui.com/index.php?/topic/12063-access-validation-when-calling-unimainmodule-via-fdeventalerter onalert/&do=findComment&comment=64375 Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted April 6, 2023 Author Share Posted April 6, 2023 Thank you all for your attention! It worked by following your directions! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.