• =?UTF-8?B?PyBCVUcgLSBUY2w5LjBiMyBMaW51eCAtIGNhbnZhcyBiaW5k?=

    From aldo.w.buratti@[email protected] (abu) to comp.lang.tcl on Thu Aug 8 14:24:25 2024
    From Newsgroup: comp.lang.tcl

    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

    # -------------------------------------------------------------
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Harald Oehlmann@[email protected] to comp.lang.tcl on Thu Aug 8 17:16:15 2024
    From Newsgroup: comp.lang.tcl

    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...
    Harald
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Paul Obermeier@[email protected] to comp.lang.tcl on Thu Aug 8 17:47:54 2024
    From Newsgroup: comp.lang.tcl

    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.

    Paul
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From greg@[email protected] to comp.lang.tcl on Thu Aug 8 17:55:44 2024
    From Newsgroup: comp.lang.tcl

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From aldo.w.buratti@[email protected] (abu) to comp.lang.tcl on Thu Aug 8 22:09:04 2024
    From Newsgroup: comp.lang.tcl

    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.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Christian Gollwitzer@[email protected] to comp.lang.tcl on Fri Aug 9 17:54:31 2024
    From Newsgroup: comp.lang.tcl

    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.

    Christian
    --- Synchronet 3.20a-Linux NewsLink 1.114