treectrl see 0
panics if the tree is empty.
gdb trace:
#4 0x4139543c in Tcl_Panic (
format=0x41dcb568 "B_IncrementFind failed (count %
d offset %d)")
at /T/tools/unix/build/tcl/tcl8.5a4/unix/../generic/tcl
Panic.c:132
132 Tcl_PanicVA(format, argList);
(gdb)
#5 0x41da2491 in B_IncrementFind (increments=0x0,
count=0, offset=6)
at ../generic/tkTreeDisplay.c:1321
1321 panic("B_IncrementFind failed (count %d
offset %d)", count, offset);
(gdb)
#6 0x41da574d in Increment_FindY (tree=0x8683738,
offset=0)
at ../generic/tkTreeDisplay.c:4336
4336 return B_IncrementFindY(tree, offset);
(gdb)
#7 0x41d9f6dc in TreeWidgetCmd (clientData=0x8683738,
interp=0x818dda0,
objc=3, objv=0x818f1d0)
at ../generic/tkTreeCtrl.c:1026
1026 index = Increment_FindY
(tree, y);
Logged In: YES
user_id=231769
Originator: NO
The panic seems to occur only if the treectrl widget isn't mapped. In this example:
package require treectrl
treectrl .tree
.tree column create -text File -tag file
.tree configure -treecolumn file
pack .tree -fill both -expand yes
update ;# idletasks won't work
.tree see first
The error doesn't occur, even though the treectrl is empty. If you remove the [update], or change it to [update idletasks], then you get the B_IncrementFind error.