Re: Creating alerts at run time

From: Eric Givler <egivler_at_flash.net>
Date: Mon, 06 Nov 2000 18:36:28 GMT
Message-ID: <MSCN5.7426$pq3.540375_at_news.flash.net>


You could create the alert in another form and then reference it.

You'd use Find_Alert() to get an ID to it, then display it with Show_Alert.

Make the alert a caution and define two buttons and put it in a loop like you are saying. You'll have to use the set_alert_property(alert_id, alert_text, 'your message')
to change the prompt.

like this:

procedure Alert_The_User( MessageText_In IN VARCHAR2,

                                         Failure     IN Boolean := TRUE ) is
  AlertResult    number;
  AlertID        alert;

begin
  AlertID := find_alert( 'MESSAGE_ALERT' );    if NOT id_null( AlertID ) then
      set_alert_property( AlertID, alert_MessageText, messagetext_in );
      AlertResult := show_alert( AlertID );
   else
      bell;
      message( messagetext_in, acknowledge );
  end if;
   if Failure then

       raise FORM_TRIGGER_FAILURE;
   end if;
end;

Maybe you can use the demo code (forms 6i demos) to play a WAV file???

<djsnyder_at_my-deja.com> wrote in message news:8u6mmi$f6q$1_at_nnrp1.deja.com...
> Our current forms use the MESSAGE built-in to display
> error messages. When people are doing data entry and a message
> comes up, they might hit the enter key as part of their
> processing and never see the message. What we want is
> an alert-type screen that has more than one button so that
> we can place the focus on something other than OK in order
> to make it more difficult for them to miss the error message.
> Something like this:
>
> while key pressed != 'OK'
> loop
> display message
> end loop
>
> With this scheme they would have to change the focus from the
> non-OK button, ensuring that they have seen the message.
>
> An alert would work just fine for this. In order to make
> the integration of this new message processing easier we had hoped
> to put the creation of the alert and the loop in a .PLL file so
> the only change to the application would be to change MESSAGE to
> NEW_MESSAGE in the application's code.
>
> I can't find any documentation on creating alerts at run time.
> Is there a way to do that, or some other ideas on how to handle
> this situation?
>
> The applications run in a noisy environment, so having the
> application make a different sound might not work.
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Nov 06 2000 - 19:36:28 CET

Original text of this message