Re: XForms: simple problem

Jeff Pierce (piercej@preferred.com)
Mon, 29 Sep 1997 16:38:50 -0400

To subscribers of the xforms list from Jeff Pierce <piercej@preferred.com> :

Andrew V. Messier wrote:
>
> To subscribers of the xforms list from "Andrew V. Messier" <amess@ece.WPI.EDU> :
>
> Hi, as my problem will demonstrate I'm new to xforms.
> My problem is that I have to hit buttons several
> times before the buttons assigned action occurs. What I
> is like the following:
>
>
> while (fl_do_forms()!=quit){
>
>
> if(fl_do_forms()== "some FL_OBJECT from button"){
> some_function();
> }
>
> if(fl_do_forms()== "some FL_OBJECT from button){
> some_other_function();
> }
>
> .
> .
> etc.
>
> }
>
> I know this is wrong since the do_forms function is
> being executed once at a time, but how do I loop
> through and wait untill one of the FL_OBJECTs has
> changes state?? Thanks for any help and sorry for
> bothering your time with a simple problem.
>
> - Andy Messier
> _________________________________________________
> 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/

Look at the callback features. A callback is assigned by:
First creating the object.
second assigning a call back functions to it.
Stating what value to pass to the callback. This can allow several
objects to use the same callback function with each passing a different
value to it so the callback can tell which object was selected.
The manual explains this and look at the demo programs.

Selecting any objrect with out a callback causes a falling out of the
fl_do_forms loop.

Jeff Pierce
piercej@preferred.com
_________________________________________________
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/