Re: XForms: removing fselector via timer_cb

Dr. T.C. Zhao (zhao@bragg.phys.uwm.edu)
Mon, 8 Sep 1997 23:47:27 -0500

To subscribers of the xforms list from "Dr. T.C. Zhao" <zhao@bragg.phys.uwm.edu> :

from Tano Fotang <M.Tano@Wirtschaft.FH-Wolfenbuettel.DE> :

>I asked the same questions 2 months ago, but i was sig_alrm and
>longjmp then.
>void timer_cb(FL_OBJECT *ob, long data){
> if(my_fselector_is_open){
> FL_FORM *fs=fl_get_fselector_form();
> fl_hide_form(fs);
> fl_free_form(fs);
> ...
> }
This is a no-no. You shouldn't mess with the structure
returned by fl_get_fselector_form except for setting
some attributes. The pointer returned is really
a pointer pointing to the internal record of
the file selector and any member of the structure
should never be freed, actually hiding the form
is also problematic. If you want to hide
the selector, just use fl_hide_fselector().

I think the documentation may have failed to mention this
and that will be fixed.

_________________________________________________
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/