Invoke a send-method on Object. Object
is processed as the initialisation arguments described with new/2.
This implies that a complex term is translated into an object before the
method is invoked. An atom is translated into an XPCE name object. Message
is an atom or complex term. The functor defines the selector: the
name of the operation to invoke. The arguments are processed as the
initialisation arguments described with new/2.
Sending a message is composed of the following steps:
- Resolve the receiving object. For this, Object is
translated into a true XPCE object.
- Resolve the selector. The functor of Message is
determined and translated into an XPCE name object.
- Resolve the implementation. This can be a send_methodobject, a
variable object or one of the defined object-level implementations. This
step also resolves a description of the required arguments.
- Translate the arguments of the message to data that satisfies the
resolved argument description.
- Invoke the implementation. If the implementation is defined in
Prolog, the interface will make a direct call to it; otherwise it calls
an XPCE interface function.
If all these steps succeed and the implementation succeeds, send/2
succeeds. If anything fails, an error is raised through
object->error.
If the error has
error<-feedback: throw, a Prolog exception is raised;
otherwise XPCE itself reports the error.
See also get/3, send_class/3, send_super/2, new/2
and free/1.