Re: XForms: Input field problem

Lothar Esser (esser@chop.swmed.edu)
Sat, 19 Sep 1998 10:13:03 -0500 (CDT)

# To subscribers of the xforms list from Lothar Esser <esser@chop.swmed.edu> :

Hi,

On Sat, 19 Sep 1998, Anuradha - Pani wrote:

> I am not able to return the string value from the input field and print it
> out with a simple printf statement. I know that the function:
> "fl_get_input(*inputobject) has to be used but I don't know how to use
> this function and in which file to use this function, i.e in form.c or
> form_main.c . I also need to printout the line selected by clicking in
> the browser.

In "form.c" you probably have registered a call back function for the
input field. Might look like this:

obj = fl_add_input (...);
fl_set_object_callback(obj,Input_cb,0);

So when you are done and hit return in the input field, the call back
function (I called it here Input_cb) will be executed.
You might also have a file "form_cb.c" where you have

void Input_cb (FL_OBJECT *ob, long data ) {
/* received return from the input */
if ( data == 0 ) {
printf ( " %s\n",fl_get_input(ob));
}
/* You can use the argument (data) to distinguish between
different input fields that share the same call back function
*/
}

Hope this helps.

Lothar

------------------------------------------------------------------
Dr. Lothar Esser
Howard Hughes Medical Institute
5323 Harry Hines Blvd.
Dallas Texas 75235-9050
E-mail : esser@chop.swmed.edu
------------------------------------------------------------------

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