Changeset 7709

Nov 23, 2007, 1:19:34 AM (13 years ago)

added several images for the HOWTO

3 added
7 edited


  • trunk/ccl/examples/cocoa/currency-converter/HOWTO.html

    r7435 r7709  
    1515    <div class="subtitle">
    1616      <h2>Creating Apple's <a
    17       href="">
     17      href="">
    1818            Currency Converter</a> example<br/>
    1919          with OpenMCL
    3434      Cocoa application that is functionally identical to Apple's
    3535      <a
    36       href="">
     36      href="">
    3737        Currency Converter</a> example. The most important
    3838        difference between Apple's example and this one is that this
    6464      <p>It will be helpful in understanding this example if you can
    6565      easily refer to Apple's <a
    66       href="">
     66      href="">
    6767        Currency Converter</a> example while working through this
    6868      HOWTO. You might consider opening a separate window or tab, and
    7373      same. In particular, the Lisp example follows the same
    7474      <a
    75       href="">
     75      href="">
    7676        Model-View-Controller</a> paradigm that the Apple example
    7777        uses. If you are new to Cocoa programming, or if you are not
    103103      <ul>
    104         <li><p>A PowerPC Mac (future versions of this HOWTO will also
    105         support Intel Macs)</p></li>
    106         <li><p>Mac OS X Tiger (version 10.4.x)</p></li>
     104        <li><p>Mac OS X Tiger (version 10.4.x) or Mac OS X Leopard
     105        (version 10.5.x)</p></li>
    107106        <li><p>Apple's XCode development tools</p></li>
    108107        <li><p>Apple's InterfaceBuilder application (included with XCode)</p></li>
    109108        <li><p>A recent version of OpenMCL</p></li>
    110         <li><p>The OpenMCL Cocoa IDE (see <a href="HOWTO_files/pages/building_ide.html">this sidebar</a> for
    111         instructions on building it)</p></li>
     109        <li><p>Clozure</p></li>
    112110        <li><p>The Apple <a
    113       href="">
     111      href="">
    114112        Currency Converter</a> example, for reference</p></li>
    115113      </ul>
  • trunk/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui.html

    r7435 r7709  
    2020      describes in detail</a> how to do this.</p>
     22<div class="section-head">
     23  <h2>Apple's Tutorial</h2>
    2226<p>Apple's tutorial explains how to use InterfaceBuilder to create the
    2327  user interface, and how to use XCode to create project files and
    2630  the part of the tutorial that explains how to use XCode.</p>
    28 <p>Begin by launching InterfaceBuilder, which you will find in the
    29   "/Developer/Applications/" folder. Create a new nibfile by using
    30   InterfaceBuilder's "Starting Point" dialog. If the "Starting Point"
    31   dialog doesn't appear when you launch InterfaceBuilder, you can
    32   display it by choosing "New" from the File menu. Choose "Cocoa
    33   Application", and click the "New" button to create the
    34   nibfile.</p>
     32      <p>We'll begin by using Apple's InterfaceBuilder application to
     33        create a <em>nibfile</em>. The <em>nibfile</em> contains
     34        archived versions of the Objective C objects that define the
     35        application's user interface. When you launch an application,
     36        Mac OS X uses the archived objects in the nibfile to create the
     37        windows and menus you see on the screen. </p>
    36     <div class="subtitle">
    37       <img src="../images/ibwin1.jpg"alt=""
    38            border='0'/>
    39     </div>
     39      <p>Start by locating Apple's InterfaceBuilder application. If
     40        you installed Apple's Developer Tools, InterfaceBuilder should
     41        be in the folder "/Developer/Applications/":</p>
     43      <div class="inline-image">
     44        <img src="../images/finder-win1.jpg"alt=""
     45             border='0'/>
     46      </div>
     49      <p class= "note"><em>NOTE:</em> If you have not installed Apple's Developer Tools, you should
     50        do that now. You will not be able to build the CurrencyConverter
     51        example without them. The Developer Tools are distributed as an
     52        optional install with Mac OS X 10.5 ("Leopard"). Look for the
     53        "XCode Tools" package in the "Optional Installs" folder on the
     54        Mac OS 10.5 install disk.</p>
     56      <p>Once you have located InterfaceBuilder, double-click to launch
     57        the application. InterfaceBuilder presents a window you can use
     58        to choose a template for the nibfile you are going to create.</p>
     60      <div class="inline-image">
     61        <img src="../images/ibwin-leopard1.jpg"alt=""
     62             border='0'/>
     63      </div>
     65      <p>Click the "Application" icon and then click the "Choose" button to
     66        create an application nibfile. InterfaceBuilder creates a new
     67        application nibfile, but doesn't immediately save it. The
     68        Objective C objects that represent the new application's
     69        interface appear in a new untitled window:</p>
     71      <div class="inline-image">
     72        <img src="../images/ibwin-leopard2.jpg"alt=""
     73             border='0'/>
     74      </div>
     76      <p>The intial window and menubar also appear on the screen. The
     77      new application's name appears in the menus as
     78      "NewApplication". Save the new nibfile into the
     79      "currency-converter" folder that you created earlier (on <a href="making_project.html">this
     80      page</a>). Give it the name "CurrencyConverter.nib".</p>
     82      <div class="note">
     83        <p><em>NOTE:</em> Most Objective C application projects use a main
     84        nibfile called "MainMenu.nib", and if you use XCode to create
     85        a new application project, it creates a nibfile with that
     86        name. Apple's CurrencyConverter tutorial assumes that the
     87        name of the main nibfile is "MainMenu.nib".</p>
     89        <p>So, why do we tell you to use a different name? Clozure CL
     90          has a main nibfile built into, whose name is
     91          "MainMenu.nib". Normally you don't see it, and don't even
     92          need to know that it exists. But the Clozure CL
     93          application-building tools create a new application by
     94          copying resources from the Clozure CL application, so that
     95          your new application has available to it all the built-in
     96          Clozure CL tools. In order to avoid any confusion between
     97          your application's nibfile and the MainMenu.nib built into
     98          Clozure CL, we ask you to name your nibfile
     99          "CurrencyConverter.nib".</p>
     101        <p>Just try to keep in mind that whenever Apple's tutorial
     102        refers to the "MainMenu.nib" file, it means the file we have
     103        named "CurrencyConverter.nib".</p>
     104      </div>
    42 <p>Save the nibfile in your "currency-converter" folder. Name it
    43   "CurrencyConverter.nib". Apple's tutorial names it "MainMenu.nib",
    44   but we won't use that name. When building an application with
    45   OpenMCL, we gradually change the behavior of the OpenMCL application
    46   until it behaves the way we want for our application. OpenMCL's IDE
    47   already has a nibfile built into it with the name "MainMenu.nib",
    48   and if we wanted to use that name for the CurrencyConverter
    49   application, we would have to replace OpenMCL's "MainMenu.nib". It's
    50   generally a good idea to avoid destroying or replacing things unless
    51   you really have to, so, in order to preserve the OpenMCL nibfile,
    52   give yours the name "CurrencyConverter.nib".</p>
    54 <p>Now you can use this nibfile to create your application's user
    55   interface. When Apple's tutorial tells you to find and open the main
    56   nibfile created by XCode, use your "CurrencyConverter.nib"
    57   instead.</p>
    59107<p>Skip straight to the part of Apple's tutorial
    60 called <a href="">Creating
    61 the Currency Converter Interface</a>. Read the introduction to
     108called <a href="">Defining
     109    the View: Building the User Interface</a>. Read
     110  the introduction to
    62111nibfiles, and follow the instructions to create the Currency Converter
    63112interface. (Remember that when the tutorial tells you to open and edit
    64113"MainMenu.nib", you will instead open and edit your
    65114"CurrencyConverter.nib".) When you reach the end of the section
    66 called <a href="">Defining
    67 the Converter Class</a>, you are done creating the interface for your
     115called <a href="">Test
     116    the Interface</a>, and move on to the short section afterward
     117  called <a href="">What's Next</a>,
     118  you are done creating the interface for your
    68119application. Save your nibfile and continue with the next section of
    69120this HOWTO, on writing the Lisp code that provides the application's
    72 <p></p>
    74123    <div class="nav">
    75       <p><a href="../../HOWTO.html">start</a>|<a href="building_ui.html">previous</a>|<a href="create_lisp.html">next</a></p>
     124      <p><a href="../../HOWTO.html">start</a>|<a href="making_project.html">previous</a>|<a href="create_lisp.html">next</a></p>
    76125    </div>
  • trunk/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/create_lisp.html

    r7435 r7709  
    2020      application to create and manage projects, to edit Objective C
    2121      source files, and to build the final application. In this HOWTO,
    22       Clozure's OpenMCL application takes the place of XCode. The
    23       Lisp project structure is much simpler than the XCode project
     22      the Clozure CL application takes the place of XCode. The Lisp
     23      project structure is much simpler than the XCode project
    2424      structure: to build the Lisp application we need only the
    2525      nibfile created in the previous section, and a single Lisp
    2626      source file.</p>
    28       <p>Before you continue, make sure you have followed the
    29       instructions
    30       in <a href="HOWTO_files/pages/building_ide.html">this
    31       sidebar</a> on building the OpenMCL IDE. We'll use the IDE to
    32       create and load Lisp files.</p>
    34       <p>Once you have a working IDE, launch it by double-clicking
    35       the OpenMCL application. OpenMCL displays a Listener window:</p>
     28      <p>Double-click Clozure CL to launch it. Clozure CL displays a Listener window:</p>
    3730      <div class="subtitle">
    5245    <div class="nav">
    53       <p><a href="../../HOWTO.html">start</a>|<a href="writing_lisp.html">next</a></p>
     46      <p><a href="../../HOWTO.html">start</a>|<a href="building_ui.html">previous</a>|<a href="writing_lisp.html">next</a></p>
    5447    </div>
  • trunk/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/making_project.html

    r7435 r7709  
    4141      application, though not all applications are as simple as this
    4242      currency converter. For more complex applications it makes sense
    43       to split you UI into several nibfiles, and to split your
     43      to split your UI into several nibfiles, and to split your
    4444      implementation into several source files. The basic principle
    4545      remains the same, however: nibfiles define your user interface,
  • trunk/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/writing_lisp.html

    r7435 r7709  
    1818      Apple's example, the explanation of the Objective C code begins
    1919      with the
    20       section <a href="">Implementing
    21       Currency Converter</a>.</p>
     20      section <a href="">Bridging
     21      the Model and View: The Controller</a>.</p>
    2323      <p>The Lisp code in this section of the HOWTO is considerably
    209209    <div class="nav">
    210       <p><a href="../../HOWTO.html">start</a>|<a href="build_app.html">next</a></p>
     210      <p><a href="../../HOWTO.html">start</a>|<a href="create_lisp.html">previous</a>|<a href="build_app.html">next</a></p>
    211211    </div>
  • trunk/ccl/examples/cocoa/currency-converter/HOWTO_files/stylesheets/styles.css

    r7435 r7709  
     35.note {
     36        font: 12pt Georgia, "Times New Roman", Times, serif;
     37        margin-left: 6em;
     38        margin-right: 6em;
     39        text-indent: 0em;
    3542.inline-image {
    3643        text-align: center;
Note: See TracChangeset for help on using the changeset viewer.