Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Added class-global flag for default interactivity of privates/configs |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
da1183bcac8efe56ce5416220bf33368 |
User & Date: | aku 2013-03-21 05:51:05.449 |
Context
2013-03-21
| ||
06:33 | Added class method to parameters for easy access of their config instance from callbacks. Added a when-set callback invoked during parsing. Added ability to lock out parameters (parameter exclusion constraints). check-in: c3e855e99d user: aku tags: trunk | |
05:51 | Added class-global flag for default interactivity of privates/configs check-in: da1183bcac user: aku tags: trunk | |
05:40 | Multiple changes: - Updated testsuite for [00b6c20621]. - Added 'interactive' setting to privates. Default no prevents testsuite from going into interactive mode. - Dropped undocumented options from shown state and command completion (Interactive entry of arguments for a private). Exceptions: Still available as commands, and shown/completed when user has already entered data, proving their knowledge of them. - New pseudo-command .help, show help for the current command. - Help formatting: No empty lines when description is empty. - Additional help formats: list, and short check-in: 4c73bb7f4d user: aku tags: trunk | |
Changes
Changes to tests/xo.test.
︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 | kt local testing xo # # ## ### ##### ######## ############# ##################### ## Get the support ::kt source support.tcl # # ## ### ##### ######## ############# ##################### ::kt source xo_main.tests ; # Entrypoints. ::kt source xo_officer.tests ; # Action DSL ::kt source xo_private.tests ; # Parameter DSL, collection ::kt source xo_parameter.tests ; # Parameter DSL, details | > > > > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | kt local testing xo # # ## ### ##### ######## ############# ##################### ## Get the support ::kt source support.tcl # We do not want various tests to invoke a command loop. But # uncommenting the next line serves as test that the class flag is # properly taken, by causing exactly that. #xo::config interactive 1 # # ## ### ##### ######## ############# ##################### ::kt source xo_main.tests ; # Entrypoints. ::kt source xo_officer.tests ; # Action DSL ::kt source xo_private.tests ; # Parameter DSL, collection ::kt source xo_parameter.tests ; # Parameter DSL, details |
︙ | ︙ |
Changes to xo_config.tcl.
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | package require xo::util package require xo::help # # ## ### ##### ######## ############# ##################### ## Definition oo::class create ::xo::config { # # ## ### ##### ######## ############# ## Lifecycle. constructor {context spec} { my Colors # Import the context (xo::private). interp alias {} [self namespace]::context {} $context # Initialize collection state. | > > > > > > > > > > | | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | package require xo::util package require xo::help # # ## ### ##### ######## ############# ##################### ## Definition oo::class create ::xo::config { # # ## ### ##### ######## ############# classmethod interactive {{value 1}} { variable ourinteractive $value return } # # ## ### ##### ######## ############# ## Lifecycle. constructor {context spec} { classvariable ourinteractive if {![info exists ourinteractive]} { set ourinteractive 0 } my Colors # Import the context (xo::private). interp alias {} [self namespace]::context {} $context # Initialize collection state. set myinteractive $ourinteractive set mymap {} ;# parameter name -> object set mypub {} ;# parameter name -> object, non-state only, i.e. user visible set myoption {} ;# option -> object set myfullopt {} ;# option prefix -> option set myargs {} ;# List of argument names. # Import the DSL commands. |
︙ | ︙ |