From: Colin A. <col...@ho...> - 2007-09-30 20:26:03
|
> <col...@ho...> wrote: >=20 > > It sounds to me like the two should be equivalent. Certainly I do not = =20 > > need a list of lists. But I suppose if people were to supply multiple = =20 > > uses of an AP_STRING_LIST_OPTION, then this ought to be a list of lists= . =20 > > Is it possible to configure an option as not allowing repeats? >=20 > Hi Colin, >=20 > I have just added the possibility to specify a `maximum_occurrences' for = =20 > options. A value of "0" means that there is no upper limit. If you want a= n =20 > option to be given just once, calling "o.set_maximum_occurrences (1)" =20 > should be sufficient now. That will do fine. =20 > About your comma-seperated list of arguments, I am currently thinking =20 > about an elegant way to integrate this into the library. If you have a =20 > good solution, just go forward.=20 I haven't thought about a solution yet. >I am thinking about adding an optional =20 > 'split character' to AP_OPTION_WITH_PARAMETER that make '--foo=3Dx,y' =20 > equivalent to '--foo=3Dx --foo=3Dy'. I suppose that will do (assuming the split character is configurable). =20 > Also, I have strengthend the preconditions for parsing, and now you shoul= d =20 > have a contract violation if you add "two options with the same short or = =20 > long form" (it is a little more complicated with alternative options =20 > lists). The tag of the exception is currently 'valid_options', which is = =20 > not too good, but difficult to change. Is it committed yet? I will try it out when it is. > PPS: I still have the request open to have `mutually exclusive options', = =20 > but I have not found a good solution yet. Can't you just have references to other options which are to be regarded as= mutually exclusive? _________________________________________________________________ Feel like a local wherever you go. http://www.backofmyhand.com= |