The patch provides the possibility to assign cget code
for public Itcl variables, which is executed on the
obj cget -variable
call. By this it is possible to return certain special
values when cget is invoked on a variable. It works
much like the config code, which is implemented in Itcl
a for very long time.
A further enhancement is the possibility to assign
config- and cget-code to protected variables, and the
ability to configure/cget protected variables - but
only from within object member code (any Itcl method or
other config/cget code, that belongs to the class).
This can be used to abstract the behaviour of base
classes from derived classes and to execute associated
config/cget code.
The case of varargs and "eval configure $args" is
handled as well - it is not possible to give
"-protectedvar value" in a varargs list.
For a more in detail discussion see my homepage:
http://e-lehmann.de/?page_id=14
The patch applies to the last official Itcl (3.3) release.
cget code for itcl, to be applied from the top directory