Jump to content

About UniScreenMask


dionel1969

Recommended Posts

Hello:

 

I have a question caused by my lack of knowledge. How works UniScreenMask???? I saw demo and it is working there with Sleep procedure. I use the following code in my windows applications for those procedures that use long time to work like server calls. I mean "long time" in cases that bandwidth is not good or not enough, or may be sometime the server is too busy and do not respond as fast as expecting.

 

procedure DoBeforeLongOperation;

begin

Screen.Cursor := crHourGlass;

ShowProgressMessage('Wait a moment...');

end;

 

procedure DoAfterLongOperation;

begin

HideProgressMessage;

Screen.Cursor := crDefault;

end;

 

procedure CallToServer;

begin

DoBeforeLongOperation;

 

try

RequestToServer;

finally

DoAfterLongOperation;

end;

end;

 

 

Sometime I use an "Animation" to show that the application is working not crashed.

 

How could I use UniScreenMask in this case calling some procedure or property like "Active := True" not through "Sleep"???

Link to comment
Share on other sites

  • Administrators

Hmmm...I totally forgot this one. Unfortunately there is no way to mark posts and topics as Unread, so I may forget answering to some topics from time to time.

 

About your question:

 

ScreenMask is initiated on client side as soon as an ajax event is generated. For technical reasons you can not initiate a screen mask from server side. You should bind a control to a UniScreenMask and each time that control generates an event a mask is displayed.

 

In demo project the Sleep() method is only used to emulate lengthy operation.

Link to comment
Share on other sites

Hmmm...I totally forgot this one. Unfortunately there is no way to mark posts and topics as Unread, so I may forget answering to some topics from time to time.

 

No problems with that, that is why I returned to pick up the topic because It was strange that there was no response.

 

 

About your question:

 

ScreenMask is initiated on client side as soon as an ajax event is generated. For technical reasons you can not initiate a screen mask from server side. You should bind a control to a UniScreenMask and each time that control generates an event a mask is displayed.

 

In demo project the Sleep() method is only used to emulate lengthy operation.

 

Ok, I understood. I will try then to change Attached Control because I use two Controls to input some data, one first and client ask to server about availability of that input, and one after to Request save both inputs in the server.

 

Thank you

Link to comment
Share on other sites

I test UniScreenMask and it does not work as I was expecting. The problem is that no all the events in the control fires a request to server, just when something is done determined by some rules. I will search another way to do the same.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...