Re: XForms: Nothing Happens

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 16 Dec 98 06:37:41 PST

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

> I'm not sure if I'm doing the right thing. When I run that, nothing
> happens. So, look my very simple example. The archive " teste.c ":
> [...]
> main()
> {
> FD_MARFORM1 *create_form_MARFORM1(void);
> }

I'm not sure where to start other than to say you've created a program
that does nothing whatsoever. All your main function does is to
declare a function prototype. There is no executable code whatever.

The best advice I can give is to please spend some time reading the
XForms manual -- in particular Chapter 2, "Getting Started".

The following is a minimal main() program as generated by `fdesign':

#include "forms.h"
#include "try.h"

int main(int argc, char *argv[])
{
FD_MARFORM1 *fd_MARFORM1;

fl_initialize(&argc, argv, 0, 0, 0);
fd_MARFORM1 = create_form_MARFORM1();

/* fill-in form initialization code */

/* show the first form */
fl_show_form(fd_MARFORM1->MARFORM1,
FL_PLACE_CENTERFREE,
FL_FULLBORDER,
"MARFORM1");
fl_do_forms();
return 0;
}

This will initialize XForms, create a form, show the form, and then
call the XForms main loop.

I don't want to sound patronizing or offend but from the questions
you've been asking it seems as if you probably need to spend some time
studying the basics of C programming before tackling a relatively
advanced subject like XForms. If you have the Kernighan and Ritchie
text _The C Programming Language_, that's probably the best place to
start. If you don't have it -- get it. It is still, in my inflated
opinion, still the best text on the subject.

Best regards.

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/