----- Original Message ----- From: "Hidetoshi NAGAI" <nagai / ai.kyutech.ac.jp> To: "ruby-talk ML" <ruby-talk / ruby-lang.org> Sent: Sunday, November 14, 2004 8:12 PM Subject: Re: update delay related to TkOptionMenu > Hi, > > From: "Mark Volkmann" <volkmann2 / charter.net> > Subject: update delay related to TkOptionMenu > Date: Mon, 15 Nov 2004 03:05:54 +0900 > Message-ID: <030d01c4ca74$94cc4a90$0200a8c0@MarkDesktop> >> However, the change isn't visible until I click the TkOptionMenubutton >> a second time. What am I missing? > > Hmmm... > On my environment (Linux, Ruby 1.8 HEAD, Tcl/Tk 8.4.7), > it seems working properly. > Maybe it fails to update widgets on your environment. > Please try to add 'Tk.update' at last of the callback. Thanks for the suggestion. Unfortunately, that didn't change anything. I still don't see the update to the TkEntry until I click the TkOptionButtonmenu a second time. Is there a different event I could bind to instead? >> w.menu.bind('<MenuSelect>') do >> entry_var.value = >> if option_var.value == 'Marathon' then '26.2' >> elsif option_var.value == '10K' then '6.2' >> else '0' >> end > Tk.update # <== HERE >> end > > -- > Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp) > >