Re: Re[2]: XForms: return

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 13 Oct 97 06:22:24 PDT

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

> When I use a loop looking for the ok button press, and
> fl_do_Forms is inside this loop, I am able to get a return
> value from the function. However, it is my understanding
> that fl_do_forms is only called once in an application. If
> that is true, then there is no way to create this loop in
> any function that is not part of the main procedure.

No, this is not quite correct.

While the usual method is to disappear into fl_do_forms() and never
come back out, you can indeed call fl_do_forms() as many times and
from many places as you wish, as long as you're careful about things.

For instance, you may wish to disable all other forms while your
Goodie is active so that you don't have to handle events produced by
the user taking some other action in another form for which there is
no callback, which of course will produce an unexpected return from
fl_do_forms() -- you may also wish to disable the idle callback if you
don't want it running while your Goodie is active since this may cause
unexpected recursions. [The latter is something which normal Goodies
don't do, which caused me a bit of hair tearing until I figured out
what was going on.]

The Goodies which return values work in this way. There is no reason
why, if you want to create your own wrapped Goodie, you can't do the
same.

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/