[Not Responding] Dialog with lots of refreshes

Started by teebs73, February 13, 2014, 11:27:09 AM

Previous topic - Next topic

teebs73

I have a common problem with Dynamic dialogs going to [Not Responding].  This happens in a lot of scenarios, but here's an example in pseduocode:
- load array with 2000 rows
- update StaticText element with value of Array[i,x] with the DialogControlSet command
- loop through all elements in array

The Dialog will run OK if i never change focus away from the dialog. But if i open another window and come back to the Dialog, it will be blank, show as [Not Responding] and no controls will be updating.  HOWEVER, the script is still running, the array is still processing, and the dialog will resume operation once the loop is complete.

This only happens if i have a high volume of refreshes --- 1000+ records.   Quick bursts of 10 records / dialog refreshes don't have any negative effect.

If i use a simple BoxText command, I have no problems.  the BOX will dispay the refreshing text whether i have focus or not and never goes to [Not Responding]

Looking for some guidance on what could be causing this...

thanks for your help!
-- Steve

JTaylor

Disable the dialog using DialogProcOptions while such activities are occurring and then re-enable.


Something like:

    DialogProcOptions(JTa_Handle, dpo_disablestate,0)               ; Dialog Disable (1-Disable, 2-Wait cursor, 0-Enable).

I normally use option 2.

Jim

Deana

Generally in WIL dialogs you don't want to have code that takes a really long time to return to the dialog procedure. IF you do have code that takes a while to process then you will see the CPU get pegged and the dialog becomes non responsive.

In order to get around this you can temporarily Disable the dialog using DialogProcOptions 1000, then re-Enable after the long process.
Deana F.
Technical Support
Wilson WindowWare Inc.