Page 1 of 1

Update display before displaying modal form

PostPosted: Wed Jun 08, 2022 5:46 pm
by dhs
I have some logic that draws some entities immediately before displaying a modal form. The form is displayed, but the entities are not drawn until after the modal form is closed.

Is there a way to force the display to be updated (i.e. the entities to be drawn) before the modal form is displayed ? I have tried a few different things (as detailed below) so any other suggestions would be appreciated.

I tried adding a Pause between drawing the entities and displaying the form. I didn't expect that to help (and it didn't), although I got caught out by the fact that the ms parameter is in fact seconds (and not milliseconds as the parameter name would imply!)

I tried adding a sleep before displaying the form. I didn't expect this to by any different to the pause result (and it wasn't).

Instead of showing the form immediately after drawing the entities I added a new state and entered that state after drawing the entities. The new state then called the callNone procedure and displayed the form after the return from that call. I was more hopeful that this would produce the desired result, but once again the entity display is not updated before the form is displayed.

Thanks,
David H.

Re: Update display before displaying modal form

PostPosted: Wed Jun 08, 2022 11:34 pm
by dhs
ok, as usual I thought of a solution after posting this question. I am doing a call to callGlobalEsc with a key parameter of 27 (escape key), and the display is now updating before the modal form displays. Not sure if anybody may have a better suggestion though ?

dh