Overview
| Artifact ID: | 8f8dae8ff08fb9c86857f0de1486b40a36202440dc6ea9eacb7780ac0f1e88e3 |
|---|---|
| Ticket: | ce6b428620dd89bc46786654e3aa1d62d74d3fc8
<<Increment>> event is endlessly triggered once messagebox closes |
| User & Date: | fvogel on 2022-02-10 07:21:58 |
Changes
- icomment:
Thank you for your report. Please note that this is the Tcl tracker, not the Tk tracker. If the issue gets confirmed this ticket should be closed and reopened in the [https://core.tcl-lang.org/tk/reportlist|Tk tracker]. Furthermore your code seems to be in Python. What I <i>believe</i> is the equivalent Tcl/Tk code is as follows: <verbatim> package require Tk set max_length 10 set check_length_calls 0 set input 0 proc check_length {} { global check_length_calls max_length incr check_length_calls if {[focus] ne ".t.s"} {return} if {[.t.s get] == $max_length} { puts "Too long" } } toplevel .t wm geometry .t 300x100 ttk::label .t.l -text "Quantity: " ttk::spinbox .t.s -from 0 -to 10 -textvariable input bind .t.s <<Increment>> {check_length} ttk::button .t.b -text "Print fun calls" -command {puts $check_length_calls} pack .t.l .t.s .t.b </verbatim> But with this code I fail to reproduce the problem you describe. - login: "fvogel"
- mimetype: "text/x-fossil-wiki"