[Xotcl] Linking object instance variables to a widget -textvariable?

Jeff Hobbs jeffh at ActiveState.com
Sat Nov 15 22:15:30 CET 2003


Uwe Zdun wrote:
>                    -opencmd   "[self] modifyTree 1 $sw.tree" \
>                    -closecmd  "[self] modifyTree 0 $sw.tree"]
>     ...
>     $tree bindText  <ButtonPress-1>        "[self] selectTreeElement $tree"
>     $tree bindText  <Double-ButtonPress-1> "[self] openTreeElement $tree"

And of course you always want to write core like the above as:

-opencmd [list [self] modifyTree 1 $sw.tree]
or
$tree bindText  <ButtonPress-1> [list [self] selectTreeElement $tree]

otherwise you are asking for a maintenance headache.

-- 
     Jeff Hobbs, The Tcl Guy
     http://www.ActiveState.com/, a division of Sophos




More information about the Xotcl mailing list