|
![]() |
#1 |
Senior Member
Professional user
Join Date: Nov 2007
Posts: 139
|
![]()
In the file tcl/ac3d.tcl there is a proc function called "foldbuttontoggle." At the apparent bottom of this proc there appears to be an umatched quote and some strange curly bracketing. Is this the way its supposed to be structured? TCL seems to accept it, but its breaking the syntax highlighting in notepad++
Code:
proc foldbuttontoggle { name } { (snip) $foldcanvas configure -scrollregion " 0 0 100 $height } if { [ catch { set canvas $ac3d_version_revision } ] != 0 } { return 1 } |
![]() |
![]() |
![]() |
#2 |
Junior Member
Member
Join Date: Aug 2013
Location: London UK
Posts: 22
|
![]()
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. |
![]() |
![]() |
![]() |
#3 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,537
|
![]()
This could be a programming error - too many }s!
I think this bit of code was aiming to allow more of the control panel sections to be packed into the side of AC3D, and enabling sections to be opened and closed down. It's not used at the moment - perhaps a failed experiment, of which I'm sure there's more examples in there somewhere. Feel free to experiment with this stuff and if you make anything that others might find useful, let us know. |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|