Tk Source Code

View Ticket
Login
Ticket UUID: 4fa083dd3f275d5f2daaf9b861ff6940ea883f9b
Title: Wish.app: Widgets are unresponsive when the console window is open
Type: Bug Version:
Submitter: nab Created on: 2020-04-24 08:42:23
Subsystem: 66. Aqua Window Operations Assigned To: marc_culler
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2020-04-24 17:44:00
Resolution: Duplicate Closed By: marc_culler
    Closed on: 2020-04-24 17:44:00
Description:
Hi
using this script:
package require Tk
package require Ttk

catch {namespace delete obj}
namespace eval obj {
    array set obj {}
}

proc displayStuff {namespace} {
    for {set x 1} {$x<10} {incr x} {
        set this($x) [\
        ttk::entry .b$x -width 30 -justify left -font {TkTextFont 18}\
        ]
        grid $this($x) -sticky news
    }
}

displayStuff obj
#eof

I initially thought there were a lag in ttk::entry because on my computer typing 10x  letter 'a' does not display 10x 'a', some input are not prompted.

digging a little bit in order to find where it can come from I ended up with this results:

-when script is launched via terminal : /path/to/Wish.app/Contents/MacOS/Wish /pathTo/thisscript.tcl, everything is ok, I can type anything and anything is prompted

-when Wish is launched form the icon double-click, it starts Wish itself and Console window.
doing menu source /pathTo/thisscript.tcl, everything is displayed but inside a ttk::entry typing 10x  letter 'a' does not display 10x 'a', some input are not prompted.
Closing the Console window, I can type anything and anything is prompted.

does someone else observe the same behaviour?
thanks,
++
User Comments: marc_culler (claiming to be Marc Culler) added on 2020-04-24 17:44:00:
Thank you, Nicolas!  I don't know what I would do without all of your testing.

That means that this bug really is part of [585584ad66] (and is now fixed there)
so I am going to close this ticket as a duplicate.

fvogel added on 2020-04-24 17:39:47:

OK clear enough thank you, so the first commit showing the issue is [61e70e0f] (the commit in between your given two commits is unrelated).


nab added on 2020-04-24 16:39:55:
ok, so from core8.6 branch:
https://core.tcl-lang.org/tk/info/fcdeaa13ab0d8af1
does NOT have the bug

https://core.tcl-lang.org/tk/info/61e70e0f28deb44a
this checkIn does have this bad behaviour

++

fvogel added on 2020-04-24 16:25:10:
Bisecting in a single branch would help.

nab added on 2020-04-24 15:24:57:
https://core.tcl-lang.org/tk/info/ef7793071394fb05
this checkIn does NOT have this bad behaviour

https://core.tcl-lang.org/tk/info/61e70e0f28deb44a
this checkIn does have this bad behaviour

so it must have been introduce between both :)
++

nab added on 2020-04-24 14:29:52:
Hi,
thank you for investigating with this.
I never use Wish neither but I saw the symptoms in my app... and Wish was the easiest way to show you the issue

++

marc_culler (claiming to be Marc Culler) added on 2020-04-24 14:25:54:

I never use Wish.app and I am not sure how it is supposed to work, but something is definitely broken here. Can you help, Kevin?

This is what I see. When I run make -C macosx install, Wish.app gets installed in /Applications/Utilities. When I click on the Wish icon in that folder, nothing happens. But if I run open -a Wish from the terminal, Wish starts with a console window. If I use the File menu to source Nicolas's script I see the behavior he is reporting. Entry widgets are unresponsive and drop key events. If I close the console window the problem goes away, as reported.