# To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :
> I am having problems getting an app to do what I want it to do at start up.
> [. . .]
> I tried fl_set_form_atactivate() in the init code, but it doesn't
> work. I guess because you do an fl_show_form() BEFORE the
> fl_do_forms() and the activate event for fl_show_form() does not get
> into the event queue.
There is no such thing as an "activate event."
fl_set_form_atactivate() fires off a callback when the application
calls fl_activate_form() or fl_activate_all_forms(), not when the form
is displayed.
> How can I do what I want?
fl_show_form( main_form, . . . );
fl_deactivate_form( main_form );
fl_activate_form( main_form );
while ( 1 )
fl_do_forms();
or, since you're using a timeout, why not just set the initial timeout
to something short, like 1 msec, and then subsequent timeouts can be
of longer duration:
fl_show_form( main_form, . . . );
fl_add_timeout( 1, your_timeout_callback, your_data );
while ( 1 )
fl_do_forms()
or, even more alternatively, you could use a raw callback to catch the
MapNotify event. Since this is probably the ugliest option, I'll
leave it as "an exercise for the student."
spl
_________________________________________________
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 : Wed Dec 11 2002 - 13:16:27 EST