Re: XForms: Multiple forms in fdesign: How to call them?

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 11 Jan 99 06:27:13 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> However, I've got stuck with fdesigner. I have multiple forms which
> I want to become 'pop-up' options. i.e. I have an 'overall' form, which
> I want to call first, then other forms which are called up at the press
> of a button.
>
> How do I set the call-backs on the buttons of the 'overall'
> form such that they invoke the other forms?
> Is this the correct way to do do this?

Yes. This is generally done in callbacks.

You invoke a new form in the same way as your original form is
invoked: by creating it, populating it with data, if necessary, then
using fl_show_form() to make it appear. Once the user is done with
the form, you can make it disappear with fl_hide_form(). If you won't
need it any longer, you can use fl_free_form() to delete it and its
internal resources (you will need to explicitly free the data
structure built by the create routine).

Depending on the complexity of the forms, you can either create them
once at the beginning of the program, tucking their `fdui' structures
into a convenient place, such as a data structure universally passed
around the application, or in global variables, or you can create and
free the forms as needed -- on the fly, so to speak. There is no one
"right" way to do this -- it will depend on your application.

Refer to the manual for use of the various functions discussed above.

spl

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