Re: XForms: fl_set_oneliner bug?

T.C. Zhao (zhao@bloch.phys.uwm.edu)
Mon, 23 Feb 1998 22:23:50 -0600

# To subscribers of the xforms list from zhao@bloch.phys.uwm.edu (T.C. Zhao) :

# To subscribers of the xforms list from "Robert S. Mallozzi" <mallors@crazyhorse.msfc.nasa.gov> :
>
> form = fl_bgn_form (FL_UP_BOX, 300, 200);
> obj = fl_add_button (FL_NORMAL_BUTTON,
> 10, 10, 100, 40, "Button");
> /* These calls generate the error
> ** "In fl_bgn_form [forms.c 56] You forgot to call fl_end_form"
> */
> fl_set_oneliner_font (FL_BOLD_STYLE, FL_NORMAL_SIZE);
> fl_set_oneliner_color (FL_BLUE, FL_BLACK);
> fl_end_form();

>If I call fl_set_oneliner... within an fl_bgn_form/fl_end_form
>block, I get an error. If I move the calls to before
>fl_bgn_form, the program works fine. Is there a problem, or
>is this a known behavior?

Prior to v0.88, I think oneliner was initialized
(creation of the one liner form) inside fl_initialize. To
speed up startup time, all unnecessary initialization code were
removed from fl_initialize() and done on an "as needed" basis
and now you're seeing one side effect of it (nested fl_bgn_form()).
(in a perfect world, fl_end_form() should take an FL_FORM *
as a parameter). Anyway, for now, just call set_oneline_xxx
after fl_initialize() once, then you can call oneliner function
whereever you need to.

_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/