aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-02-13 10:55:58 +1000
committerSteve Bennett <steveb@workware.net.au>2023-02-13 10:55:58 +1000
commit23603d8c3d482a9f92a949c9da1c71a0c8e68343 (patch)
treedab1cf80a3a58796f1b29b18039ccd98118cbe87
parent4255d54c254a5f49a19017a3071b8d7ff35e70e9 (diff)
downloadjimtcl-23603d8c3d482a9f92a949c9da1c71a0c8e68343.zip
jimtcl-23603d8c3d482a9f92a949c9da1c71a0c8e68343.tar.gz
jimtcl-23603d8c3d482a9f92a949c9da1c71a0c8e68343.tar.bz2
docs: document ensemble and namespace ensemble create
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim_tcl.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index fe432e0..af232c5 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -62,6 +62,7 @@ Changes between 0.81 and 0.82
6. `vwait -signal` is now supported
7. ./configure now defaults to '--full'
8. New `timerate` command as an improvement over `time`, somewhat compatible with TIP 527
+9. Add `ensemble` command and support for `namespace ensemble` (as an optional extension)
Changes between 0.80 and 0.81
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2169,6 +2170,25 @@ command. The legal +'options'+ are:
+*dict for, values, incr, append, lappend, update, info, replace*+ to be documented...
+ensemble
+~~~~~~~~
++*ensemble* 'name ?*-automap*? prefix'+
+
+Create a single ensemble command that redirects to individual commands based on the prefix.
+By default, the prefix is +'name'+ followed by a single space.
+
+For example, consider:
+
+ proc {test open} {name} { ... }
+ proc {test close} {handle} { ... }
+ proc {test show} {handle} { ... }
+ ensemble test
+
+Now the '+test+' command has been created that redirects based on the first argument.
+e.g.
+
+ test open $filename => {test open} $filename
+
env
~~~
+*env* '?name? ?default?'+
@@ -5552,6 +5572,9 @@ Provides namespace-related functions. See also: http://www.tcl.tk/man/tcl8.6/Tcl
+*namespace delete* '?namespace ...?'+::
Deletes all commands and variables with the given namespace prefixes.
++*namespace ensemble create*'+::
+ Creates an ensemble command for the current namespace (requires the 'ensemble' extension').
+
+*namespace eval* 'namespace arg ?arg...?'+::
Activates a namespace called +'namespace'+ and evaluates some code in that context.