emacs.d/clones/lisp/www.cs.cmu.edu/Groups/AI/html/cltl/clm/node308.html

41 lines
2.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>28.1.11.3. Customizing the Change of Class of an Instance</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" Customizing the Change of Class of an Instance">
<meta name="keywords" value="clm">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<b>Common Lisp the Language, 2nd Edition</b>
<BR> <HR><A NAME=tex2html5504 HREF="node309.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html5502 HREF="node305.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html5498 HREF="node307.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html5506 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html5507 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME=tex2html5505 HREF="node309.html"> Reinitializing an Instance</A>
<B>Up:</B> <A NAME=tex2html5503 HREF="node305.html"> Changing the Class </A>
<B> Previous:</B> <A NAME=tex2html5499 HREF="node307.html"> Initializing Newly Added </A>
<HR> <P>
<H3><A NAME=SECTION0032111300000000000000>28.1.11.3. Customizing the Change of Class of an Instance</A></H3>
<P>
<img align=bottom alt="change_begin" src="gif/change_begin.gif"><br>
Methods for <tt>update-instance-for-different-class</tt> may be defined
to specify actions to be taken when an instance is updated. If only
<tt>:after</tt> methods for <tt>update-instance-for-different-class</tt> are
defined, they will be run after the system-supplied primary method for
initialization and will not interfere with the default behavior of
<tt>update-instance-for-different-class</tt>. Because no initialization
arguments are passed to <tt>update-instance-for-different-class</tt> when
it is called by <tt>change-class</tt>, the <tt>:initform</tt> forms for slots
that are filled by <tt>:before</tt> methods for
<tt>update-instance-for-different-class</tt> will not be evaluated by
<tt>shared-initialize</tt>.
<P>
Methods for <tt>shared-initialize</tt> may be defined to customize class
redefinition (see section <A HREF="node297.html#SharedInitializeSECTION">28.1.9.5</A>).
<br><img align=bottom alt="change_end" src="gif/change_end.gif">
<P>
<HR>
<P><ADDRESS>
AI.Repository@cs.cmu.edu
</ADDRESS>
</BODY>