Subscribe Bookmark RSS Feed

Modal Dialog Persistence

charliem

Community Trekker

Joined:

Apr 4, 2014

I have a modal dialog which does exactly what I want it to do after I press the OK button, but the task that is done in response to the OK button take a while and all this time the dialog persists. When the task completes, the dialog goesa way as it should. I'm just worried that when I reliease the app to other usesrs there is a chance that someone could press OK multile times while it's off performing the task.

Is there a way to make the dialog disappear quickly after OK is pressed, whiel the task is being done?

Thanks,

Charlie

1 ACCEPTED SOLUTION

Accepted Solutions
charliem

Community Trekker

Joined:

Apr 4, 2014

Solution

I had been tinking bout this for some time and drawing a blank. Somehow after I posted this, the next morning I figured out the answer. Solution was to simply move the codes outside of the OK button's code. IN other words, I jsut set a flag (iflag = 1) inside the OK button's code, and nothing else, and then later in the script put the code to be executed ony if iflag ==1 (of course you initialize to zero somewhere up near the top of the script). I'm not sure if that'll be helpful to anyone or not.....

1 REPLY
charliem

Community Trekker

Joined:

Apr 4, 2014

Solution

I had been tinking bout this for some time and drawing a blank. Somehow after I posted this, the next morning I figured out the answer. Solution was to simply move the codes outside of the OK button's code. IN other words, I jsut set a flag (iflag = 1) inside the OK button's code, and nothing else, and then later in the script put the code to be executed ony if iflag ==1 (of course you initialize to zero somewhere up near the top of the script). I'm not sure if that'll be helpful to anyone or not.....