cmdr
Check-in [91942da7f1]
Not logged in

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

Overview
Comment:parameter - Added convenience command stop!". Bumped version to 1.6.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:91942da7f1052394b51932847f5c730171c10d6b
User & Date: aku 2015-07-14 03:59:32
Context
2015-07-15
23:29
Clarify integer offset check-in: 85fb0a7a39 user: andreask tags: trunk
2015-07-14
03:59
parameter - Added convenience command stop!". Bumped version to 1.6. check-in: 91942da7f1 user: aku tags: trunk
03:38
Tweaked the in-source docs for "less" a bit. check-in: 83ac211042 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/parts/dsl_para_callbacks.inc.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35




36
37
38
39
40
41
42
43
44
45
46




47
48
49
50
51
52
53
application drives access to parameters through their methods.

[list_begin definitions]

[comment {- - -- --- ----- -------- -------------}]
[call [cmd when-complete] [arg cmdprefix]]

This command declares the state-change callback to invoke when the
[term {internal representation}] of the [term parameter] is generated
from the [term {string representation}], or the various ways of
getting a default.

[para] The callback is invoked with two arguments, the
[package cmdr::parameter] instance of the changed [term parameter],
and its [term {internal representation}], in this order.





[comment {- - -- --- ----- -------- -------------}]
[call [cmd when-set] [arg cmdprefix]]

This command declares the state-change callback to invoke when the
[term {string representation}] of the [term parameter] is set during
command line parsing.

[para] The callback is invoked with two arguments, the
[package cmdr::parameter] instance of the changed [term parameter],
and its [term {string representation}], in this order.





[list_end]

Due to their nature these callbacks are invoked at runtime during
either the [term Parsing], [term Completion], or [term Execution]
phases.








|







>
>
>
>




|






>
>
>
>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
application drives access to parameters through their methods.

[list_begin definitions]

[comment {- - -- --- ----- -------- -------------}]
[call [cmd when-complete] [arg cmdprefix]]

This command declares a state-change callback to invoke when the
[term {internal representation}] of the [term parameter] is generated
from the [term {string representation}], or the various ways of
getting a default.

[para] The callback is invoked with two arguments, the
[package cmdr::parameter] instance of the changed [term parameter],
and its [term {internal representation}], in this order.

[para] Multiple callbacks can be declared, by using this command
several times. The callbacks are executed in the order of their
declaration.

[comment {- - -- --- ----- -------- -------------}]
[call [cmd when-set] [arg cmdprefix]]

This command declares a state-change callback to invoke when the
[term {string representation}] of the [term parameter] is set during
command line parsing.

[para] The callback is invoked with two arguments, the
[package cmdr::parameter] instance of the changed [term parameter],
and its [term {string representation}], in this order.

[para] Multiple callbacks can be declared, by using this command
several times. The callbacks are executed in the order of their
declaration.

[list_end]

Due to their nature these callbacks are invoked at runtime during
either the [term Parsing], [term Completion], or [term Execution]
phases.

Added doc/parts/dsl_para_support.inc.































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

The parameter language currently provides four supporting commands
which provide quick access to commonly useful functionality. All the
helper command return anonymous procedures for use with the various
callbacks of a parameter.

[list_begin definitions]

[comment {- - -- --- ----- -------- -------------}]
[call [cmd stop!]]

The returned callback unconditionally declares its parameter as [term undefined]. This is useful in combination with [cmd generate] to abort value processing for an [term optional] [term input] after the interaction stage.

[para] This is for inputs which are not optional per se, but declared
as such to allow interactive entry when missing. A [example {
    generate [stop!]
}] clause then ensures an error when interactive entry gets disabled,
either global, or for the specific command.

[call [cmd touch] [arg name] [arg value]]

The returned callback sets the [arg name]d sibling parameter to the
specified [arg value]. A simple method of communication between
parameters of a command.

[para] Useful for use with [cmd when-set] and/or [cmd when-complete]

[call [cmd touch] [arg name] [arg value]]

The returned callback sets the [arg name]d sibling parameter to the
specified [arg value], if and only if that parameter exists. A simple
method of communication between parameters of a command, where the
sibling may not exists, depending on usage context.

