cmdr
Check-in [7501cc673b]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

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

Overview
Comment:When printing config state, show parameter inheritance. Plus label now showing regular names, no titling.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7501cc673bf9d4480faa37bbf1af629a88202d0c
User & Date: andreask 2014-10-08 21:13:20
Context
2014-11-04
18:05
cmdr::help - Prevent the space allocated to descriptions in the categorized help from getting to small. Negatives trigger an error in adjust, and anything below 10 will generate very short tall columns. Better to misformat (cut at terminal edge, or wrap-around) for these cases. Bumped version to 1.3.2. check-in: b64206b4e3 user: andreask tags: trunk
2014-10-08
21:13
When printing config state, show parameter inheritance. Plus label now showing regular names, no titling. check-in: 7501cc673b user: andreask tags: trunk
2014-09-19
17:52
cmdr::parameter - Utility DSL commands for easy locking (disallow) and trivial accss to siblings (touch, touch?). Semantic change for when-* hooks. Now storing a list and multiple when-set definitions accumulate. Tweaking locking error message to use better name of the locked parameter. check-in: 9fc3922163 user: andreask tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to config.tcl.

1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
....
1414
1415
1416
1417
1418
1419
1420

1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
	set text {}
	set alldefined 1
	set somebad    0
	foreach label $labels para $plist {
	    set para [my lookup $para]

	    set label    [string totitle $label 0 0]
	    set required [$para required]
	    set islist   [$para list]
	    set defined  [$para set?]

	    try {
		set value [$para value]
		if {$value eq {}} {
................................................................................
		set alldefined 0
	    } else {
		#set label "$label "
	    }

	    if {$full} {
		append label " ("

		append label [expr {[$para ordered]    ? "o":"-"}]
		append label [expr {[$para cmdline]    ? "c":"-"}]
		append label [expr {[$para list]       ? "L":"-"}]
		append label [expr {[$para presence]   ? "P":"-"}]
		append label [expr {[$para documented] ? "d":"-"}]
		append label [expr {[$para isbool]     ? "B":"-"}]
		append label [expr {[$para hasdefault] ? "D":"-"}]
		append label [expr {[$para set?]   ? "!":"-"}]
		append label [expr {[$para defered]    ? ">":"-"}]

		append label [expr {[$para required] ? "/.." : [$para threshold] < 0 ? "/pt":"/th"}]

		append label ")"
		set sfx {              }
	    } else {
		append label [expr {[$para list]       ? " L":"  "}]
		set sfx {  }
	    }







|







 







>









<
|
<







1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
....
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430

1431

1432
1433
1434
1435
1436
1437
1438
	set text {}
	set alldefined 1
	set somebad    0
	foreach label $labels para $plist {
	    set para [my lookup $para]

	    #set label    [string totitle $label 0 0]
	    set required [$para required]
	    set islist   [$para list]
	    set defined  [$para set?]

	    try {
		set value [$para value]
		if {$value eq {}} {
................................................................................
		set alldefined 0
	    } else {
		#set label "$label "
	    }

	    if {$full} {
		append label " ("
		append label [expr {[$para inherited [self]] ? "^":"-"}]
		append label [expr {[$para ordered]    ? "o":"-"}]
		append label [expr {[$para cmdline]    ? "c":"-"}]
		append label [expr {[$para list]       ? "L":"-"}]
		append label [expr {[$para presence]   ? "P":"-"}]
		append label [expr {[$para documented] ? "d":"-"}]
		append label [expr {[$para isbool]     ? "B":"-"}]
		append label [expr {[$para hasdefault] ? "D":"-"}]
		append label [expr {[$para set?]       ? "!":"-"}]
		append label [expr {[$para defered]    ? ">":"-"}]

		append label [expr {[$para required]   ? "/.." : [$para threshold] < 0 ? "/pt":"/th"}]

		append label ")"
		set sfx {              }
	    } else {
		append label [expr {[$para list]       ? " L":"  "}]
		set sfx {  }
	    }

Changes to parameter.tcl.

183
184
185
186
187
188
189



190
191
192
193
194
195
196
    }

    method flag {} {
	my Option $mylabel
    }

    # Core classification properties



    method ordered      {} { return $myisordered }
    method cmdline      {} { return $myiscmdline }
    method required     {} { return $myisrequired }
    method defered      {} { return $myisdefered }
    method nopromote    {} { return $mynopromote }

    method list         {} { return $myislist }






>
>
>







183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
    }

    method flag {} {
	my Option $mylabel
    }

    # Core classification properties
    method inherited {config} {
	expr {$config ne [my config]}
    }
    method ordered      {} { return $myisordered }
    method cmdline      {} { return $myiscmdline }
    method required     {} { return $myisrequired }
    method defered      {} { return $myisdefered }
    method nopromote    {} { return $mynopromote }

    method list         {} { return $myislist }