cmdr
Check-in [abd6c63e65]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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
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
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to actor.tcl.

   177    177   		default {
   178    178   		    return -code error -errorcode {CMDR SET UNKNOWN OPTION} \
   179    179   			"Unknown option \"$o\", expected -extend"
   180    180   		}
   181    181   	    }
   182    182   	}
   183    183   	if {[llength $args] != 1} {
          184  +	    # The method of getting the command name is so complicated
          185  +	    # to account for calls from specifications, where this is
          186  +	    # aliased as 'common'.
          187  +	    set cmd [lindex [dict get [info frame -1] cmd] 0]
   184    188   	    return -code error -errorcode {CMDR SET WRONG-ARGS} \
   185         -		"Expected one argument."
          189  +		"wrong # args: should be \"$cmd key ?-extend? data\""
   186    190   	}
   187    191   	set data [lindex $args 0]
   188    192   	if {$extend} {
   189    193   	    set data [my get $key]$data
   190    194   	}
   191    195   	dict set mystore $key $data
   192    196   	return