[para] Useful for use with [cmd when-set] and/or [cmd when-complete]

[call [cmd disallow] [arg name]]

This command simplifies the use of the parameter's [method lock]
method to signal that the [arg name]d parameter cannot be used with
this one, returning a callback generating all the proper arguments
required by the method, especially the name of the parameter invoking
the lock.

[para] Useful for use with [cmd when-set].

[list_end]

Changes to doc/parts/dsl_parameter.inc.

29
30
31
32
33
34
35



[include dsl_para_reps.inc]

[para][subsection Validation]
[include dsl_para_validation.inc]

[para][subsection Signaling]
[include dsl_para_callbacks.inc]










>
>
>
29
30
31
32
33
34
35
36
37
38
[include dsl_para_reps.inc]

[para][subsection Validation]
[include dsl_para_validation.inc]

[para][subsection Signaling]
[include dsl_para_callbacks.inc]

[para][subsection {Supporting commands}]
[include dsl_para_support.inc]

Changes to embedded/man/files/cmdr_dsl_parameter.n.

307
308
309
310
311
312
313








314
315
316
317
318
319
320
...
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683




684
685
686
687
688
689
690
691
692




693
694
695
696
697
698
699
...
711
712
713
714
715
716
717













































718
719
720
721
722
723
724
.sp
\fBpresence\fR
.sp
\fBwhen-complete\fR \fIcmdprefix\fR
.sp
\fBwhen-set\fR \fIcmdprefix\fR
.sp








.BE
.SH DESCRIPTION
.PP
Welcome to the Cmdr project, written by Andreas Kupries\&.
.PP
For availability please read \fICmdr - How To Get The Sources\fR\&.
.PP
................................................................................
.PP
The two callbacks not yet described are the state-change
callbacks through which the framework can actively drive parts of the
application while processing the command line, whereas normally the
application drives access to parameters through their methods\&.
.TP
\fBwhen-complete\fR \fIcmdprefix\fR
This command declares the state-change callback to invoke when the
\fIinternal representation\fR of the \fIparameter\fR is generated
from the \fIstring representation\fR, or the various ways of
getting a default\&.
.sp
The callback is invoked with two arguments, the
\fBcmdr::parameter\fR instance of the changed \fIparameter\fR,
and its \fIinternal representation\fR, in this order\&.




.TP
\fBwhen-set\fR \fIcmdprefix\fR
This command declares the state-change callback to invoke when the
\fIstring representation\fR of the \fIparameter\fR is set during
command line parsing\&.
.sp
The callback is invoked with two arguments, the
\fBcmdr::parameter\fR instance of the changed \fIparameter\fR,
and its \fIstring representation\fR, in this order\&.




.PP
Due to their nature these callbacks are invoked at runtime during
either the \fIParsing\fR, \fICompletion\fR, or \fIExecution\fR
phases\&.
The details are shown in the table below\&. The specification commands
influencing the timing, i\&.e\&. forcing the use in a specific phase are
shown in the intersection of callback and phase\&.
................................................................................
validate (validate) |          | test    | immediate   | defered
validate (release)  |          | test    | immediate   | defered
--------------------+----------+---------+-------------+-----------
when-complete       |          |         | immediate   | defered
--------------------+----------+---------+-------------+-----------

.CE













































.PP
Please continue reading with \fICmdr - Runtime Processing Flow\fR\&.
.SH "RELATED DOCUMENTS"
.IP [1]
\fICmdr - Introduction to the project\fR
.IP [2]
\fICmdr - License\fR







>
>
>
>
>
>
>
>







 







|







>
>
>
>


|






