stas Posted February 6, 2015 Share Posted February 6, 2015 Hello. How show Wait message without attached control For Example proccedure TUniForm.FormCreate(SEnder:TObject); begin ScreenMaskWithoutAttachedControl.Enabled=True; try VeryLongTimeInternalProcedure; finally ScreenMaskWithoutAttachedControl.Enabled=False; end; end; Thank You. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 6, 2015 Share Posted February 6, 2015 Hi Stas! If on JS, can something like this: UniSession.AddJS('uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();'); try ... VeryLongTimeInternalProcedure; finally UniSession.AddJS('uniVars._mask.hide();'); end; ... Best regards. Quote Link to comment Share on other sites More sharing options...
stas Posted February 6, 2015 Author Share Posted February 6, 2015 Thanks, but dont work UniSession.AddJS('uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();'); try Sleep(10000); finally UniSession.AddJS('uniVars._mask.hide();'); end; Response text is uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();uniVars._mask.hide(); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 6, 2015 Share Posted February 6, 2015 Though of course this is not what you wanted, but you can then put UniSession.AddJS ('uniVars._mask.hide ();'); at the end of the procedure in VeryLongTimeInternalProcedure; Quote Link to comment Share on other sites More sharing options...
stas Posted February 6, 2015 Author Share Posted February 6, 2015 The problem is that the response from the server in the same sentence Can I send in first Response uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); after that process Sleep(10000) and in second Responce send UniSession.AddJS('uniVars._mask.hide();'); Of cource i can use unitimer but this is undesirable Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 6, 2015 Share Posted February 6, 2015 Maybe like this:setTimeout ('// js code ...', 10000) Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted February 6, 2015 Administrators Share Posted February 6, 2015 Hi Stas! If on JS, can something like this: UniSession.AddJS('uniVars._mask = new Ext.LoadMask(Ext.getBody(), {msg:"Wait ..."}); uniVars._mask.show();'); try ... VeryLongTimeInternalProcedure; finally UniSession.AddJS('uniVars._mask.hide();'); end; ... Best regards. It will not work because all JS codes will be sent to server at the end of Ajax request. Quote Link to comment Share on other sites More sharing options...
stas Posted February 6, 2015 Author Share Posted February 6, 2015 setTimeout is the best way Quote Link to comment Share on other sites More sharing options...
Sistema Fenix Posted February 18, 2016 Share Posted February 18, 2016 Try this: http://forums.unigui.com/index.php?/topic/6348-screen-mask-simply-long-process-solution-with-8-themes/ 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.