topheader Welcome 3.88.220.93 @ xps.scios.ch on Sun Jun 16 15:25:02 CEST 2019
topheader
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

clips:clip4rea [2010/01/04 20:46] (current)
Line 1: Line 1:
 +
 +<​HTML>​
 +<​HEAD>​
 +<META HTTP-EQUIV="​Content-Type"​ Content="​text/​html;​ charset=Windows-1252">​
 +<​TITLE>​DEFMESSAGE HANDLER</​TITLE>​
 +</​HEAD>​
 +
 +<BODY BGCOLOR="#​FFFFFF"​ TEXT="#​000000">​
 +
 +<OBJECT TYPE="​application/​x-oleobject"​ CLASSID="​clsid:​1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">​
 + <PARAM NAME="​Keyword"​ VALUE="​DEFMESSAGE-HANDLER">​
 +</​OBJECT>​
 +
 +<​H1><​A NAME="​defmessage_handler"></​A>​DEFMESSAGE HANDLER</​H1>​
 +
 +<​P></​P>​
 +
 +<​P>​Objects are manipulated by sending them messages via the function send.  The </P>
 +
 +<​P>​result of a message is a useful return-value or side-effect. ​ A </P>
 +
 +<​P>​defmessage-handler is a construct for specifying the behavior of a class of </P>
 +
 +<​P>​objects in response to a particular message. ​ The implementation of a message </P>
 +
 +<P>is made up of pieces of procedural code called message-handlers (or handlers </P>
 +
 +<​P>​for short). ​ Each class in the class precedence list of an object'​s class can </P>
 +
 +<​P>​have handlers for a message. ​ In this way, the object'​s class and all its </P>
 +
 +<​P>​superclasses share the labor of handling the message. ​ Each class'​s handlers </P>
 +
 +<​P>​handle the part of the message which is appropriate to that class. ​ Within a </P>
 +
 +<​P>​class,​ the handlers for a particular message can be further subdivided into </P>
 +
 +<​P>​four types or categories: primary, before, after and around.</​P>​
 +
 +<P>A defmessage-handler is comprised of seven elements: 1) a class name to which </P>
 +
 +<P>to attach the handler (the class must have been previously defined), 2) a </P>
 +
 +<​P>​message name to which the handler will respond, 3) an optional type (the </P>
 +
 +<​P>​default is primary), 4) an optional comment, 5) a list of parameters that will</​P>​
 +
 +<P>be passed to the handler during execution, 6) an optional wildcard parameter </P>
 +
 +<​P>​and 7) a series of expressions which are executed in order when the handler </P>
 +
 +<P>is called. ​ The return-value of a message-handler is the evaluation of the last </P>
 +
 +<​P>​expression in the body.</​P>​
 +
 +<​P>​The syntax of the defmessage-handler construct is:</​P>​
 +
 +<​P></​P>​
 +
 +<​PRE><​CODE>​(defmessage-handler &​lt;​class-name&​gt;​ &​lt;​message-name&​gt;​
 +   ​[&​lt;​handlertype&​gt;​] [&​lt;​comment&​gt;​]
 +   ​(&​lt;​parameter&​gt;​* [&​lt;​wildcard-parameter&​gt;​])
 +   &​lt;​action&​gt;​*)
 +
 +&​lt;​handler-type&​gt; ​      ::= around | before | primary | after
 +
 +&​lt;​parameter&​gt; ​         ::= &​lt;​single-field-variable&​gt;​
 +
 +&​lt;​wildcard-parameter&​gt;​ ::= &​lt;​multifield-variable&​gt;</​CODE></​PRE>​
 +
 +</​BODY>​
 +</​HTML>​
  
 
 
clips/clip4rea.txt ยท Last modified: 2010/01/04 20:46 (external edit)
topheader
© 1998-2019, SciOS Scientific Operating Systems GmbH

Legal | Credits | Profile | Contact | Customer Login