Re: XForms: Addressing Input Field

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 17 Dec 98 09:01:12 PST

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

> #include "forms.h"
> #include "foo.h"
>
> /* callbacks for form foo */
> void call_bar(FL_OBJECT *ob, long data)
> {
> FD_foo *fd_foo = (FD_foo *) ob->form->fdui;
> char dummy[10];
> sprintf(dummy, "test");
> fl_set_input(fd_foo->bar, dummy);
> }
>
>
> When compiling I get the message:
>
> foo_cb.c: In function `call_bar':
> foo_cb.c:7: structure has no member named `fdui'
>
> So something is still not right.

Hm. It should be there. What version of XForms are you running? The
fdui member was a relatively new addition to the structure. I think
it was added in version 0.88.

Check your forms.h file (probably in /usr/include/forms.h or
/usr/local/include/forms.h, depending on where it was installed). You
should find something like this at or about line 602:

/*** FORM ****/

typedef struct forms_
{
void *fdui; /* for fdesign */
void *u_vdata; /* for application */
char *u_cdata; /* for application */
long u_ldata; /* for application */

[... deletia ...]

struct forms_ *child;
struct flobjs_ *parent_obj;
int reserved[10]; /* future use */
}
FL_FORM;

Also check the revision at the top of the file:

/*
* forms.h $Revision: 0.88 $ $State: Beta $
* $Date: 1998/02/22 05:35:07 $ $Author: zhao $
*

If you don't see that, then you probably should upgrade before
proceeding.

> Sorry to be so dense. Life was easier in COBOL. Everything was global.
> (Sigh)

Ah. So we can blame Y2K on you, eh? :-)

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/