Language Reference Guide : 4. System Classes : Event Class : MessageErrorCode Attribute
 
Share this page                  
MessageErrorCode Attribute
Data Type: integer
4GL Access: R
When a frame receives a user event that completed the WaitFor call, this attribute contains an error code value. The value of this attribute is zero for a normal user event. If the current user event was generated by the system to notify the calling frame that a previous user event was not delivered, this attribute has one of the following values:
UE_DATAERROR
Specifies that the user event's focus behavior caused data conversion from the current field. The data conversion failed (for example, a non-numeric character in a numeric field), canceling the user event.
UE_EXITED
Specifies that the receiving frame exited before activating the user event
UE_NOTACTIVE
Specifies that the user event was sent to an inactive frame
UE_PURGED
Specifies that the receiving frame purged the user event
UE_RESUMED
Specifies that the user event's focus behavior caused a SetValue or Exit event block to run. The event block issued a resume statement that canceled the user event.
UE_UNKNOWN
Specifies that the user event was unknown to the receiving frame
Descriptions of system constant values and their numeric equivalents are listed in Message Error Codes for Event.
The MessageErrorCode attribute is set to non-zero in the following situations:
A SendUserEvent specifies the errorevent parameter to an event name.
The WaitFor method specifies EventName is equal to the same event name.
If an error occurs without specifying the errorevent parameter, the WaitFor call waits forever in the event of an error.
UE_RESUMED and UE_DATAERROR are possible only if the focusbehavior parameter was specified in the SendUserEvent that preceded the WaitFor.
For more information, see the methods SendUserEvent (see Terminate Method) and WaitFor Method.