>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
...
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
...
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
.sp
\fBpresence\fR
.sp
\fBwhen-complete\fR \fIcmdprefix\fR
.sp
\fBwhen-set\fR \fIcmdprefix\fR
.sp
\fBstop!\fR
.sp
\fBtouch\fR \fIname\fR \fIvalue\fR
.sp
\fBtouch\fR \fIname\fR \fIvalue\fR
.sp
\fBdisallow\fR \fIname\fR
.sp
.BE
.SH DESCRIPTION
.PP
Welcome to the Cmdr project, written by Andreas Kupries\&.
.PP
For availability please read \fICmdr - How To Get The Sources\fR\&.
.PP
................................................................................
.PP
The two callbacks not yet described are the state-change
callbacks through which the framework can actively drive parts of the
application while processing the command line, whereas normally the
application drives access to parameters through their methods\&.
.TP
\fBwhen-complete\fR \fIcmdprefix\fR
This command declares a state-change callback to invoke when the
\fIinternal representation\fR of the \fIparameter\fR is generated
from the \fIstring representation\fR, or the various ways of
getting a default\&.
.sp
The callback is invoked with two arguments, the
\fBcmdr::parameter\fR instance of the changed \fIparameter\fR,
and its \fIinternal representation\fR, in this order\&.
.sp
Multiple callbacks can be declared, by using this command
several times\&. The callbacks are executed in the order of their
declaration\&.
.TP
\fBwhen-set\fR \fIcmdprefix\fR
This command declares a state-change callback to invoke when the
\fIstring representation\fR of the \fIparameter\fR is set during
command line parsing\&.
.sp
The callback is invoked with two arguments, the
\fBcmdr::parameter\fR instance of the changed \fIparameter\fR,
and its \fIstring representation\fR, in this order\&.
.sp
Multiple callbacks can be declared, by using this command
several times\&. The callbacks are executed in the order of their
declaration\&.
.PP
Due to their nature these callbacks are invoked at runtime during
either the \fIParsing\fR, \fICompletion\fR, or \fIExecution\fR
phases\&.
The details are shown in the table below\&. The specification commands
influencing the timing, i\&.e\&. forcing the use in a specific phase are
shown in the intersection of callback and phase\&.
................................................................................
validate (validate) |          | test    | immediate   | defered
validate (release)  |          | test    | immediate   | defered
--------------------+----------+---------+-------------+-----------
when-complete       |          |         | immediate   | defered
--------------------+----------+---------+-------------+-----------

.CE
.PP
.SS "SUPPORTING COMMANDS"
The parameter language currently provides four supporting commands
which provide quick access to commonly useful functionality\&. All the
helper command return anonymous procedures for use with the various
callbacks of a parameter\&.
.TP
\fBstop!\fR
The returned callback unconditionally declares its parameter as \fIundefined\fR\&. This is useful in combination with \fBgenerate\fR to abort value processing for an \fIoptional\fR \fIinput\fR after the interaction stage\&.
.sp
This is for inputs which are not optional per se, but declared
as such to allow interactive entry when missing\&. A
.CS


    generate [stop!]

.CE
.IP clause then ensures an error when interactive entry gets disabled,
either global, or for the specific command\&.
.TP
\fBtouch\fR \fIname\fR \fIvalue\fR
The returned callback sets the \fIname\fRd sibling parameter to the
specified \fIvalue\fR\&. A simple method of communication between
parameters of a command\&.
.sp
Useful for use with \fBwhen-set\fR and/or \fBwhen-complete\fR
.TP
\fBtouch\fR \fIname\fR \fIvalue\fR
The returned callback sets the \fIname\fRd sibling parameter to the
specified \fIvalue\fR, if and only if that parameter exists\&. A simple
method of communication between parameters of a command, where the
sibling may not exists, depending on usage context\&.
.sp
Useful for use with \fBwhen-set\fR and/or \fBwhen-complete\fR
.TP
\fBdisallow\fR \fIname\fR
This command simplifies the use of the parameter's \fBlock\fR
method to signal that the \fIname\fRd parameter cannot be used with
this one, returning a callback generating all the proper arguments
required by the method, especially the name of the parameter invoking
the lock\&.
.sp
Useful for use with \fBwhen-set\fR\&.
.PP
.PP
Please continue reading with \fICmdr - Runtime Processing Flow\fR\&.
.SH "RELATED DOCUMENTS"
.IP [1]
\fICmdr - Introduction to the project\fR
.IP [2]
\fICmdr - License\fR

Changes to embedded/www/doc/files/cmdr_dsl_parameter.html.

118
119
120
121
122
123
124

125
126
127
128
129
130
131
...
147
148
149
150
151
152
153




154
155
156
157
158
159
160
...
455
456
457
458
459
460
461
462
463
464
465
466
467
468



