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

Switch to unified view

a/docs/trunk/oodguide/en-US/Chapter07.xml b/docs/trunk/oodguide/en-US/Chapter07.xml
...
...
45
<!-- Chapter07 - A Working Application                v01-00 21Mar13
45
<!-- Chapter07 - A Working Application                v01-00 21Mar13
46
46
47
    Changes:
47
    Changes:
48
     v01-00 16Mar13: First version.
48
     v01-00 16Mar13: First version.
49
            21Mar13: Very minor adjustments to spacing and links.
49
            21Mar13: Very minor adjustments to spacing and links.
50
            15Aug13: Corrected folder names after folder structure change.            
50
51
51
    7   *  Towards A Working Application                                                chapSeven
52
    7   *  Towards A Working Application                                                chapSeven
52
    7.1   * Introduction                                                              chap07-intro
53
    7.1   * Introduction                                                              chap07-intro
53
    7.2   * The 'Model-View Framework'                                                chap07-mvf
54
    7.2   * The 'Model-View Framework'                                                chap07-mvf
54
    7.2.1   * MVF Objective                                                               chap07-mvf-obj
55
    7.2.1   * MVF Objective                                                               chap07-mvf-obj
...
...
288
      <para> The MVF consists of five classes: <computeroutput>ObjectMgr</computeroutput>,
289
      <para> The MVF consists of five classes: <computeroutput>ObjectMgr</computeroutput>,
289
          <computeroutput>ViewMgr</computeroutput>, <computeroutput>Model</computeroutput>,
290
          <computeroutput>ViewMgr</computeroutput>, <computeroutput>Model</computeroutput>,
290
          <computeroutput>xxView</computeroutput> (i.e. RcView, ResView, and UdView), and
291
          <computeroutput>xxView</computeroutput> (i.e. RcView, ResView, and UdView), and
291
          <computeroutput>GenericFile</computeroutput> (see <xref linkend="chap07-mvf-classes"/>
292
          <computeroutput>GenericFile</computeroutput> (see <xref linkend="chap07-mvf-classes"/>
292
          for more detail). These are all located in the folder
293
          for more detail). These are all located in the folder
293
          <computeroutput>ooRexx\samples\oodialog\userGuide\exercises\Support</computeroutput>.
294
          <computeroutput>ooRexx\samples\oodialog\userGuide\exercises\Exercise07\Support</computeroutput>.
294
        Together, they handle the three different types of application component - view, model, and
295
        Together, they provide for the three different types of application component - view, model, and
295
        data. Each model gets its data from its data component, and each model has a single view. (A
296
        data. Each model gets its data from its data component, and each model has a single view. (A
296
        production-strength MVF could support multiple views of the same model by providing an "Open
297
        production-strength MVF could support multiple views of the same model by providing an "Open
297
        as..." option for a given icon or list item. This would display a selection of views,
298
        as..." option for a given icon or list item. This would display a selection of views,
298
        similar to the "Open with..." function provided by a button-2 click on an item in Windows
299
        similar to the "Open with..." function provided by a button-2 click on an item in Windows
299
        Explorer.)</para>
300
        Explorer.)</para>
...
...
341
          superclass asks the <computeroutput>PersonData</computeroutput> instance for its data.
342
          superclass asks the <computeroutput>PersonData</computeroutput> instance for its data.
342
          Third, <computeroutput>PersonView</computeroutput>'s superclass asks
343
          Third, <computeroutput>PersonView</computeroutput>'s superclass asks
343
            <computeroutput>PersonModel</computeroutput> for its data. Finally, the dialog for
344
            <computeroutput>PersonModel</computeroutput> for its data. Finally, the dialog for
344
          Person PA150 appears. </para>
345
          Person PA150 appears. </para>
345
        <para>The code required to conform with the MVF is shown in the Person component in
346
        <para>The code required to conform with the MVF is shown in the Person component in
346
            <computeroutput>ooRexx\samples\oodialog\userGuide\exercises\Samples\Person</computeroutput>,
347
            <computeroutput>ooRexx\samples\oodialog\userGuide\exercises\Exercise07\Extras\Person</computeroutput>,
