Re: XForms: Re: Canvas in 0.87 + Folders

Dr. T.C. Zhao (zhao@bragg.phys.uwm.edu)
Fri, 22 Aug 1997 00:14:34 -0500

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

from Michael Steliaros <ms@dcs.warwick.ac.uk> :
>> cleanup function only gets called when canvas or
>> form is destroyed,
^^^^^^^^^
>I assume that by destroyed you mean fl_free_form...
When you hide a form, the canvas window is destroyed
and the cleanup routine called. Cleanup routine
is meant for the application to clean up canvas
window related stuff, such as drawing context
or whatever that are keyed to the window ID.
If nothing else, cleanup routine informs the
the application that the canvas ID is no longer valid.
The memory associated with canvas SPEC is destroyed
when the object or the form is freed.

>void popup_tabbed_demo(void)
>{
> FD_main *form_main = create_form_main();
> FD_tab_a *form_tab_a = create_form_tab_a();
>
> fl_addto_tabfolder(form_main->tab, "A", form_tab_a->tab_a);
>
> fl_hide_form(form_main->main);
> fl_free_form(form_main->main);
> fl_free(form_main);
> fl_free(form_tab_a);
I think the document failed to mention that freeing
a tabfolder form does not free the form associated
with each tab. YOu need to add fl_free_form(form_tab_a);

>I have a requester that follows a similar procedure. It works fine first
>time round but second time round it dies
Have no idea what the problem is without knowing more
details.
_________________________________________________
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/