Tk Library Source Code

View Ticket
Login
Ticket UUID: 607745
Title: BWidget 1.4.1 ListBox Binding Bug
Type: Bug Version: None
Submitter: polynr Created on: 2002-09-11 10:20:52
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-10-21 06:17:10
Resolution: None Closed By: damonc
    Closed on: 2003-10-20 23:17:10
Description:
### Iv'e noticed a report similar to this, but am not 
### sure this is exactly the same bug, so here you go:

### create some ListBox with some junk in it
package require BWidget 1.4.1
image create photo p1 -file 
c:/tcl/lib/bwidget1.4.1/images/open.gif
ListBox .l
pack .l
.l configure -multicolumn 0  -bg SystemWindow
.l insert end i1 -image p1 -text hello
.l insert end i2 -image p1 -text hello
.l insert end i3 -image p1 -text hello
.l insert end i4 -text hello
.l selection set i1

### This works as expected
.l bindText <Enter> ".l selection set "

### This does not work as expected, %W is replaced 
with the canvas
### widget name instead of the ListBox's name
.l bindText <Enter> "%W selection set "

### You can fix this error by adding the following line
### To ListBox::bindText
### regsub -all {%W} $script $path script
###
User Comments: polynr added on 2002-09-11 17:25:08:
Logged In: YES 
user_id=609517

hm... perhaps i need to think before i type,
the regexp should be more complicated to allow for cases of 
%%W and %%%W which this one would break...