469
470
471
472
473
474
475



476
477
478
479
480
481
482
...
491
492
493
494
495
496
497



































498
499
500
501
502
503
504
<li class="section"><a href="#section3">Language Reference</a>
<ul>
<li class="subsection"><a href="#subsection1">Naming</a></li>
<li class="subsection"><a href="#subsection2">General control</a></li>
<li class="subsection"><a href="#subsection3">Representations</a></li>
<li class="subsection"><a href="#subsection4">Validation</a></li>
<li class="subsection"><a href="#subsection5">Signaling</a></li>

</ul>
</li>
<li class="section"><a href="#section4">Related Documents</a></li>
<li class="section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
................................................................................
<li><a href="#12"><b class="cmd">list</b></a></li>
<li><a href="#13"><b class="cmd">defered</b></a></li>
<li><a href="#14"><b class="cmd">immediate</b></a></li>
<li><a href="#15"><b class="cmd">validate</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#16"><b class="cmd">presence</b></a></li>
<li><a href="#17"><b class="cmd">when-complete</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#18"><b class="cmd">when-set</b> <i class="arg">cmdprefix</i></a></li>




</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Cmdr project, written by Andreas Kupries.</p>
<p>For availability please read <i class="term"><a href="cmdr_howto_get_sources.html">Cmdr - How To Get The Sources</a></i>.</p>
<p>This document is for users of the cmdr framework. It introduces the
................................................................................
(i.e. <b class="cmd">apply</b>).</p>
<p>The two callbacks not yet described are the state-change
callbacks through which the framework can actively drive parts of the
application while processing the command line, whereas normally the
application drives access to parameters through their methods.</p>
<dl class="definitions">
<dt><a name="17"><b class="cmd">when-complete</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This command declares the state-change callback to invoke when the
<i class="term">internal representation</i> of the <i class="term">parameter</i> is generated
from the <i class="term">string representation</i>, or the various ways of
getting a default.</p>
<p>The callback is invoked with two arguments, the
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> instance of the changed <i class="term">parameter</i>,
and its <i class="term">internal representation</i>, in this order.</p></dd>



<dt><a name="18"><b class="cmd">when-set</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This command declares the state-change callback to invoke when the
<i class="term">string representation</i> of the <i class="term">parameter</i> is set during
command line parsing.</p>
<p>The callback is invoked with two arguments, the
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> instance of the changed <i class="term">parameter</i>,
and its <i class="term">string representation</i>, in this order.</p></dd>



</dl>
<p>Due to their nature these callbacks are invoked at runtime during
either the <i class="term">Parsing</i>, <i class="term">Completion</i>, or <i class="term">Execution</i>
phases.
The details are shown in the table below. The specification commands
influencing the timing, i.e. forcing the use in a specific phase are
shown in the intersection of callback and phase.</p>
................................................................................
generate            |          |         | immediate   | defered
validate (validate) |          | test    | immediate   | defered
validate (release)  |          | test    | immediate   | defered
--------------------+----------+---------+-------------+-----------
when-complete       |          |         | immediate   | defered
--------------------+----------+---------+-------------+-----------
</pre>



































<p>Please continue reading with <i class="term"><a href="cmdr_flow.html">Cmdr - Runtime Processing Flow</a></i>.</p>
</div>
</div>
<div id="section4" class="section"><h2><a name="section4">Related Documents</a></h2>
<ol class="enumerated">
<li><p><i class="term"><a href="cmdr_introduction.html">Cmdr - Introduction to the project</a></i></p></li>
<li><p><i class="term"><a href="cmdr_license.html">Cmdr - License</a></i></p></li>







>







 







>
>
>
>







 







|





|
>
>
>

|




