(send-event
receiver-byte-string event-class-byte-string event-id-byte-string
[direct-argument-v argument-list
])
PROCEDURE
Sends an AppleEvent or raises exn:fail:unsupported
. Currently
AppleEvents are supported only within MrEd under Mac OS Classic and
Mac OS X.
The receiver-byte-string
, event-class-byte-string
, and
event-id-byte-string
arguments specify the signature of the
receiving application, the class of the AppleEvent, and the ID of the
AppleEvent. Each of these must be a four-character byte string,
otherwise the exn:fail:contract
exception is raised.
The direct-argument-v
value is converted (see below) and passed
as the main argument of the event; if direct-argument-v
is
void, no main argument is sent in the event. The
argument-list
argument is a list of two-element lists
containing a typestring and value; each typestring is used ad the
keyword name of an AppleEvent argument for the associated converted
value. Each typestring must be a four-character string, otherwise
the exn:fail:contract
exception is raised. The default values for
direct-argument
and arguments
are void and
, respectively.null
The following types of MzScheme values can be converted to AppleEvent values passed to the receiver:
|
If other types of values are passed to
for
conversion, the send-event
exn:fail:unsupported
exception is raised.
The
procedure does not return until the receiver of
the AppleEvent replies. The result of send-event
is the
reverse-converted reply value (see below), or the
send-event
exn:fail
exception is raised if there is an error. If there is no error or
return value,
returns void.send-event
The following types of AppleEvent values can be reverse-converted into
a MzScheme value returned by
:
send-event
|
If the AppleEvent reply contains a value that cannot be
reverse-converted, the exn:fail
exception is raised.