Jump to content

Need Help with Wait, process and Hide Wait .....


gustotc
 Share

Recommended Posts

I really need your help the community, because I'm not having the support Unigui

 

I am having a problem with the use of a component Wait (UniSpecial Component), you can not execute the Wait, process eg recordings in the database and then hide the wait.

 

I tried a number of ways including talking to Hayri Aslan who gave me the following advice:

(Posted 02 September 2015 - 01:30 AM

AFAIK you can not do this in one procedure due to unigui restrictions.

 

we need farshad's help

)

 

Please help me in this case:

 

Using example, when i run ShowWaitMe and Hide in the same procedure it does not show the Wait .... only if use in another procedure.

 

My need is:

 

Wait ... We do not wait for the user

 

Recordings in the database

 

Hide ....

 

 

Please, how do it?

 

 

Tfrm_waitme.UniButton1Click procedure (Sender: TObject);

begin

   with the UniSpWaitMe1

   begin

     Effect: = tWaitmeEffect (UniComboBox1.ItemIndex);

     WaitmeText: = UniEdit1.Text;

     Container: = UniPanel1.JSName;

     SizeW: = Round (UniNumberEdit2.Value);

     SizeH: = Round (UniNumberEdit1.Value);

     ShowWaitMe;

   end;

 

   UniPanel1.Refresh;

 

   sleep (5000);

 

   UniSpWaitMe1.HideWaitMe;

end;

Link to comment
Share on other sites

Sorry but I did not use (screenmask), would have an example?

 

 But concerning the use of component and example that passed was the author himself (following his comment below) which placed a limitation of the Unigui.

 

 I tried a number of ways including talking to Hayri Aslan who casette me The Following advice:

 (Posted 02 September 2015 - 01:30 AM

 AFAIK you can not do this in one procedure due to unigui restrictions.)


 

I would like to create something to update on Thread Wait until you stop recording database and then hides the Wait?

 

 Thanks for the feedback.

Link to comment
Share on other sites

Your code (from other post) cannot work in web.

 

In web

(1) the browser sends a request to the server

(2) the server does some processing

(3) and then the server sends the response back to the browser

Everything you do in step 2, the browser receives after step 3

 

But you can you do it with a "2nd communication channel" (Long poll), see here.

Link to comment
Share on other sites

  • Administrators
Tfrm_waitme.UniButton1Click procedure (Sender: TObject);
begin
   with the UniSpWaitMe1
   begin
     Effect: = tWaitmeEffect (UniComboBox1.ItemIndex);
     WaitmeText: = UniEdit1.Text;
     Container: = UniPanel1.JSName;
     SizeW: = Round (UniNumberEdit2.Value);
     SizeH: = Round (UniNumberEdit1.Value);
     ShowWaitMe;
   end;

   UniPanel1.Refresh;

   sleep (5000);

   UniSpWaitMe1.HideWaitMe;
end;

In uniGUI client screen is only updated after event handler is fully processed. You can not refresh a screen element while event handler is still being processed.

 

The only way to achieve this is to setup a UniThreadTimer and run your big task in it while you refresh screen inside a uniTimer..

 

Please see  ThreadTimer - 3 demo.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...