No registered users in community xowiki
in last 10 minutes
in last 10 minutes
[Xotcl] problem when having both a filter and a Tk callback returning a break
From: Catherine Letondal <letondal_at_pasteur.fr>
Date: Thu, 05 Jul 2001 16:54:23 +0200
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?
Date: Thu, 05 Jul 2001 16:54:23 +0200
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