Jump to content

Screen Mask without attached control


stas

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...