* Mark Summerfield <
[email protected]>
| On Thu, 11 Jul 2024 13:12:52 +0200, Schelte wrote:
| > proc make_file_menu {app} {
| > .menu.file add command -command [list $app on_quit] \
| > -label Quit -underline 0 -accelerator Ctrl+Q
| > }
| >
| > Originally you had $app inside curly braces, which prevented it from
| > being substituted at definition time. At execution time, the app
| > variable was out of scope.
| Thank you, that works great.
To save you trouble on your TCL-road ahead, make sure you understand the difference between
-command {$app on_quit}
which you had originally in your code and
-command [list $app on_quit]
which is the correct way of doing things and
-command "$app on_quit"
which also most probably would "work" right now,
until some day it won't :-)...
HTH
R'
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)