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.142
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
Unified Diff Ignore Whitespace Patch
Changes to officer.tcl.
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    # automatically as needed.

    method extend {path arguments action} {
	if {[llength $path] == 1} {
	    # Reached the bottom of the recursion.
	    # Generate the private handling arguments and action.
	    set cmd [lindex $path 0]
	    Private $cmd $arguments $action
	    return
	}

	# Recurse, creating the intermediate officers as needed.
	set path [lassign $path cmd]
	if {![has $cmd]} {
	    Officer $cmd {}
	}

	[my lookup $cmd] extend $path $arguments $action
	return
    }

    # # ## ### ##### ######## #############







|





|
|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
    # automatically as needed.

    method extend {path arguments action} {
	if {[llength $path] == 1} {
	    # Reached the bottom of the recursion.
	    # Generate the private handling arguments and action.
	    set cmd [lindex $path 0]
	    my Private $cmd $arguments $action
	    return
	}

	# Recurse, creating the intermediate officers as needed.
	set path [lassign $path cmd]
	if {![my has $cmd]} {
	    my Officer $cmd {}
	}

	[my lookup $cmd] extend $path $arguments $action
	return
    }

    # # ## ### ##### ######## #############