cmdr
Check-in [c14bea9a61]
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 - Fixed issue with -extend of common blocks. The extended block can be missing. Then the operation is a plain set. Bumped to version 1.3.1
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c14bea9a619b421feb75e4bd86b6265ec5d4aab2
User & Date: andreask 2015-03-06 01:54:15
Context
2015-03-06
20:44
Fix bug in history mgmt for a save-file in a directory. Ensure that the directory exists before writing/creating the file itself. check-in: 06c0827602 user: andreask tags: trunk
01:55
Drafts of new validation types: iso8601 date/time values check-in: d7efe5a253 user: andreask tags: more-vtypes
01:54
cmdr::actor - Fixed issue with -extend of common blocks. The extended block can be missing. Then the operation is a plain set. Bumped to version 1.3.1 check-in: c14bea9a61 user: andreask tags: trunk
2015-03-05
23:32
Fixed typo in comment check-in: fe7c7e9c1f user: andreask tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to actor.tcl.

   192    192   	    # aliased as 'common'.
   193    193   	    set cmd [lindex [dict get [info frame -1] cmd] 0]
   194    194   	    return -code error -errorcode {CMDR SET WRONG-ARGS} \
   195    195   		"wrong # args: should be \"$cmd key ?-extend? data\""
   196    196   	}
   197    197   	set data [lindex $args 0]
   198    198   	if {$extend} {
   199         -	    set data [my get $key]$data
          199  +	    if {[my has $key]} {
          200  +		set data [my get $key]$data
          201  +	    }
          202  +	    # Note how -extend is a no-op if the block to extend does
          203  +	    # not exist yet, and falls back to plain 'set'.
   200    204   	}
   201    205   	dict set mystore $key $data
   202    206   	return
   203    207       }
   204    208   
   205    209       method lappend {key data} {
   206    210   	debug.cmdr/actor {}
................................................................................
   370    374   
   371    375       ##
   372    376       # # ## ### ##### ######## #############
   373    377   }
   374    378   
   375    379   # # ## ### ##### ######## ############# #####################
   376    380   ## Ready
   377         -package provide cmdr::actor 1.3
          381  +package provide cmdr::actor 1.3.1