PDA

View Full Version : Lock UI while certain processes are going on the backgorund


kminev
07-02-2008, 02:54 PM
I need to lock the UI when certain processes are taking place. For example when a button is clicked I retrieve information and feed it to a chart. Can I lock the UI while this is taking place and prevent the user from interacting with the app while loading data?

Can that be accomplished anyone that knows a way of doing that?

Thanks in advance.

I currently am doing it with the busyCursor property, but happens only ones and I need lock the UI based on user's request for data.

Thanks

drkstr
07-02-2008, 05:38 PM
I use popup TitleWindow with modal set to true, and remove it when the action is finished. For added niceties, you could add a ProgressBar with a descriptive message in your TitleWindow.


Best Regards,
~Aaron

kminev
07-02-2008, 07:03 PM
That sound like something that would work perfectly for my purpose. Can you provide me with a code example on the web?

Thank you.

box86rowh
07-02-2008, 08:13 PM
That sound like something that would work perfectly for my purpose. Can you provide me with a code example on the web?

Thank you.

import PopUpManager at the top @ mx.managers.PopUpManager

Then when you want to pause operations, do the following code:

var tw:TitleWindow = new TitleWindow();
//set it up with any custom messages and such then..
PopUpManager.addPopUp(tw,this,true);

Then when you are ready for interaction again..

PopUpManager.removePopUp(tw);

kminev
07-02-2008, 08:20 PM
Thank you very much. I think I will stick with you advice and incorporate this idea to my app.