Re: Bug in the menu-function "select by label" ?

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Wed, 9 Aug 1995 12:44:38 +0200

Hi!

Udo Bürgel <buergel@goofy.zdv.Uni-Mainz.de> said:

Udo> I just started to work with tkined, so I'm not sure wether
Udo> there is a bug or I made something wrong. Neither with
Udo> tkined_1.2.2 nor with tkined_1.3.2 I was able to select an
Udo> object by its current label using the function "select by
Udo> label" in the pull-down menu. After editing Editor.tcl in the
Udo> following way:

Yes, this is a bug. Thanks for pointing it out. The following fix will
be in the next version (Command::SelectLabel):

foreach id [$editor retrieve] {
foreach item [$id items] {
set label [$w.canvas itemcget label$item -text]
if {[lsearch -$type $label $regex] >= 0} {
$id select
}
}
}

This solutions is a bit smaller and faster and does not rely on how
the item numbers are generated.

Udo> An other point is that after installing tkined_1.3.2 a
Udo> tk-errormessage with the text

Udo> invalid command name ".tkined0.canvas.fs.box.filelist"
Udo> while executing
Udo> ".tkined0.canvas.fs.box.filelist index @36,92"
Udo> invoked from within
Udo> "tkListboxBeginSelect .tkined0.canvas.fs.box.filelist [.tkined0.canvas.fs.box.filelist index @36,92]..."
Udo> (command bound to event)

Udo> appears after selecting a tki-file with the
Udo> open-function. After skipping over this errormessage there
Udo> isn't any problem.

This problem has been fixed in my sources. I missed some places where
the bindings have to be rewritten for the new binding scheme in Tk4.0.
Please ignore this error message until the version is out.

Juergen