Version 2 of itcl::configbody

Updated 2007-01-12 09:04:04

[ Someone want to write up something about what this incr tcl command does?


AW from the source code of itcl3.3:

 *    itcl::configbody <class>::<publicVar> <body>
 *
 *  Looks for an existing public variable with the name <publicVar>,
 *  and if found, tries to assign the implementation.  If <body> has
 *  the form "@name" then it is treated as a reference to a C handling
 *  procedure; otherwise, it is taken as a body of Tcl statements.
 *

As far as I understand it: if you assign a public variable a value with the itcl configure command (myclass configure -myvar Hello) then first the new value is assign to that variable and afterwards the script in configbody is evaluated additionally. It is also possible to define a config script for a variable when defining the variable: protected variable myvar hello {puts "this is the configscript of myvar"}


Category Command a part of the incr tcl object oriented package