Send_Event function
Description
Executes an event for the specified object. The event is executed immediately.
Syntax
EventStatus = Send_Event( Object, Event, Param1, Param2, Param3, …, Param20 )
Parameters
Name | Required | Description |
---|---|---|
Object | Yes | Identifier of the object to access. Must be in upper-case. |
Event | Yes | Name of the event to execute. Must be in upper-case. |
Param1 - Param20 | No | Parameters to be passed to the event. Up to 20 parameters may be used. |
Returns
Null if the event was executed immediately, otherwise the event error code is returned, as described in the Get_EventStatus function.
Errors
Error information is returned in the same format as for Get_EventStatus.
Remarks
N/A
Example
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
See Also
Post_Event, Get_EventStatus, Set_EventStatus.