Re: XForms: fl_deavctivate_all_forms()

T.C. Zhao (tc_zhao@yahoo.com)
Tue, 7 Jul 1998 13:46:15 -0700 (PDT)

# To subscribers of the xforms list from "T.C. Zhao" <tc_zhao@yahoo.com> :

Thanks for the excellent explanation, Steve.

I have thought about making fl_activate_all_forms()
throw away all events, but never felt quite comfortable
doing something that's hard to fix if it causes
problems. Current behavior may not be ideal, at least, with
fl_check_forms() or even XSync(), the desired behavior can be achieved.

A wrapper function fl_empty_event_queue()
or something like that might be more appropriate.
The trick, I think, is to document it together
with fl_activate_all_forms().

---Steve Lamont <spl@szechuan.ucsd.edu> wrote:
>
> # To subscribers of the xforms list from spl@szechuan.ucsd.edu
(Steve Lamont) :
>
> > I have a form that goes into a wait loop while processes are
finishing.
> > During this time I want all key presses inside a form to be ignored.
> > Right now I do something like;
> >
> > timedone()
> > {
> > fl_deactivate_all_forms();
> > waitclean();
> > fl_activate_all_forms();
> > }
>
> If waitclean() doesn't call fl_check_forms() or fl_do_forms(), then
> the fl_deactivate_all_forms() never really gets registered with
> XForms. Try doing
>
> timedone()
> {
> fl_deactivate_all_forms();
> waitclean();
> fl_check_forms(); /* Make sure XForms really knows */
> fl_activate_all_forms();
> }
>
> The reason for this is that the events may get queued up in the X
> event queue while waitclean() has control. Unless you give the XForms
> event loop a chance to process the events while
fl_deactivate_all_forms()
> is in effect, it's going to treat them as normal. Both
> fl_deactivate_all_forms() and fl_activate_all_forms(), as well as
> their form-specific relatives, simply set or clear flags,
> respectively, in the XForms form data structure and don't do any
> actual event handling.
>
> Perhaps fl_activate_all_forms() should be changed to gobble the events
> before it returns control. What say, TC?
>
> spl
> _________________________________________________
> To unsubscribe, send the message "unsubscribe" to
> xforms-request@bob.usuf2.usuhs.mil or see
> http://bob.usuf2.usuhs.mil/mailserv/xforms.html
> XForms Home Page: http://bragg.phys.uwm.edu/xforms
> List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/
>
>

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at /cgi-bin/exit-to?http://mail.yahoo.com

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/