View Single Post
Old 14th November 2013, 07:10 AM   #2
Junior Member
Geoffm's Avatar
Join Date: Aug 2013
Location: London UK
Posts: 22
Default Re: TCL Question in ac3d.tcl

There is no syntax error; but here may be a logic error in the Tcl. The "proc foldbuttontoggle" ends at the } after $foldcanvas...$height (this bracket matches the one at the "proc foldbuttontoggle" line). The if { [catch...will be performed when the tcl is loaded (at start time) and if the "set canvas $ac3d_version_revision" is an error - perhaps variable ac3d_version_revision does not exist or has not been set - then the procs following this line will not be created (positiontext, foldbutton etc).

I suggest using the Komodo Editor (free) which is much more Tcl friendly and correctly colours this syntax. However the indentation of the code suggests that the proc foldbuttontoggle is intended to end after the if...catch. Perhaps Andy can comment? I don't think I have ever used this function, which is called from "foldbutton" which is called by "proc folditem" which is never referred to in the Tcl scripts.
Geoffm is offline   Reply With Quote