Thread from comp.lang.tcl (5 replies)
? BUG - Tcl9.0b3 Linux - canvas bind
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 # -------------------------------------------------------------Click on article to view all threads in comp.lang.tcl
Re: ? BUG - Tcl9.0b3 Linux - canvas bind
Am 08.08.2024 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 > > # ------------------------------------------------------------- may it just happen, that stdout is not shown? Perhaps, you have started using "wish". Maybe: - start with tclsh + package require tk - replace the puts by tk_messageBox Just an idea... HaraldClick on article to view all threads in comp.lang.tcl
Re: ? BUG - Tcl9.0b3 Linux - canvas bind
Am 08.08.2024 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 > > # ------------------------------------------------------------- Works for me on Debian 12.6, SUSE 15.6 and Ubuntu 24.04. PaulClick on article to view all threads in comp.lang.tcl
Re: ? BUG - Tcl9.0b3 Linux - canvas bind
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 } GregorClick on article to view all threads in comp.lang.tcl
Re: ? BUG - Tcl9.0b3 Linux - canvas bind
Many thanks to everybody. I downloaded tcl/tk 9.0b3 from https://gitlab.com/teclabat/tcltk. Still the same problems ... but the root cause was .. my Linux Virtual Machine ! I then installed WSL (https://canonical-ubuntu-wsl.readthedocs-hosted.com/en/latest/guides/install-ubuntu-wsl2/), WOW , far better than a Virtual Machine ! I was able to run all my Tcl9 tests ! Next days I will publish a few porting of my C-extensions for Tcl9 lets's start with extrafont, perlin-noise ... Thank you again for your help.Click on article to view all threads in comp.lang.tcl
Re: ? BUG - Tcl9.0b3 Linux - canvas bind
Am 08.08.24 um 17:16 schrieb Harald Oehlmann: > > may it just happen, that stdout is not shown? > Perhaps, you have started using "wish". That's a Windows-only issue. On Linux, there is always stdin/out/err connected. ChristianClick on article to view all threads in comp.lang.tcl