|
From: Joey M. <jo...@sw...> - 2006-09-28 19:42:27
|
I am getting an error when picking the last item in my list when I
use a tile treeview.
The error is :
invalid command name ".sourcedialog.options.list2"
invalid command name ".sourcedialog.options.list2"
while executing
"$w identify $x $y"
(procedure "ttk::treeview::Press" line 3)
invoked from within
"ttk::treeview::Press .sourcedialog.options.list2 43 188 "
(command bound to event)
The reason I am getting this error is because I override the Button-1
as follows:
bind $listname <Button-1> {
SourceDialog::OnList [%W item [%W identify row %x %y] -text]
}
which makes it call my function that goes to the next list. If I
pick any other item but the last, it works fine.
If I put the lassign in a catch from treeview.tcl, I can avoid the
problem.
proc ttk::treeview::Press {w x y} {
catch {lassign [$w identify $x $y] what where detail} msg
if {$msg != ""} {
return
}
There is probably a better way to solve this.
Thanks,
Joey
|