|
From: Joe E. <jen...@fl...> - 2006-09-28 22:23:50
|
Joey Mukherjee wrote:
> 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.
I can't replicate the problem -- but does the "SourceList::OnList"
procedure destroy the treeview widget by any chance? If so,
you probably want to put a [break] in the binding script:
bind $listname <Button-1> {
SourceDialog::OnList [%W item [%W identify row %x %y] -text] ;
break;
}
Very few class binding scripts work properly if they're called
after the target widget has been destroyed...
--Joe English
jen...@fl...
|