"Please wait, loading..." popup not drawing

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
"Please wait, loading..." popup not drawing

Submitted by Anonymous on Thu, 07/24/2003 - 18:14.

I`m trying to implement a popup that does nothing but sit there and let the user know that the subsequent popup is loading (takes a few secs to grab data from a device). In its creation function I call the second popup`s creation funcion directly after the first XtPopup call, but at run-time it never pops up, and then the second one pops up normally. How can I make the first popup be drawn immediately, and not get delayed waiting for the loading code that comes after it to finish?

Also, isn`t the phrase "shower of bastards" great!? Man I love that! Woo.

Thu, 07/24/2003 - 23:08#1

Thu, 07/24/2003 - 23:08#1

Anonymous

"Please wait, loading..." popup not drawing

Although I am still fairly new at using motif, I have encountered situations similar to yours.. the problem is that any motif commands made in a method (like XtPopup) wont get executed until the method returns to the main loop (XtAppMainLoop) which will then `see` the motif calls you made, and execute them. I would be willing to guess that what happens with your first popup window is that you pop it down before the main loop has a chance to pop it up. ... The only solution I can think of to your problem is to somehow move the code for the second popup to another method... in other words, you want the code for the first popup to return to the main loop ASAP, and then execute the code for your second popup...

I hope that all makes sense, and that it provides a little insight into what you need to do...

Good luck!

Sat, 07/26/2003 - 15:50#2

Sat, 07/26/2003 - 15:50#2

Anonymous

"Please wait, loading..." popup not drawing

Thanks for a better explanation of the problem, I swear I might never completely understand the backend of motif =)

I`ve used that method in the past to get around it, but digging a little deeper in some of the motif manuals I actually found a direct reference and solution. At first I used a call to XmUpdateDisplay() to try and force a draw, which worked half the time. Then I came across a funtion in Volume 6A (Motif Programming Manual, that lovable big fat blue bastard) that, on return, makes sure that the widget passed to it is drawn.

"Eureka!" the other intern behind me heard.

It`s on page 750 and is called ForceUpdate(). Hope this helps if you run into the same problem again.

 

Sun, 07/27/2003 - 00:22#3

Sun, 07/27/2003 - 00:22#3

ICS_support

"Please wait, loading..." popup not drawing

We had some good code on this site, in the "Letters" area. I`ll see if I can dig it up.