Re: XForms: working with forms

Steve Lamont (
Mon, 27 Oct 97 10:00:46 PST

To subscribers of the xforms list from (Steve Lamont) :

> > If you feel it necessary, you can call fl_do_forms() from within the
> > code for your special form -- there's no prohibition from doing so.
> > In fact, as I have mentioned before, most of the Goodies do this, to
> > the best of my knowledge.
> I'm trying this right now. How do I force the program to continue past the
> point where the new/local fl_do_forms() sits?
> Right now, the code application seems to go right back to fl_do_forms
> without completing the rest of the code.

The rest of what code? Do you mean the return?

How are you exiting from the dialog box?

Remember that if you don't have a callback, fl_do_forms() exits,
returning to the caller the pointer to FL_OBJECT which was invoked.

Here's what I do in a simlilar application:

while ( hduml->dismiss != fl_do_forms() )

where `hduml' is a pointer to the FD_ structure and, obviously,
`dismiss' is a member of that structure pointing to an FL_OBJECT -- in
this case a button. Any other returns are tossed on the floor (I
might have objects which have no callback but are interrogated as a
result of some other callback action). Once I drop out of that loop,
I do my cleanup and return from the function.

If you have, perhaps, two buttons, one an "Execute" button and the
other a "Forget It" button, you would probably do something like:

while ( 1 ) {

FL_OBJECT *obj = fl_do_forms();

if ( obj == my_form->scram ) {


} else if ( obj == my_form->do_it ) {




or something to that effect.

Sorry if I wasn't clear or made bad assumptions in my first reply.

I don't think there's a more elegant mechanism to break out of a
fl_do_forms() event loop. I'm in another lab right now and don't have
access to my XForms manual to double check. Perhaps we need a




To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: