Diff of /docs/trunk/oodguide/en-US/Chapter07.xml [r9376] .. [r9377] Maximize Restore

  Switch to side-by-side view

--- a/docs/trunk/oodguide/en-US/Chapter07.xml
+++ b/docs/trunk/oodguide/en-US/Chapter07.xml
@@ -47,7 +47,9 @@
     Changes:
      v01-00 16Mar13: First version.
             21Mar13: Very minor adjustments to spacing and links.
-            15Aug13: Corrected folder names after folder structure change.            
+            15Aug13: Corrected folder names after folder structure change.
+            21Aug13: Put some text into a tag (computeroutout) to see if this
+                     fixes overlapping Publican output in section 7.3.1.            
 
     7   *  Towards A Working Application	                                            chapSeven
     7.1   * Introduction                                                              chap07-intro
@@ -726,60 +728,67 @@
       </indexterm>
       <para>There are four "kinds" of components in Exercise07: "named", "singleton", "anonymous",
         and "form". <itemizedlist>
-          <listitem><para>A "<emphasis role="bold">named</emphasis>" component instance is identified by a
-            unique name derived from the instance's data (analogous to a database key). An example
-            is <computeroutput>CustomerModel</computeroutput>, where each instance is identified by
-            its Customer Number. The external name for such an instance is of the form model class
-            name, model instance name - e.g. "CustomerModel AB0784". Note that a "Form" component
-            such as the Order Form is of the named component kind, since although it starts out without a name,
-            it is (and must be) given
-            its name (such as an order number) when first instantiated. This is done when the Object Manager
-            invokes its <computeroutput>getInstanceName</computeroutput> class method.
-            A View component is named by
-            its object reference number (that is, the number returned by invoking
-              <computeroutput>identityHash</computeroutput> on the view instance).
-          </para></listitem>
-          <listitem><para>"<emphasis role="bold">Singleton</emphasis>" instances are those for which there
-            can logically only be a single instance - for example, data components such as
-              <computeroutput>CustomerData</computeroutput>, or the Order Manager (which in
-            Exercise07 is a view-only component). Their instance name is always "The". </para></listitem>
-          <listitem><para>An "<emphasis role="bold">anonymous</emphasis>" component is one for which there
-            can logically be more than one instance, but which do not have any obvious
-            distinguishing name. Thus they are initially given the instance name "A". Examples are
-            list components such as <computeroutput>CustomerListModel</computeroutput>. Instances of
-            an anonymous component are provided with a system-generated number. For example, the
-            name of a Customer List Model is a unique number generated by its superclass, starting
-            at '1'. For example, to create an instance of
-              <computeroutput>CustomerListModel</computeroutput>, the message
-              <computeroutput>getComponentId("CustomerListModel","A")</computeroutput> is sent to
-              <computeroutput>ObjectMgr</computeroutput> which, on seeing instance name "a" or "A",
-            invokes <computeroutput>getInstanceName</computeroutput> on the ListModel class object,
-            which is handled by the <computeroutput>Model</computeroutput> superclass.
-            <computeroutput>Model</computeroutput> returns a number starting at "1".</para></listitem>
-          <listitem><para>A "<emphasis role="bold">form</emphasis>" instance such as a Sales Order Form or
-            a Purchase Request form is a special kind of component. Initially it is anonymous, and
-            although when created there is no database record of it, there will be after it's
-            completed and the user hits OK. A new number (e.g. an order number) is assigned to a
-            form when it is created, and this number is used as the database key when, after
-            completion, the form is committed to the database. For example, the Order Form component
-            assumes that this will happen, and so its instance name is a unique Sales Order number.
-            This is created by the <computeroutput>getInstanceName</computeroutput> class method of
-              <computeroutput>OrderFormModel</computeroutput> which over-rides the same method in
-            its superclass (<computeroutput>Model</computeroutput>).</para></listitem>
+          <listitem>
+            <para>A "<emphasis role="bold">named</emphasis>" component instance is identified by a
+              unique name derived from the instance's data (analogous to a database key). An example
+              is <computeroutput>CustomerModel</computeroutput>, where each instance is identified
+              by its Customer Number. The external name for such an instance is of the form model
+              class name, model instance name - e.g. "CustomerModel AB0784". Note that a "Form"
+              component such as the Order Form is of the named component kind, since although it
+              starts out without a name, it is (and must be) given its name (such as an order
+              number) when first instantiated. This is done when the Object Manager invokes its
+                <computeroutput>getInstanceName</computeroutput> class method. A View component is
+              named by its object reference number (that is, the number returned by invoking
+                <computeroutput>identityHash</computeroutput> on the view instance). </para>
+          </listitem>
+          <listitem>
+            <para>"<emphasis role="bold">Singleton</emphasis>" instances are those for which there
+              can logically only be a single instance - for example, data components such as
+                <computeroutput>CustomerData</computeroutput>, or the Order Manager (which in
+              Exercise07 is a view-only component). Their instance name is always "The". </para>
+          </listitem>
+          <listitem>
+            <para>An "<emphasis role="bold">anonymous</emphasis>" component is one for which there
+              can logically be more than one instance, but which do not have any obvious
+              distinguishing name. Thus they are initially given the instance name "A". Examples are
+              list components such as <computeroutput>CustomerListModel</computeroutput>. Instances
+              of an anonymous component are provided with a system-generated number. For example,
+              the name of a Customer List Model is a unique number generated by its superclass,
+              starting at '1'. For example, to create an instance of
+                <computeroutput>CustomerListModel</computeroutput>, the message
+                <computeroutput>getComponentId("CustomerListModel","A")</computeroutput> is sent to
+                <computeroutput>ObjectMgr</computeroutput> which, on seeing instance name "a" or
+              "A", invokes <computeroutput>getInstanceName</computeroutput> on the ListModel class
+              object, which is handled by the <computeroutput>Model</computeroutput> superclass.
+                <computeroutput>Model</computeroutput> returns a number starting at "1".</para>
+          </listitem>
+          <listitem>
+            <para>A "<emphasis role="bold">form</emphasis>" instance such as a Sales Order Form or a
+              Purchase Request form is a special kind of component. Initially it is anonymous, and
+              although when created there is no database record of it, there will be after it's
+              completed and the user hits OK. A new number (e.g. an order number) is assigned to a
+              form when it is created, and this number is used as the database key when, after
+              completion, the form is committed to the database. For example, the Order Form
+              component assumes that this will happen, and so its instance name is a unique Sales
+              Order number. This is created by the <computeroutput>getInstanceName</computeroutput>
+              class method of <computeroutput>OrderFormModel</computeroutput> which over-rides the
+              same method in its superclass (<computeroutput>Model</computeroutput>).</para>
+          </listitem>
         </itemizedlist>The above classification covers almost all the kinds of dialog found in a
         typical UI environment handling business systems. To test this, consider the "Words of
         Wisdom" business component in Exercise03, which was implemented as a view, a model, and a
