cmdr
Check-in [f1bb89c324]
Not logged in

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

Overview
Comment:Fixed command scope problems in "extend".
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f1bb89c324fb97d5500ee4ae888da148ce608a94
User & Date: andreask 2014-01-30 18:09:43
Context
2014-02-06
05:04
officer - Modified method extend to return the new command instance, for dynamic re-configuration post-creation. check-in: 7fc0be3870 user: aku tags: trunk
2014-01-30
18:09
Fixed command scope problems in "extend". check-in: f1bb89c324 user: andreask tags: trunk
18:09
Fixed missing initialization in the main help generator. check-in: 3a146bdf51 user: andreask tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to officer.tcl.

   208    208       # automatically as needed.
   209    209   
   210    210       method extend {path arguments action} {
   211    211   	if {[llength $path] == 1} {
   212    212   	    # Reached the bottom of the recursion.
   213    213   	    # Generate the private handling arguments and action.
   214    214   	    set cmd [lindex $path 0]
   215         -	    Private $cmd $arguments $action
          215  +	    my Private $cmd $arguments $action
   216    216   	    return
   217    217   	}
   218    218   
   219    219   	# Recurse, creating the intermediate officers as needed.
   220    220   	set path [lassign $path cmd]
   221         -	if {![has $cmd]} {
   222         -	    Officer $cmd {}
          221  +	if {![my has $cmd]} {
          222  +	    my Officer $cmd {}
   223    223   	}
   224    224   
   225    225   	[my lookup $cmd] extend $path $arguments $action
   226    226   	return
   227    227       }
   228    228   
   229    229       # # ## ### ##### ######## #############