Re: Forms 6i - More bugs or is it just me?

From: Neville Sweet <sweet.neville.nj_at_bhp_xxx_.com.au>
Date: Fri, 3 Nov 2000 13:56:15 +1100
Message-ID: <8tt9cm$m7m$1_at_gossamer.itmel.bhp.com.au>


Hi Rob.

RBR wrote in message <3a01873c.11146607_at_News.CIS.DFN.DE>...
>I was experimenting with the timer and playing sounds by creating a
>form that has a sound item and an 'exit' button. When executed, a wave
>file should play when a user clicks on the button. In the event
>trigger for the button I have the following code:
>
>Declare
> timer_id Timer;
> thirty_seconds NUMBER(5) := 30000;
>Begin
> GO_ITEM('ct_station_class.sound_item22');
> READ_SOUND_FILE('c:\winnt\media\xyz.wav',
> 'wave',
> 'ct_station_class.sound_item22');
> PLAY_SOUND('ct_station_class.sound_item22');
>
> timer_id := CREATE_TIMER('TIME_DELAY_30', thirty_seconds, NO_REPEAT);
> exit_form;
>End;
>
>
>There are several things going wrong when I execute my form:
>
>First off, with the 'exit_form' included in the text above the sound
>does *not* play. When the 'exit_form' is removed from the trigger code
>the sound plays!
>
>Secondly, it appears that Forms doesn't recognize the fact that a
>timer has been created. There is absolutely *no* delay.
>
>I created a WHEN-TIMER-EXPIRED trigger at the form level that should
>execute when the timer expires but the trigger never gets fired.
>Placing a message in this trigger has proven this. I thought that I
>would put the 'exit_form' code in that trigger to see if it would work
>as I had intended. Commenting out the code in the above trigger except
>for the necessary stuff for the timer to work still didn't produce a
>timer delay. It just seems that the timer doesn't even exist as far as
>my form is concerned.

[Quoted] Timers don't work in this way. A Timer runs in the background and when it expires causes some specified action to occur via the When-Timer-Expired trigger. The Timer only starts after control returns back to the screen, ie. the trigger that contains the Create_Timer has terminated, plus any associated triggers.

Re-locate exit_form to the When-Timer-Expired trigger. Received on Fri Nov 03 2000 - 03:56:15 CET

Original text of this message