I've attached a patch for CLArgsParser and ClutilTestCase which adds the
requested feature. In trying to be consistent with getArguments(), I added
two new methods: getArgumentById(int) and getArgumentByName(String). In
retrospect, should they be renamed getOptions(), and getOptionByXXX since
they return CLOption? The patched ClutilTestCase adds a test case for
validating the two new methods. I created the patches using cvs diff -u
relative to the project root directory.
Regards,
--mike
-----Original Message-----
From: Peter Donald [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 6:43 PM
To: Avalon Development
Subject: Re: proposed: CLI Args improvement
On Tue, 11 Sep 2001 04:24, [EMAIL PROTECTED] wrote:
> While on the subject of CLI :) I often find it useful get an argument by
> id after parsing. E.g. instead of having to call getArguments() and
> iterate over the Vector, it would be nice to be able to call
> getArgument("file") or getArgument('f'). I will volunteer to submit any
> patch on this if others would find this a useful feature.
Good idea ... will await patch ;)
--
Cheers,
Pete
-----------------------------------------------------------
I don't suffer from insanity. I enjoy every minute of it.
-----------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
CLArgsParser.java.diff.gz
ClutilTestCase.java.diff.gz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]