cmdr
Check-in [abd6c63e65]
Not logged in

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

Overview
Comment:cmdr::actor - Better error message for "set"
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: abd6c63e65f151f72255e99dad38ce91e3c89e63
User & Date: aku 2014-05-23 06:17:52.070
Context
2014-05-23
06:17
Brought tests uptodate regarding the recent code extensions and changes. check-in: b35f9a1c77 user: aku tags: trunk
06:17
cmdr::actor - Better error message for "set" check-in: abd6c63e65 user: aku tags: trunk
00:30
Pulled some stackato-cli utility packages into cmdr, incomplete work (tty, color, simple interaction) check-in: 7104561dd4 user: andreask tags: trunk
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to actor.tcl.
177
178
179
180
181
182
183




184
185

186
187
188
189
190
191
192
177
178
179
180
181
182
183
184
185
186
187
188

189
190
191
192
193
194
195
196







+
+
+
+

-
+







		default {
		    return -code error -errorcode {CMDR SET UNKNOWN OPTION} \
			"Unknown option \"$o\", expected -extend"
		}
	    }
	}
	if {[llength $args] != 1} {
	    # The method of getting the command name is so complicated
	    # to account for calls from specifications, where this is
	    # aliased as 'common'.
	    set cmd [lindex [dict get [info frame -1] cmd] 0]
	    return -code error -errorcode {CMDR SET WRONG-ARGS} \
		"Expected one argument."
		"wrong # args: should be \"$cmd key ?-extend? data\""
	}
	set data [lindex $args 0]
	if {$extend} {
	    set data [my get $key]$data
	}
	dict set mystore $key $data
	return