|
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
...
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<li class="section"><a href="#section3">Language Reference</a>
<ul>
<li class="subsection"><a href="#subsection1">Naming</a></li>
<li class="subsection"><a href="#subsection2">General control</a></li>
<li class="subsection"><a href="#subsection3">Representations</a></li>
<li class="subsection"><a href="#subsection4">Validation</a></li>
<li class="subsection"><a href="#subsection5">Signaling</a></li>
<li class="subsection"><a href="#subsection6">Supporting commands</a></li>
</ul>
</li>
<li class="section"><a href="#section4">Related Documents</a></li>
<li class="section"><a href="#section5">Bugs, Ideas, Feedback</a></li>
<li class="section"><a href="#keywords">Keywords</a></li>
<li class="section"><a href="#copyright">Copyright</a></li>
</ul>
................................................................................
<li><a href="#12"><b class="cmd">list</b></a></li>
<li><a href="#13"><b class="cmd">defered</b></a></li>
<li><a href="#14"><b class="cmd">immediate</b></a></li>
<li><a href="#15"><b class="cmd">validate</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#16"><b class="cmd">presence</b></a></li>
<li><a href="#17"><b class="cmd">when-complete</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#18"><b class="cmd">when-set</b> <i class="arg">cmdprefix</i></a></li>
<li><a href="#19"><b class="cmd">stop!</b></a></li>
<li><a href="#20"><b class="cmd">touch</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#21"><b class="cmd">touch</b> <i class="arg">name</i> <i class="arg">value</i></a></li>
<li><a href="#22"><b class="cmd">disallow</b> <i class="arg">name</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="section"><h2><a name="section1">Description</a></h2>
<p>Welcome to the Cmdr project, written by Andreas Kupries.</p>
<p>For availability please read <i class="term"><a href="cmdr_howto_get_sources.html">Cmdr - How To Get The Sources</a></i>.</p>
<p>This document is for users of the cmdr framework. It introduces the
................................................................................
(i.e. <b class="cmd">apply</b>).</p>
<p>The two callbacks not yet described are the state-change
callbacks through which the framework can actively drive parts of the
application while processing the command line, whereas normally the
application drives access to parameters through their methods.</p>
<dl class="definitions">
<dt><a name="17"><b class="cmd">when-complete</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This command declares a state-change callback to invoke when the
<i class="term">internal representation</i> of the <i class="term">parameter</i> is generated
from the <i class="term">string representation</i>, or the various ways of
getting a default.</p>
<p>The callback is invoked with two arguments, the
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> instance of the changed <i class="term">parameter</i>,
and its <i class="term">internal representation</i>, in this order.</p>
<p>Multiple callbacks can be declared, by using this command
several times. The callbacks are executed in the order of their
declaration.</p></dd>
<dt><a name="18"><b class="cmd">when-set</b> <i class="arg">cmdprefix</i></a></dt>
<dd><p>This command declares a state-change callback to invoke when the
<i class="term">string representation</i> of the <i class="term">parameter</i> is set during
command line parsing.</p>
<p>The callback is invoked with two arguments, the
<b class="package"><a href="cmdr_parameter.html">cmdr::parameter</a></b> instance of the changed <i class="term">parameter</i>,
and its <i class="term">string representation</i>, in this order.</p>
<p>Multiple callbacks can be declared, by using this command
several times. The callbacks are executed in the order of their
declaration.</p></dd>
</dl>
<p>Due to their nature these callbacks are invoked at runtime during
either the <i class="term">Parsing</i>, <i class="term">Completion</i>, or <i class="term">Execution</i>
phases.
The details are shown in the table below. The specification commands
influencing the timing, i.e. forcing the use in a specific phase are
shown in the intersection of callback and phase.</p>
................................................................................
generate            |          |         | immediate   | defered
validate (validate) |          | test    | immediate   | defered
validate (release)  |          | test    | immediate   | defered
--------------------+----------+---------+-------------+-----------
when-complete       |          |         | immediate   | defered
--------------------+----------+---------+-------------+-----------
</pre>
</div>
<div id="subsection6" class="subsection"><h3><a name="subsection6">Supporting commands</a></h3>
<p>The parameter language currently provides four supporting commands
which provide quick access to commonly useful functionality. All the
helper command return anonymous procedures for use with the various
callbacks of a parameter.</p>
<dl class="definitions">
<dt><a name="19"><b class="cmd">stop!</b></a></dt>
<dd><p>The returned callback unconditionally declares its parameter as <i class="term">undefined</i>. This is useful in combination with <b class="cmd">generate</b> to abort value processing for an <i class="term">optional</i> <i class="term">input</i> after the interaction stage.</p>
<p>This is for inputs which are not optional per se, but declared
as such to allow interactive entry when missing. A</p>
<pre class="example">
    generate [stop!]
