[Xotcl] problem when having both a filter and a Tk callback returning a break

Catherine Letondal letondal at pasteur.fr
Thu Jul 5 16:54:23 CEST 2001


Hi,

One problem I have when using Tk and Xotcl together (actually the only one for 
now), is that when I put a filter on a class (e.g for tracing purpose), the methods
which are called by a callback (a Tk binding for example) cannot return a -break
return code.

Here is an example of an error message:

invoked "break" outside of a loop
    while executing
"$view validate o o"
    (command bound to event)

This "validate" method is activated whenever the user enter something in a 
text widget:

    ::bind $textwidget <KeyPress> {
	set view [names object %W]
	$view validate %K %A
    }

And this method does a return like this:
    return -code break

The problem happens only when a filter is put on the class.

What can I do to fix this?

-- 
Catherine Letondal -- Pasteur Institute Computing Center



More information about the Xotcl mailing list