347
          and those requirements are as follows:</para>
348
          and those requirements are as follows:</para>
348
        <itemizedlist>
349
        <itemizedlist>
349
            <listitem>
350
            <listitem>
350
              <para><emphasis role="bold">A Data Component </emphasis>(a subclass of
351
              <para><emphasis role="bold">A Data Component </emphasis>(a subclass of
351
                  <computeroutput>GenericFile</computeroutput>)</para>
352
                  <computeroutput>GenericFile</computeroutput>)</para>
...
...
642
              <para><computeroutput>offset</computeroutput>
643
              <para><computeroutput>offset</computeroutput>
643
                  <indexterm><primary>offset method</primary></indexterm>
644
                  <indexterm><primary>offset method</primary></indexterm>
644
                  <indexterm><primary>View superclass</primary><secondary>offset method</secondary></indexterm>
645
                  <indexterm><primary>View superclass</primary><secondary>offset method</secondary></indexterm>
645
               - This method offsets dialogs from the Order Management dialog when
646
               - This method offsets dialogs from the Order Management dialog when
646
                first opened. Although not used elsewhere in this exercise, the effect can be seen
647
                first opened. Although not used elsewhere in this exercise, the effect can be seen
647
                using the "Person" component in the <computeroutput>Samples\Person</computeroutput>
648
                using the "Person" component in the <computeroutput>Exercise07\Extras\Person</computeroutput>
648
                folder. First, use the Message Sender to launch a Person dialog (for example send
649
                folder. First, use the Message Sender to launch a Person dialog (for example send
649
                  <emphasis role="bold"><emphasis role="italic">showModel</emphasis></emphasis> to
650
                  <emphasis role="bold"><emphasis role="italic">showModel</emphasis></emphasis> to
650
                  <emphasis role="bold"><emphasis role="italic">ObjectMgr The</emphasis></emphasis>
651
                  <emphasis role="bold"><emphasis role="italic">ObjectMgr The</emphasis></emphasis>
651
                with the data <emphasis role="bold"><emphasis role="italic">PersonModel
652
                with the data <emphasis role="bold"><emphasis role="italic">PersonModel
652
                    PA150</emphasis></emphasis>). The Person dialog appears in the center
653
                    PA150</emphasis></emphasis>). The Person dialog appears in the center
...
...
766
              <computeroutput>OrderFormModel</computeroutput> which over-rides the same method in
767
              <computeroutput>OrderFormModel</computeroutput> which over-rides the same method in
767
            its superclass (<computeroutput>Model</computeroutput>).</para></listitem>
768
            its superclass (<computeroutput>Model</computeroutput>).</para></listitem>
768
        </itemizedlist>The above classification covers almost all the kinds of dialog found in a
769
        </itemizedlist>The above classification covers almost all the kinds of dialog found in a
769
        typical UI environment handling business systems. To test this, consider the "Words of
770
        typical UI environment handling business systems. To test this, consider the "Words of
770
        Wisdom" business component in Exercise03, which was implemented as a view, a model, and a
771
        Wisdom" business component in Exercise03, which was implemented as a view, a model, and a
771
        data component. The <computeroutput>.../samples/Wow4</computeroutput> folder contains the
772
        data component. The <computeroutput>...Exercise07\Extras\Wow4</computeroutput> folder contains the
772
        same set of components, but modified to use the MVF. Code no longer required is commented
773
        same set of components, but modified to use the MVF. Code no longer required is commented
773
        out with the comment "v01-00"; methods or statements added or for MVF use are commented with
774
        out with the comment "v01-00"; methods or statements added or for MVF use are commented with
774
        "MVF"; statements changed are commented "v01-00-->MVF"; unchanged statements are commented
775
        "MVF"; statements changed are commented "v01-00-->MVF"; unchanged statements are commented
775
        "v01-00 &amp; MVF".<footnote>
776
        "v01-00 &amp; MVF".<footnote>
776
          <para>Actually, Wow is somewhat schizophrenic, in that it can be launched either as a
777
          <para>Actually, Wow is somewhat schizophrenic, in that it can be launched either as a