CreateEvent
TheCreateEventmethod creates an Apple event object.
ODSShort CreateEvent (in ODEventClass theAEEventClass, in ODEventID theAEEventID, in ODAddressDesc target, in ODSLong transactionID, out ODAppleEvent theResult);
theAEEventClass- The event class of the Apple event object to be created.
theAEEventID- The event ID of the Apple event object to be created.
target- A reference to the address of the destination part.
transactionID- A value that uniquely identifies this transaction.
theResult- A reference to the new Apple event object.
- return value
- The return ID assigned to this event.
DISCUSSION
Your part calls this method instead of theAECreateAppleEventmethod defined by the Apple Event Manager. Your part does not need to specify a return ID for the Apple event object. Instead, OpenDoc assigns a return ID and uses that value to keep track of the sender of the event. ThetransactionIDparameter should be used by your part to identify a related group of Apple event objects and their corresponding replies. If you are creating an event to send to another part, use the message interface'sCreatePartAddrDescmethod to create thetargetparameter.After this method executes successfully, your part may add whatever data it wants to the resulting Apple event object and then send it using the message interface's
Sendmethod.EXCEPTIONS
The Apple Event Manager may throw other exceptions.
kODErrOutOfMemory- There is not enough memory to allocate the event object.
SEE ALSO
TheODEventClasstype (page 925).
TheODEventIDtype (page 925).
TheODMessageInterface::CreatePartAddrDescmethod (page 414).
TheODMessageInterface::Sendmethod (page 416).
TheODAddressDescclass (page 39).
TheODAppleEventclass (page 41).
Table 9-1 on page 408 in OpenDoc Programmer's Guide.
"Sending Semantic Events" on page 435 in OpenDoc Programmer's Guide.