Kim,
Firstly I would strongly recommend that you use GRIDPLUS2 (http://
www.satisoft.com/tcltk/gridplus2). This has been the main/developed
version since 2006. GRIDPLUS2 has considerably more functionality than
the earlier version. Almost every screen/window layout can be created
with significantly less code.
I suggest you take a look at Example 4 (
http://www.satisoft.com/tcltk/
gridplus2/example4.html) as this uses some of the features you are
using in your example.
For Example: Using GRIDPLUS2 the "::geometry::getPane" procedure could
be reduced to something like:-
proc ::geometry::getPane {} {
gridplus entry .geometryPage {
{"NACA 4-Series Airfoil" .naca 8} {&b "Generate" .generateNaca
~geometry::airfoilGen}
{"File" .geomb 20} {&b
"Browse" .browseAirfoil}
}
}
The default name of the command invoked by a GRIDPLUS button is based
on the name of the grid and the name of the item. In the above example
the "Browse" button will invoke a procedure called
"geometryPage,browseAirfoil". It is possible, as shown for the
"Generate" button, to use the "~" widget option explicitly specify a
procedure. In this case the name of the button isn't important, so you
could just let GRIDPLUS generate a name automatically. The procedure
then becomes...
proc ::geometry::getPane {} {
gridplus entry .geometryPage {
{"NACA 4-Series Airfoil" .naca 8} {&b "Generate" .
~geometry::airfoilGen}
{"File" .geomb 20} {&b
"Browse" .browseAirfoil}
}
}
NOTE: I'm not sure what ".buttons" is for, so I have omitted this from
my example.
The easiest way to access GRIDPLUS(2) values in "other" procedures is
to use...
global {}
...In the procedure. In the case of my example the ".naca" entry value
can be referenced as: $(geometryPage,naca)
As for the notebook: Your working version is the recommended method
for GRIDPLUS. However, you could change my example above to...
proc ::geometry::getPane {} {
gridplus entry .geometryPage {
{"NACA 4-Series Airfoil" .naca 8} {&b "Generate" .
~geometry::airfoilGen}
{"File" .geomb 20} {&b
"Browse" .browseAirfoil}
}
return .geometryPage
}
...you could then change the quoting used for the notebook to...
gridplus notebook .mynotebook2 "
{Naca} [geometry::getPane]
{Browse} .mypage2
{Modify} .mypage3
"
Your idea is interesting, I shall consider incorporating a better
method into the next GRIDPLUS2 release.
Very Best Regards,
=Adrian=