I just started building a small RubyTk application, created a TkRoot object, and added an event callback for the "Destroy" event.
When I click the little 'X' in the corner, "Goodbye, cruel world!" is echoed twice.Code:root=TkRoot.new({'title'=>"Some Name"}) root.bind("Destroy", proc {puts "Goodbye, cruel world!"})
How can I make the callback function be invoked only once?






Bookmarks