cmdline and tcllib 0.3 
Author Message
 cmdline and tcllib 0.3

I started looking at the typedCmdline stuff in the 0.3 tcllib, and I
noticed a couple of things, but before I start whining, thanks for all
the new features. The default option parameters and the ability to
specify comments for the auto generated usage message are fantastic.
I also wanted to bring up these issues to find out what others thought
of the typedGetoptions API.
Perhaps my usage of it is what needs changing.
I feel that the interface to typedGetoptions isn't as conveniant as it
was before it's integration into tcllib, ie: in the typedopts proc
in the tclGetOpts1.1 package.
For one, typedGetoptions no longer uses the optVar and argVar
parameters, which makes it harder to determine which options were
specified. typedGetopt _does_ still use these 2 args. Was there a
specific reason for removing them from the former proc, and, what
mechanism did you have in mind for testing for options after calling
typedGetoptions?
Second, this seems like a bug, options that are _not_ specified
as optional (by using the ? syntax) can be omitted from the cmd
line when using typedGetoptions without throwing an error.
I didn't check whether typedGetopt did the same or not.
Third, I found the usage examples provided in tclGetOpts1.1 to be very
helpful. Perhaps if I were a better tcler I'd be able to get the same
info from the .test file, but I miss the usage examples.
Fourth, with respect to the boolean arg types, it seems that one can
specify either 0,1,y,Y,n,N for an arg to the option. I would have
thought that specifying the option, without any args would set it to
true, while not specifying the option would set it to false.
Fifth, I seem to remember that if an invalid arg type was specified in
typedopts, the error indicated that the arg type was invalid for the
option. Now, typedGetoptions, just prints the usage message on stderr
without any info as to why the pasring failed. I liked having the hint
about which option's arg it didn't like.

Thanks,
Bruce.                                                                                      
--

Sattel Global Networks          818.709.6201 x122



Wed, 02 Oct 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ANNOUNCE: tcllib 0.3 includes typedGetopt routines

2. tcllib 0.3 install problem , mkIndex.tcl forget close $index

3. ANNOUNCE: tcllib 0.3 release

4. TCLLib cmdline - multiple file names and multiple invocations

5. Examples for tcllib-1.0 (cmdline)

6. tcllib cmdline::typedGetopt - Preliminary documentation for comment

7. Proposal to add procs for typed options to cmdline module of tcllib package

8. announcement : Qish 0.3

9. ANNOUNCEMENT: Automatic Design of Algorithms Through Evolution (ADATE), Version 0.3

10. MultiMedia Logic ALPHA 0.3 is released

11. announcement : Qish 0.3

 

 
Powered by phpBB® Forum Software