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 |
A dialog box with N stext widget and a "confirm" push button. The user fills in the stext fields moving from one to the other by using TAB or clicking on the new stext with the pointer. Each stext has an associated lost_focus callback that checks wether the entered data are correct or not (format, type...). When the last stext is filled the user "activates" the push button. Within the activate callback a DB inquiry is done by using the data in the stext widgets. Unfortunately the lost_focus procedure for the last stext filled is not called when the user moves the pointer to the button in order to activate it. I realize that the behaviour is correct because the focus doesn't move to a different widget. But this means that a local check on the single field cannot be performed. The question is: how can I force the lost_focus proc. to be called in order to avoid a useless (because of incomplete or wrong data) DB inquiry ? I tried to force the lost_focus with XtCallAcceptFocus from within the activate callback but the lost_focus event is put in queue and the callback is executed only after the activate callback completes. I split the activate callback in 2 different routines (one moves the focus, the other performs the inquiry) hoping that the lost_focus event could be inserted in queue before the second part of the activate is executed. Nothing to do and no other ideas. Beside the specific question, where I can find something to read about the callback mgmt (when they are activated, how they can be interrupted, are they comparable to AST running at higher priority...). Thanks in advance and excuse me for the lengthy message. Matteo (Italian ACT, Milan)
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1174.1 | Hide another stext... | DEMON::BURLEIGH | Mon Aug 07 1989 23:13 | 7 | |
Well, you could hide a small stext widget behind the push button to which focus would go en the user pressed the tab key on the last visible stext field. Of course, the user would have to press the tab key to have the last field checked... Dave | |||||
1174.2 | Found a solution | AIDA::CARCANO | Matteo Carcano, Italian ACT Milan | Tue Aug 08 1989 05:13 | 19 |
Sorry, I left the question pending even if a solution has been found. From within the activate_proc associated to the push button the actions are: - XGetInputFocus - XtWindowToWidget - XtCallCallbacks In this way the lost_proc for the last stext filled is called before the other actions in the activate_proc are performed. Do you see any problem "ready to come out" using this sequence of operations? I still have a more general question: where can I read something about the toolkit, how it manages the callbacks, how to use it together with ASTs... Is there a document on "...toolkit programming tricks"? The "Guide to Appl. Prog" in the official doc set is not always very helpful... Thanks, Matteo. |