guides:programming:programmers_reference_manual:send_event

Send_Event function

Executes an event for the specified object. The event is executed immediately.

EventStatus = Send_Event( Object, Event, Param1, Param2, Param3, …, Param20 )

NameRequiredDescription
ObjectYesIdentifier of the object to access. Must be in upper-case.
EventYesName of the event to execute. Must be in upper-case.
Param1 - Param20NoParameters to be passed to the event. Up to 20 parameters may be used.

Null if the event was executed immediately, otherwise the event error code is returned, as described in the Get_EventStatus function.

Error information is returned in the same format as for Get_EventStatus.

N/A

 
Declare Function Send_Event, RTI_ErrorText

   $Insert Logical

   

   * // Example - Send a CLEAR event to the current window, clearing the key prompt and

   * // ignoring any changed data.  If there are any errors then report them to the user.

      

   EvErrors = Send_Event( @Window, "CLEAR", FALSE$, TRUE$ )

   

   If Len( EvErrors ) Then

      * // We have some error codes - make sure they are formatted

      * // into text messages and display

      ErrCount = FieldCount( EvErrors, @Fm )

      ErrText  = ""

      For ( ErrIdx = 1 To ErrCount

         ErrText := RTI_ErrorText( "EV", EvErrors<ErrIdx> ) : @Tm

      Next

      ErrText[-1,1] = ""

      Call Msg( @Window, ErrText )

   End Else

      * // Do post-clear processing ...

   End
 
 
 

Post_Event, Get_EventStatus, Set_EventStatus.

  • guides/programming/programmers_reference_manual/send_event.txt
  • Last modified: 2023/10/25 10:50
  • by 127.0.0.1