</pre>
<p>clause then ensures an error when interactive entry gets disabled,
either global, or for the specific command.</p></dd>
<dt><a name="20"><b class="cmd">touch</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>The returned callback sets the <i class="arg">name</i>d sibling parameter to the
specified <i class="arg">value</i>. A simple method of communication between
parameters of a command.</p>
<p>Useful for use with <b class="cmd">when-set</b> and/or <b class="cmd">when-complete</b></p></dd>
<dt><a name="21"><b class="cmd">touch</b> <i class="arg">name</i> <i class="arg">value</i></a></dt>
<dd><p>The returned callback sets the <i class="arg">name</i>d sibling parameter to the
specified <i class="arg">value</i>, if and only if that parameter exists. A simple
method of communication between parameters of a command, where the
sibling may not exists, depending on usage context.</p>
<p>Useful for use with <b class="cmd">when-set</b> and/or <b class="cmd">when-complete</b></p></dd>
<dt><a name="22"><b class="cmd">disallow</b> <i class="arg">name</i></a></dt>
<dd><p>This command simplifies the use of the parameter's <b class="method">lock</b>
method to signal that the <i class="arg">name</i>d parameter cannot be used with
this one, returning a callback generating all the proper arguments
required by the method, especially the name of the parameter invoking
the lock.</p>
<p>Useful for use with <b class="cmd">when-set</b>.</p></dd>
</dl>
<p>Please continue reading with <i class="term"><a href="cmdr_flow.html">Cmdr - Runtime Processing Flow</a></i>.</p>
</div>
</div>
<div id="section4" class="section"><h2><a name="section4">Related Documents</a></h2>
<ol class="enumerated">
<li><p><i class="term"><a href="cmdr_introduction.html">Cmdr - Introduction to the project</a></i></p></li>
<li><p><i class="term"><a href="cmdr_license.html">Cmdr - License</a></i></p></li>

Changes to parameter.tcl.

300
301
302
303
304
305
306
307

308
309
310
311
312
313
314
...
348
349
350
351
352
353
354




355
356
357
358
359
360
361
....
1295
1296
1297
1298
1299
1300
1301
1302
	    {undocumented  Undocumented} \
	    {validate      Validate} \
	    {when-complete WhenComplete} \
	    {when-set      WhenSet} \
	    \
	    {touch    Touch} \
	    {touch?   TouchIfExists} \
	    {disallow Disallow}

	eval $valuespec

	# Postprocessing ... Fill in validation and other defaults

	my FillMissingValidation
	my FillMissingDefault
	my DefineStandardFlags
................................................................................
    }

    method Disallow {attr} {
	lambda {attr excluder p args} {
	    $p config $attr lock $excluder
	} $attr [my the-name]
    }





    # # ## ### ##### ######## #############
    ## Internal: Parameter DSL commands.

    method Label {name} {
	set mylabel $name
	return
................................................................................
	myisundefined mynopromote myhasinverted

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::parameter 1.5







|
>







 







>
>
>
>







 







|
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
...
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
....
1300
1301
1302
1303
1304
1305
1306
1307
	    {undocumented  Undocumented} \
	    {validate      Validate} \
	    {when-complete WhenComplete} \
	    {when-set      WhenSet} \
	    \
	    {touch    Touch} \
	    {touch?   TouchIfExists} \
	    {disallow Disallow} \
	    {stop!    Stop}
	eval $valuespec

	# Postprocessing ... Fill in validation and other defaults

	my FillMissingValidation
	my FillMissingDefault
	my DefineStandardFlags
................................................................................
    }

    method Disallow {attr} {
	lambda {attr excluder p args} {
	    $p config $attr lock $excluder
	} $attr [my the-name]
    }

    method Stop {} {
	lambda p { $p undefined! }
    }

    # # ## ### ##### ######## #############
    ## Internal: Parameter DSL commands.

    method Label {name} {
	set mylabel $name
	return
................................................................................
	myisundefined mynopromote myhasinverted

    # # ## ### ##### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready
package provide cmdr::parameter 1.6