Re: XForms: Xforms & command line parameters

Alain Muls (alain@asge-009.rma.ac.be)
Fri, 11 Jul 1997 09:25:18 +0200

To subscribers of the xforms list from Alain Muls <alain@asge-009.rma.ac.be> :

Steve Lamont writes:
> To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > This seems to be a problem. I use the common 'getopt' method
> > to pick application specific options *before* I call fl_initialize():
> >
> > while ( (c = getopt(argc, argv, "b:d:D:hp:s:")) != EOF ) {
> > switch ( c ) {
> > case ...
> > case ...
> > case ...
> > }
> > }
> >
> > After processing this loop no options remain for fl_initialize()
> > and, even worse, XForms options (X11 options) are treated as an
> > error if they are not explicitly mentioned in 'getopt(...)'.
>
> True.
>
> You could, however, add the XForms arguments to your getopt() list.
>
> Perhaps the solution is to use the built in argument parsing provided
> by XForms. IMHO it is superior to getopt()'s rather primitive single
> character flags and it allows you to specify defaults and data types
> in a much more rich vocabulary than the standard getopt(). I've used
> it on some of my more elaborate projects and it works well. I've even
> hacked it to be "self-documenting," so that all the parameter
> definitions, defaults, and explanations of the parameters are
> effectively in one place.
>
> 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/

Could you provide a sketch of how you do that ?

Alain

-----------------------------------------------------------------------
Alain Muls tel +32/2/737.61.20
Royal Military Academy fax +32/2/737.60.47 ASGE
Renaissanceavenue 30 e-mail Alain.Muls@asge.rma.ac.be
B-1000 Brussels e-mail alain@asge-004.rma.ac.be
BELGIUM ICBM 50d50,6669'N 4d23.5299'E
-----------------------------------------------------------------------
_________________________________________________
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/