Re: XForms: displaying results

T.C. Zhao (tc_zhao@yahoo.com)
Sun, 11 Apr 1999 11:06:28 -0700 (PDT)

# To subscribers of the xforms list from "T.C. Zhao" <tc_zhao@yahoo.com> :

--- "Martin Doll, Ph. D." <mkhd@into.ch> wrote:

> void get_mass_cmpd(FL_OBJECT *ob, long data) {
>
> if (line_input_1 != NULL) {
> strcpy(line_input, line_input_1);
> M_compd = process_mass(line_input);
> printf("M_compd: %f.\n", M_compd);
>
> readout(fd_martin1->result_compd, "%g", M_compd); /*readout
> is
> in "martin1.h"*/

within the callback, fd_martin1 is unknown. You can get
the structure instance from ob->form->fdui:
FD_martin1 *fd = ob->form->fdui;
....
readout(fd->result_compd, .....);

of course if your structure is named something else, replace
FD_martin1 with the structure typedef.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/