Changeset 7928

Dec 21, 2007, 5:15:01 PM (13 years ago)

Update from trunk to rev 7927

5 edited
9 copied


  • branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO.html

    r7709 r7928  
    1717      href="">
    1818            Currency Converter</a> example<br/>
    19           with OpenMCL
     19          with Clozure CL
    2020      </h2></div>
    3232    <div class="body-text">
    33       <p>This HOWTO guide explains how to use OpenMCL to create a
    34       Cocoa application that is functionally identical to Apple's
     33      <p>This HOWTO guide explains how to use Clozure CL (formerly
     34      OpenMCL) to create a Cocoa application that is functionally
     35      identical to Apple's
    3536      <a
    3637      href="">
    3839        difference between Apple's example and this one is that this
    3940        one is implemented in Common Lisp instead of Objective C. It
    40         uses OpenMCL's Objective-C bridge to provide communication
     41        uses Clozure CL's Objective-C bridge to provide communication
    4142        between the Lisp code that you write and Apple's Cocoa
    4243        frameworks. The resulting application looks and acts just
    4748      Apple's document handy for reference, and we just describe the
    4849      specific steps needed to build the example using
    49       Apple's InterfaceBuilder application and OpenMCL.</p>
     50      Apple's InterfaceBuilder application and Clozure CL.</p>
    51       <p>The current version of the OpenMCL Objective-C bridge
     52      <p>The current version of the Clozure CL Objective-C bridge
    5253      includes code that was formerly distributed separately as the
    5354      "Bosco" application framework. Because that framework has been
    54       integrated with OpenMCL proper, it no longer exists as a
     55      integrated with Clozure CL proper, it no longer exists as a
    5556      separate project. "Bosco" now names only the decorative rodent
    5657      at the top of this page.</p>
    6364    <div class="body-text">
    6465      <p>It will be helpful in understanding this example if you can
    65       easily refer to Apple's <a
    66       href="">
    67         Currency Converter</a> example while working through this
     66      easily refer to
     67      Apple's <a href="">
     68      Currency Converter</a> tutorial while working through this
    6869      HOWTO. You might consider opening a separate window or tab, and
    6970      keeping the Apple example handy while you work.</p>
    7475      <a
    7576      href="">
    76         Model-View-Controller</a> paradigm that the Apple example
     77        Model-View-Controller</a> paradigm that the Apple tutorial
    7778        uses. If you are new to Cocoa programming, or if you are not
    7879        familiar with how it uses the Model-View-Controller paradigm,
    79         it's probably a good idea to read through the Apple example
    80         in full, paying special attention to the
    81         Model-View-Controller section. Once you've done that, keep
    82         the Apple pages handy in a window for easy reference.</p>
     80        it's probably a good idea to read through the Apple example in
     81        full, paying special attention to the Model-View-Controller
     82        section. Once you've done that, keep the Apple pages handy in
     83        a window for easy reference.</p>
    8485      <p>This Common Lisp version of the Currency Converter example
    8586      uses Apple's InterfaceBuilder application to build a window and
    8687      main menu, and then uses Common Lisp code to load and operate
    87       that user interface. The Common Lisp code relies on OpenMCL's
     88      that user interface. The Common Lisp code relies on Clozure CL's
    8889      Objective-C bridge to provide communication between the running
    8990      Lisp code and Apple's Cocoa frameworks. Once the code is
    103104      <ul>
    104         <li><p>Mac OS X Tiger (version 10.4.x) or Mac OS X Leopard
    105         (version 10.5.x)</p></li>
     105        <li><p>Mac OS X Leopard (version 10.5.x) or Mac OS X Tiger
     106        (version 10.4.x)</p></li>
    106107        <li><p>Apple's XCode development tools</p></li>
    107108        <li><p>Apple's InterfaceBuilder application (included with XCode)</p></li>
    108         <li><p>A recent version of OpenMCL</p></li>
    109         <li><p>Clozure</p></li>
     109        <li><p>A recent version of Clozure CL</p></li>
    110110        <li><p>The Apple <a
    111111      href="">
  • branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html

    r7800 r7928  
    6868      "NewApplication". Save the new nibfile into the
    6969      "currency-converter" folder that you created earlier
    70       (on <a href="making_project.html">this page</a>).</p>
     70      (on <a href="making_project.html">this page</a>). Give the new
     71      file the name "CurrencyConverter.nib"</p>
     73      <div class="note">
     74        <p><strong><em>NOTE:</em></strong> Most Objective C application projects use a main
     75        nibfile called "MainMenu.nib", and if you use XCode to create
     76        a new application project, it creates a nibfile with that
     77        name. Apple's CurrencyConverter tutorial assumes that the
     78        name of the main nibfile is "MainMenu.nib".</p>
     80        <p>So, why do we tell you to use a different name? Clozure CL
     81          has a main nibfile built into it, whose name is
     82          "MainMenu.nib". Normally you don't see it, and don't even
     83          need to know that it exists. But the Clozure CL
     84          application-building tools create a new application by
     85          copying resources from the Clozure CL application, so that
     86          your new application has available to it all the built-in
     87          Clozure CL tools. We ask you to name your nibfile
     88          "CurrencyConverter.nib" so that it can coexist with the
     89          Clozure CL main nibfile without causing any problems.</p>
     91        <p>This difference between a Lisp project and an Objective C
     92        project might be a little confusing at first. Just try to keep
     93        in mind that whenever Apple's tutorial refers to the
     94        "MainMenu.nib" file, it means the file we have just created
     95        and named "CurrencyConverter.nib". In a Clozure CL project,
     96        "MainMenu.nib" is the name of the main Lisp nibfile, not your
     97        application's main nibfile.</p>
     98      </div>
     100      <div class="section-head">
     101        <h2>Resize the Window</h2>
     102      </div>
     104      <p>Make the window smaller by dragging the bottom-right corner
     105      of the window inward.</p>
     107      <div class="inline-image">
     108        <img src="../images/ibwin-tiger3.jpg"alt=""
     109             border='0'/>
     110      </div>
     112      <div class="section-head">
     113        <h2>Change the Title of the Window</h2>
     114      </div>
     116      <p>InterfaceBuilder creates the initial window with the title
     117      "Window". Change the title to the more appropriate "Currency
     118      Converter":</p>
     120      <ol>
     121        <li><p>Click the Window object in the "Currency Converter"
     122        window.</p>
     123          <p><div class="inline-image">
     124              <img src="../images/ibwin-tiger4.jpg"alt=""
     125                   border='0'/>
     126            </div>
     127        </p></li>
     128        <li><p>Choose "Attributes" from the drop-down menu in the
     129        Inspector window:</p>
     130          <p><div class="inline-image">
     131              <img src="../images/ibwin-tiger5.jpg"alt=""
     132                   border='0'/>
     133            </div>
     134        </p></li>
     135        <li><p>Change the "Window Title" field to read "Currency Converter":</p>
     136          <p><div class="inline-image">
     137              <img src="../images/ibwin-tiger6.jpg"alt=""
     138                   border='0'/>
     139            </div>
     140        </p></li>
     141      </ol>
     143      <div class="section-head">
     144        <h2>Add Text Fields</h2>
     145      </div>
     147      <p>In InterfaceBuilder's Palettes window, select the "Cocoa
     148      Text" view, and find the NSTextView object:</p>
     150      <div class="inline-image">
     151        <img src="../images/ibwin-tiger7.jpg"alt=""
     152             border='0'/>
     153      </div>
     155      <p>Drag an NSTextView object and drop it into the "Currency
     156      Converter" window:</p>
     158      <div class="inline-image">
     159        <img src="../images/ibwin-tiger8.jpg"alt=""
     160             border='0'/>
     161      </div>
    72163    </div>
  • branches/event-ide/ccl/level-1/l1-application.lisp

    r7487 r7928  
    283283             :class 'tty-listener
    284284             :process initial-listener-process))))
    285   (%set-toplevel #'(lambda ()
    286                      (with-standard-abort-handling nil
    287                        (loop
    288                          (%nanosleep *periodic-task-seconds* *periodic-task-nanoseconds*)
    289                          (housekeeping)))))
     285  (%set-toplevel #'housekeeping-loop)
    290286  (toplevel))
     288(defun housekeeping-loop ()
     289  (with-standard-abort-handling nil
     290    (loop
     291      (%nanosleep *periodic-task-seconds* *periodic-task-nanoseconds*)
     292      (housekeeping))))
    294295(defmethod application-init-file ((app lisp-development-system))
  • branches/event-ide/ccl/level-1/l1-boot-lds.lisp

    r7487 r7928  
    7979                                  (value-stack-size *default-value-stack-size*)
    8080                                  (temp-stack-size *default-temp-stack-size*)
     81                                  (echoing t)
    8182                                  (process))
    8283  (let ((p (if (typep process class)
    9293    (process-preset p #'(lambda ()
    9394                          (let ((*terminal-io*
    94                                  (make-echoing-two-way-stream
    95                                   input-stream output-stream)))
     95                                 (if echoing
     96                                   (make-echoing-two-way-stream
     97                                    input-stream output-stream)
     98                                   (make-two-way-stream
     99                                    input-stream output-stream))))
    96100                            (unwind-protect
    97101                                 (progn
  • branches/event-ide/ccl/lisp-kernel/lisp-debug.c

    r7912 r7928  
    877877    if (xpPC(xp) == (natural)_sigtramp) {
    878       xp = (ExceptionInformation *) xpGPR(xp,os_major_version < 9 ? REG_RSI :REG_RCX);
     878      xp = (ExceptionInformation *) xpGPR(xp, REG_R8);
    879879      fprintf(stderr, "Exception raised at _sigtramp; using context passed to _sigtramp.  Raw register values (R) may be more interesting then lisp values or lisp backtrace\n");
    880880    }
Note: See TracChangeset for help on using the changeset viewer.