Closed colonelsammy closed 6 years ago
Ah...the placeholder does appear in the help text!
Not completely useless then... ;-)
Ah! You've discovered the "lack of documentation" bug :-) Sorry about that - and sorry I didn't respond sooner. Looks like you worked it out. Is there still an outstanding question/ issue here now?
I'd still like to be able to use 'placeholder' as a default but I'm wary of breaking other existing code...perhaps ArgBuilder could have a bindDefaultValue(..., defaultPlaceholder) or something like that?
[only needed for those bind()s that have a placeholder, obviously ;-) ]
I handle default values by just setting them in the class initializer
I'm a bit confused by the placeholder...what I think I want is to be able to set a default value for that field; I know that I can set it in the options struct constructor but I was expecting to be able to use the placeholder. However, that didn't work if the option never got specified...
So I left the placeholder empty (since it didn't get used) but then when I run it it throws an invalid conversion:
This is the code:
I know that I can make this work by specifiying the placeholder, but it never seems to get used (using the 'bind' that is commented out above):
How do I make the placeholder useful? Can the value be 'optional'?
Is it possible/desirable to set the bound member variable (perhaps to the value of the placeholder) even if I don't specify the option on the command line (I;m not sure what side effects this might have on existing code...)?