Tcl Library Source Code

Check-in [9064b9d02f]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update to-do list
Timelines: family | ancestors | descendants | both | amg-argparse
Files: files | file ages | folders
SHA3-256: 9064b9d02f2f36099ab87cfc523c87c40420091238589a841f60ba05d648fff6
User & Date: andy 2019-04-26 17:51:32
Context
2019-04-26
17:52
Beginnings of effort to rework validation to allow validators to see all results, not just the current value Leaf check-in: 36387739e6 user: andy tags: amg-argparse-validation
17:51
Update to-do list Leaf check-in: 9064b9d02f user: andy tags: amg-argparse
17:51
Continue writing documentation check-in: 2c12551d21 user: andy tags: amg-argparse
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to modules/argparse/TODO.md.

            1  +- Add switch to put parameters before switches
            2  +  - Some Tcl commands work this way
            3  +  - Examples: [chan copy], [zlib gunzip], [clock], [registry broadcast]
     1      4   - Remove `-boolean` 
     2      5     - Instead, act as if `-boolean` were always being passed to [argparse]
     3      6     - Remove `-keep` as well
     4      7     - Add an `-unset` switch to selectively change the behavior to unsetting a
     5      8       variable or omitting a dict key when the switch is not present
     6      9   - Remove `-switch` and `-parameter`
     7     10     - Instead make `-` "shorthand" mandatory when declaring a switch
           11  +- Change from a result dict to a result array
           12  +  - Makes more complex validation expressions possible
           13  +  - If `-inline` is used, use [array get] to get the return value
           14  +- Allow validation expressions to see the result array, not just the switch or
           15  +  parameter being validated
           16  +  - Use [upvar] rather than [array get] and [array set] to expose the result
           17  +    array into the validation expression
           18  +  - Also use [upvar] to link the arg variable to the current value
           19  +  - Validation expressions can then be (ab)used to modify the results
           20  +  - Necessary to do validation expressions as a separate final pass
           21  +  - Still do enumeration immediately so their final result values will be
           22  +    reflected in the validation
           23  +- Allow enumerations to have validation expressions
           24  +  - No real reason why these two have to conflict
     8     25   - Documentation
     9     26     - Instead of having a big comment, use doctools
    10     27   - Help text generation
    11     28     - Parameter and switch descriptions given by per-element `-help` switch
    12     29     - Need overall `-help` switch to provide narrative description
    13     30     - May need special grouping elements to organize switches and parameters
    14     31     - Text formatting and word wrapping