xojo-option-parser
xojo-option-parser copied to clipboard
Add default values for given options
You can currently specify the default option when you access it:
Dim name As String = options.StringValue("name", "World")
But if you access it multiple times, you have to specify the default value multiple times. The idea here is to specify it at the time the option is created:
Dim o As New Option("n", "name", "Name of person to say hello to")
o.DefaultValue = "World"
.. later ..
Print "Hello, " + options.StringValue("name")