# To subscribers of the xforms list from Trent Piepho <xyzzy@speakeasy.org> :
On Mon, 25 Sep 2000, Steve Lamont wrote:
> # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
>
> > Thank you, I hadn't thought that section of the manual relevant to me, but
> > that makes it quite clear what the problem was. I take it I could also call
> > fl_set_event_callback(do_nothing_function), and I would not have to worry
> > about fl_do_forms() returning an FL_EVENT.
>
> I'm not sure that's any better than just filtering out the FL_EVENT
> pseudo-object.
Wouldn't it keep xforms from calling XPutBackEvent() to put the event back in
the x queue, only to be removed later fl_XNextEvent()? Even if it's not
a big performance cost, I hate doing silly things like that.
Also, in places in my code I call fl_check_forms() during lengthy computations
to allow the GUI to continue to function, as it normal practice when a idle
procedure isn't viable. If I've got to check every time I use
fl_check_forms() for an FL_EVENT so I can delete it, that's a pain. Ok, just
write a function called fl_check_forms_and_dont_crash() and do a search and
replace, easy enough. Still, more work.
If I were designing xforms at the time FL_EVENT was created, what I would have
done is to make FL_EVENT->c_vdata point to the XEvent structure for the event.
Then make a function like:
XEvent *fl_get_event(FL_OBJECT *ob) { return ob->c_vdata; }
Which returns the XEvent associated with the FL_EVENT object in the same way
fl_get_button() returns the state of a button object. This way, the object
returned by fl_do_forms() and fl_check_forms() can be ignored safely if it an
XEvent object, just like all the other objects returned from fl_do_forms().
It also means the event wouldn't be put back on the queue just so it can be
removed again.
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Mon Sep 25 2000 - 21:44:41 EDT