Re: XForms: Hiding and showing of forms.

vsexton (vsexton@sirinet.net)
Thu, 17 Sep 1998 22:30:30 -0500

# To subscribers of the xforms list from vsexton <vsexton@sirinet.net> :

Try checking all your pointer declarations followed by checking where they are
first used. To me it sounds as if you have a pointer, but have not allocated
the memory. Or you have it declared in another file as an array, and externed
it as a mere pointer in another. If your memory debugger isn't helping try
printing the pointer values of any pointers you are using up to the point it
crashes (may be a lot if deep into program). I suspect you will find a nil
pointer somewhere. A rough way to do it, but sometimes it is necessary to
try.

AMIT BHATNAGAR wrote:

> # To subscribers of the xforms list from AMIT BHATNAGAR <amit@cs.dal.ca> :
>
> Well Steve, your try.c program worked as it should have, but in my
> program, when I hide the form and goto the next form, and then come back
> to the original form.. the contents of the input boxes are in fact gone.
> When the user presses the next or back button, it does some necessary
> operations, and then calls startup_form() for example:
>
> void
> xxxform_next (FL_OBJECT *ob, long data)
> {
> [stuff]
> startup_form (ob, FLIGHTINFO);
> }
>
> and in startup_form();
>
> void
> startup_form (FL_OBJECT *ob, int screen)
> [..snip..]
> case FLIGHTINFO:
> {
> fl_hide_form (ob->form);
> fl_show_form (fd_flightinfo->flightinfo, FL_PLACE_FREE_CENTER,
> FL_FULLBORDER, "Flight$
> sprintf (label, "Current Time: %sZ", timestring);
> fl_set_object_label (fd_flightinfo->time_box, label);
> break;
> }
>
> I do not free the form or anything, and still when I come back to it the
> contents are gone. all of the form's FD structs are declared globally, and
> are all initialized by their corresponing fl_create_form functions before
> the first form is even showed.
>
> I have xforms .88 (the glibc version) and I am running
> redhat 5.1.
>
> _________________________________________________
> 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/

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