Jump to content

Screen Mask without attached control


stas
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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();

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • 1 year later...

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...