Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Created a new reserved common block, *config*, in the root-actor. Used to convey the active instance of cmdr::config to parameter callbacks. This different from the definition config for global parameters. For regular parameters it is the same as found as the first argument of the callback. The active instance is needed when a global parameter interacts with regular ones of the active private. |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
f121133cf217598fa5b4ba60571500aa |
User & Date: | andreask 2014-11-27 21:53:52.935 |
Context
2014-11-27
| ||
21:54 | Bump version of cmdr::config. check-in: dbe4876a14 user: andreask tags: trunk | |
21:53 | Created a new reserved common block, *config*, in the root-actor. Used to convey the active instance of cmdr::config to parameter callbacks. This different from the definition config for global parameters. For regular parameters it is the same as found as the first argument of the callback. The active instance is needed when a global parameter interacts with regular ones of the active private. check-in: f121133cf2 user: andreask tags: trunk | |
2014-11-26
| ||
23:12 | Followup on [463519edc6]. Fixed missing handling of "arglabel" data in the json, tcl, and sql help formats. check-in: 9660d12cb0 user: andreask tags: trunk | |
Changes
Changes to doc/cmdr_howto_development.man.
︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 | dictionary mapping from toplevel section/category names to an integer number to override the natural order of displaying these sections in the help. [para] The details are explained in section [term {Format Notes}] of [term [vset TITLE_HELP]]. [def [const *prefix*]] Publicly documented for users as read-only this block's value is managed by the framework. Set during the [term Dispatch] phase it provides to access to the actual command name used to invoke a [term private]. | > > > > > > > > > > > > > > > > > | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | dictionary mapping from toplevel section/category names to an integer number to override the natural order of displaying these sections in the help. [para] The details are explained in section [term {Format Notes}] of [term [vset TITLE_HELP]]. [def [const *config*]] Publicly documented for users as read-only this block's value is managed by the framework, and only found in the root actor. [para] It is a command name, i.e. object handle, to the active instance of [class cmdr::config]. For regular parameters that is the same handle given to them in their various callbacks. For a global parameter however the active config object is what the parameter is currently used by, whereas the callback argument is where it was defined in and inherited from. [para] This distinction is important when the global parameter has to look at and work with non-global parameters of the active private. These can only be found in the active context. [def [const *prefix*]] Publicly documented for users as read-only this block's value is managed by the framework. Set during the [term Dispatch] phase it provides to access to the actual command name used to invoke a [term private]. |
︙ | ︙ |
Changes to doc/parts/flow_execution.inc.
︙ | ︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | This can be used to modulate command messages and other context-dependent things. [para] [emph Note] that the block will not exist until after the first shell was active. This means that a missing [const *in-shell*] block should be treated like [const false]. [def [const *prefix*]] This block is read-only and found in the private actor for the currently executing action command prefix, accessible through the [package cmdr::config] instance method [method context]. Its value is managed by the framework. | > > > > > > > > > > > > > > > > > | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | This can be used to modulate command messages and other context-dependent things. [para] [emph Note] that the block will not exist until after the first shell was active. This means that a missing [const *in-shell*] block should be treated like [const false]. [def [const *config*]] This block is read-only, and only found in the root actor. Its value is managed by the framework, specifically by privates. [para] It is a command name, i.e. object handle, to the active instance of [class cmdr::config]. For regular parameters that is the same handle given to them in their various callbacks. For a global parameter however the active config object is what the parameter is currently used by, whereas the callback argument is where it was defined in and inherited from. [para] This distinction is important when the global parameter has to look at and work with non-global parameters of the active private. These can only be found in the active context. [def [const *prefix*]] This block is read-only and found in the private actor for the currently executing action command prefix, accessible through the [package cmdr::config] instance method [method context]. Its value is managed by the framework. |
︙ | ︙ |
Changes to private.tcl.
︙ | ︙ | |||
150 151 152 153 154 155 156 157 158 159 160 161 162 163 | } debug.cmdr/private {/done} } method Run {words} { debug.cmdr/private {} debug.cmdr/private {parse} try { config parse {*}$words } trap {CMDR CONFIG WRONG-ARGS NOT-ENOUGH} {e o} { # Prevent interaction if globally suppressed, or just for # this actor. if {![cmdr interactive?] || ![config interactive]} { | > > > | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | } debug.cmdr/private {/done} } method Run {words} { debug.cmdr/private {} debug.cmdr/private {parse} [my root] set *config* $myconfig try { config parse {*}$words } trap {CMDR CONFIG WRONG-ARGS NOT-ENOUGH} {e o} { # Prevent interaction if globally suppressed, or just for # this actor. if {![cmdr interactive?] || ![config interactive]} { |
︙ | ︙ | |||
173 174 175 176 177 178 179 180 181 182 183 184 185 186 | # default this are only the 'state' parameters. config force debug.cmdr/private {execute} # Call actual command, hand it the filled configuration. {*}$mycmd $myconfig debug.cmdr/private {/done} } method help {{prefix {}}} { debug.cmdr/private {} my Setup # help = dict (name -> command) | > | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | # default this are only the 'state' parameters. config force debug.cmdr/private {execute} # Call actual command, hand it the filled configuration. {*}$mycmd $myconfig [my root] set *config* $myconfig debug.cmdr/private {/done} } method help {{prefix {}}} { debug.cmdr/private {} my Setup # help = dict (name -> command) |
︙ | ︙ |