Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#1599 generate event ignored if wdg never displayed (OSX)

obsolete: 8.4.4
69. Events (88)
Russell Owen

If a widget has never been displayed then it cannot
generate an event; any attempt is silently ignored.

To see the bug:
- Run the sample script below
- Push the button "Send Foo". This tells the label .l to
generate a <<Foo>> event
- "got foo" is NOT printed, indicating that the <<Foo>>
event was not generated
- Toggle the checkbutton "Show Label" one or more
times, to display the label and possibly hide it again
- Push the button. The event is generated.

Summary: pushing the button "Send Foo" has no effect
(i.e. the <<Foo>> event is not generated) until the label "I
Send Foo" has been displayed at least once. After that the
event is generated reliably. I first discovered this problem
with a far more complex widget than a label.

I observed this bug in Tcl/Tk 8.4.4 on MacOS X.

--------- sample script follows ----------

label .l -text "I generate Foo"
grid .l -row 2 -column 0
grid remove .l
variable x

checkbutton .c -text "Show Label" -variable x -command {
if {$x} {
grid .l
} else {
grid remove .l
grid .c -row 1 -column 0

button .b -text "Send Foo" -command {
event generate .l "<<Foo>>"
grid .b -row 0 -column 0

bind . "<<Foo>>" {
puts "got foo"


  • Jeffrey Hobbs
    Jeffrey Hobbs

    • assigned_to: hobbs --> das
    • summary: generate event ignored if wdg never displayed --> generate event ignored if wdg never displayed (OSX)
  • Kevin Walzer
    Kevin Walzer

    • status: open --> closed