Re: ina bind: MULTIPLE playSound(async) vs setVisible
- Posted by Dan Moyer <DanMoyer at PRODIGY.NET> Oct 29, 1999
- 533 views
Brian, I'm not totally sure about this, but when I was testing this problem to see what I could understand about it, I THINK I found that the "setVisible false" is NOT what makes the control disappear in this situation, re your test. What I remember doing is this: in my application, I am actually making a combination of labels & list boxes selectivly show or not show, & that's what is not being set visible when they should when a sound is played AFTER they're told to be visible; so, as a test, I rigged the program so that the code which should make one set of controls INVISIBLE and a new set VISIBLE when a button is clicked, had the portion that would make the current set invisible commented out , and when I tested it, THE CURRENT CONTROL DISAPPEARED ANYWAY on button click; then when the "new" control became visible after the sound played, the old control THEN showed up superimposed over it (since it wasn't set invisible). But even though it hadn't been set invisible, it DID disappear on the initial button click. So my guess is that something about the initial action of the setVisible command erases the control specified BEFORE it checks for whether or not the parameter is true or false, and THEN the sound routine takes over, leaving the control not there until the sound is finished playing, and THEN the setVisible parameter is checked & the control is either made visible or made invisible. Does that seem at all likely to be happening? It would explain your result, if that is what is going on, though I'm not sure what it might say about a fix. I'll have to check my myrid sequence of test versions to see if what I described doing & seeing is accurate, but I think it is. On Fri, 29 Oct 1999 18:41:29 -0400, Brian Broker <bkb at CNW.COM> wrote: >Further experimentation: I added the playsound to the Restart_onClick >function: > >procedure Restart_onClick () > setVisible(LText2,False) > playsound("test.wav") >end procedure > >and here there is no problem... The control becomes invisible before the >sound is played. But I still don't see why it doesn't work the same when >making the control visible...