diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-25 15:30:19 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-05-25 15:30:19 (GMT) |
commit | 925e9507ee2ff21b2fc0ae03cce706a035662fdf (patch) | |
tree | 5a9bd4ccdbbc866bf81c4e80d05fdb219db151e5 /doc | |
parent | abc0ed21d1172dd1ddf06c1fd922528d722cbad1 (diff) | |
download | tcl-925e9507ee2ff21b2fc0ae03cce706a035662fdf.zip tcl-925e9507ee2ff21b2fc0ae03cce706a035662fdf.tar.gz tcl-925e9507ee2ff21b2fc0ae03cce706a035662fdf.tar.bz2 |
Add example
Diffstat (limited to 'doc')
-rw-r--r-- | doc/registry.n | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/registry.n b/doc/registry.n index 8d1352b..879fc32 100644 --- a/doc/registry.n +++ b/doc/registry.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: registry.n,v 1.9 2004/03/03 23:58:14 hobbs Exp $ +'\" RCS: @(#) $Id: registry.n,v 1.10 2004/05/25 15:30:19 dkf Exp $ '\" .so man.macros .TH registry n 1.1 registry "Tcl Bundled Packages" @@ -179,9 +179,24 @@ In addition to the symbolically named types listed above, unknown types are identified using a 32-bit integer that corresponds to the type code returned by the system interfaces. In this case, the data is represented exactly in Tcl, including any embedded nulls. - .SH "PORTABILITY ISSUES" The registry command is only available on Windows. +.SH EXAMPLE +Print out how double-clicking on a Tcl script file will invoke a Tcl +interpreter: +.CS +package require registry +set ext .tcl + +# Read the type name +set type [registry get HKEY_CLASSES_ROOT\e\e$ext {}] +# Work out where to look for the command +set path HKEY_CLASSES_ROOT\e\e$type\e\eShell\e\eOpen\e\ecommand +# Read the command! +set command [registry get $path {}] + +puts "$ext opens with $command" +.CE .SH KEYWORDS registry |