I am developing a GUI with WxRuby (wxruby-1.9.1-i386-mswin32,
In one of my button event handlers I do the following in this order:
set the value of a TextCtrl,
show a button (which was hidden),
hide the button that was caused this event
play some sounds (using Sound.play)
What I observe is that all these things happen, but not in the order I
specified. Hiding the button occurs before the sounds are played, but
setting the value of the TextCtrl, and showing the hidden button does
happen until after the sounds are finished. It is important the first
things happen before the sounds are played.
Any ideas about what’s going on or how I can fix it?