Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
Hi, I have a strange problem using work procedure. In a activate push button callback, I manage a message box and add a work procedure. In this procedure, I sleep for 5 seconds and then unmanage the message box. It works fine, except that the message box labels do not appear. The message box displays 5 seconds (but without label and push button) and disappears. If I only manage the message box in the callback, it works fine. Any idea ? Thanks for your help. Jean-Marc.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
3103.1 | XtAddTimeOut | RAB::PRINCIPIO | Fri Jul 20 1990 09:10 | 4 | |
Because you are sleeping in the work procedure, you are not processing events. I suggest you try XtAddTimeOut instead. Tracy | |||||
3103.2 | Thanks, but ... | SWTHOM::TISSERAND | Jean-Marc TISSERAND TSC FRANCE | Fri Jul 20 1990 10:51 | 18 |
Yes, but before I execute the work procedure, I go into Xtmainloop and there's an event generated by xtmanagechild(message_box). I use the work procedure because I have to make a message box appear for only 5 seconds. If I manage and unmanage the message box in the callback, the message box appears only at the end of the callback and then immediately disappears. It's a normal behavior because no events are processed during the callback. Assume that instead of waiting 5 seconds, I do some work that takes 5 seconds in the work procedure. Can I use xtaddtimeout in this case ? How can I do it ? ( Using a mini-xtmainloop in the work procedure to handle events ? ). Thanks Jean-Marc. | |||||
3103.3 | STKMKT::SWEENEY | Online and Out of Bounds | Fri Jul 20 1990 14:42 | 9 | |
In a callback manage the message box add the work procedure In the work procedure work for 5 seconds unmanage the message box (This scheme doesn't let the user cancel the work procedure) | |||||
3103.4 | Don't stretch callbacks or workprocs > .25 sec | TOOLEY::B_WACKER | Fri Jul 20 1990 14:47 | 4 | |
No callback should last over .25 seconds, see Guide to Application Programming 2.8.4. Do the unmanage in the timeout callback. Bruce |