[Xotcl] Small compatiblity problems with XOTcl 1.5.2 - tk bind

Artur Trzewik mail at xdobry.de
Sun Nov 19 18:53:54 CET 2006

Hi XOTcl friends!

I have found some small incompatibility between XOTcl 1.4 and 1.5 by 
using XOTclIDE.
It considers tk binding

I use code as follow

bind $twin <KeyPress-Tab> [list [self] tabPress]

IDE::TclModeEdit instproc tabPress {} {
    # .....
    return -code break

the "return -code break" have caused that the event is not propagated more.
See more in Tk bind command manual.

It does not work with XOTcl 1.5.2.
I use small work around by wrapping XOTcl method in Tcl proc now.
XOTcl Method returns a boolean value.

bind $twin <KeyPress-Tab> [list tabPressHandler [self]]

proc tabPressHandler object {
      if {[$object tabPress]} {
          return -code break

This incompatibility causes bad behavior in XOTclIDE editor.
(Code completion and automatic indenting).
I plan to ship next XOTclIDE version in some time without this problem.

Artur Trzewik

More information about the Xotcl mailing list