-        data component. The <computeroutput>...Exercise07\Extras\Wow4</computeroutput> folder contains the
-        same set of components, but modified to use the MVF. Code no longer required is commented
-        out with the comment "v01-00"; methods or statements added or for MVF use are commented with
-        "MVF"; statements changed are commented "v01-00-->MVF"; unchanged statements are commented
-        "v01-00 &amp; MVF".<footnote>
+        data component. The <computeroutput>...Exercise07\Extras\Wow4</computeroutput> folder
+        contains the same set of components, but modified to use the MVF. Code no longer required is
+        commented out with the comment <computeroutput>v01-00</computeroutput>; methods or
+        statements added for MVF use are commented with <computeroutput>MVF</computeroutput>;
+        modified statements are commented <computeroutput>v01-00-->MVF</computeroutput>; and
+        unchanged statements are commented <computeroutput>v01-00 &amp; MVF</computeroutput>.<footnote>
           <para>Actually, Wow is somewhat schizophrenic, in that it can be launched either as a
             singleton or as anonymous - that is, with an instance name of "The" or "A". If "The",
             then only one instance is allowed. If "A", then multiple instances can be
             created.</para>
-        </footnote>As mentioned above, this whole approach of having component names define
-        the type of component is not particularly scalable. A better approach - certainly for
+        </footnote>As mentioned above, this whole approach of having component names define the type
+        of component is not particularly scalable. A better approach - certainly for
         production-strength apps - is to provide a configuration file that names the classes and
         states what type they are. Such a file might look something like this, and would remove the
         need for using class names as the basis for managing instances: <programlisting><![CDATA[<modelClass name="Product",     type="named", dataClass="ProductDB"/>