OnCommonEvent events can be generated by the user via CallCommonEvent. CallCommonEvent allows you to send messages to any object via this event.
Even common dialogs (such as Yes/No message boxes) internally generate OnCommonEvent by calling CallCommonEvent.
For example, it is used in the Yes/No message box as follows:
|
// When the Yes button is pressed
event OnMouseUp(button)
{
parent.g_target.CallCommonEvent("messagebox", TRUE);
//…
}
|
|
// When the No button is pressed
event OnMouseUp(button)
{
parent.g_target.CallCommonEvent("messagebox", FALSE);
//…
}
|
|