Sujet : Re: ? BUG - Tcl9.0b3 Linux - canvas bind
De : gregor.ebbing (at) *nospam* gmx.de (greg)
Groupes : comp.lang.tclDate : 08. Aug 2024, 16:55:44
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v92pq0$2vkc$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
Am 08.08.24 um 16:24 schrieb abu:
Please, can you run this 4-lines script on Linux with TclTk 9.0b3 ?
Note that it runs as expected with TclTk 9.0b3 on Windows and MacOS, so
I suspect
a) my Linux build is wrong
b) it's a bug only for unix (Linux Ubuntu in my case)
Any suggestion is appreciated.
Here's the script
## ---------------------------------------------------------------------
# Test with TclTk 9.0b3
# Windows: OK
# Linux (Ubuntu): not working (OVAL doesn't change color, no message
is printed)
# MacOS: OK
pack [canvas .c -background yellow]
c create oval {20 20 200 200} -fill red -activefill blue -tag OVAL
c bind OVAL <Enter> { puts "Entering the OVAL"}
c bind OVAL <ButtonPress-1> { puts "Clicked inside the OVAL"}
# Expected behaviour:
# when moving the cursor inside the OVAL
# - it turns from red to blue
# - a message is printed
# when clicking the OVAL
# - a message is printed
# -------------------------------------------------------------
#it works for me
#package require Tk
pack [canvas .c -background yellow]
.c create oval {20 20 200 200} -fill red -activefill blue -tag OVAL
.c bind OVAL <Enter> { puts "Entering the OVAL"}
.c bind OVAL <ButtonPress-1> { puts "Clicked inside the OVAL"}
#parray tcl_platform
#puts [info patchlevel]
#puts [info nameofexecutable]
# Linux Debian Sid
# tcl/tk 9.0b3 from
https://gitlab.com/teclabat/tcltk# change from red to blue ok
# tclsh with
# package require Tk
if {0} {
#output 1:
tcl_platform(byteOrder) = littleEndian
tcl_platform(engine) = Tcl
tcl_platform(machine) = x86_64
tcl_platform(os) = Linux
tcl_platform(osVersion) = 6.10.3-amd64
tcl_platform(pathSeparator) = :
tcl_platform(platform) = unix
tcl_platform(pointerSize) = 8
tcl_platform(user) = greg
tcl_platform(wordSize) = 8
9.0b3
/opt/tcltk90/bin/wish90
Entering the OVAL
Entering the OVAL
Clicked inside the OVAL
#output 2:
tcl_platform(byteOrder) = littleEndian
tcl_platform(engine) = Tcl
tcl_platform(machine) = x86_64
tcl_platform(os) = Linux
tcl_platform(osVersion) = 6.10.3-amd64
tcl_platform(pathSeparator) = :
tcl_platform(platform) = unix
tcl_platform(pointerSize) = 8
tcl_platform(user) = greg
tcl_platform(wordSize) = 8
9.0b3
/opt/tcltk90/bin/tclsh
Entering the OVAL
Entering the OVAL
Clicked inside the OVAL
}
Gregor