You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Michael McKibben <mi...@hihat.net> on 2001/09/16 21:40:55 UTC
[PATCH] RE: proposed: CLI Args improvement
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:donaldp@apache.org]
Sent: Monday, September 10, 2001 6:43 PM
To: Avalon Development
Subject: Re: proposed: CLI Args improvement
On Tue, 11 Sep 2001 04:24, hihat@cyan.propagation.net 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: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
Re: [PATCH] RE: proposed: CLI Args improvement
Posted by Peter Donald <do...@apache.org>.
On Mon, 17 Sep 2001 05:40, Michael McKibben wrote:
> I've attached a patch for CLArgsParser and ClutilTestCase which adds the
> requested feature.
committed - taah!
> 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?
Not sure - it prolly does make more sense using "option" - what does everyone
else think?
> 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.
yay!
--
Cheers,
Pete
*-----------------------------------------------------*
| Never argue with an idiot, they'll drag you down to |
| their level, and beat you with experience |
*-----------------------------------------------------*
---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org