Changeset 7969


Ignore:
Timestamp:
Dec 31, 2007, 11:13:40 PM (12 years ago)
Author:
gz
Message:

update from trunk to rev 7968

Location:
branches/event-ide/ccl
Files:
3 edited
4 copied

Legend:

Unmodified
Added
Removed
  • branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html

    r7928 r7969  
    161161      </div>
    162162
     163      <p>If you drag a view near the edges of a window,
     164      InterfaceBuilder displays blue guide lines that show the
     165      standard placement of a view near the edge of the window. Drag
     166      the text view to the right and upward until the guide lines
     167      appear, and then let go. The text view is then positioned in
     168      the standard way.</p>
     169
     170      <p>Now add two more text fields. You can drag them from the
     171      palette as you did the first one, or you can duplicate the
     172      first one. To duplicate, select the first text view and then
     173      choose "Duplicate" from the "Edit" menu. Alternatively, you can
     174      option-drag the text field to duplicate it.</p>
     175
     176      <div class="inline-image">
     177        <img src="../images/ibwin-tiger9.jpg"alt=""
     178             border='0'/>
     179      </div>
     180
     181      <div class="section-head">
     182        <h2>Label the Text Fields</h2>
     183      </div>
     184
     185      <p>Now add labels to the text fields, to idenitfy their
     186      purposes for the user. For each text field, drag a Label object
     187      from the palette and drop it next to the field. (Alternatively,
     188      you can drop one Label and then duplicate it, just as you can
     189      duplicate the text fields.)</p>
     190
     191      <div class="inline-image">
     192        <img src="../images/ibwin-tiger10.jpg"alt=""
     193             border='0'/>
     194      </div>
     195
     196      <p>Just as InterfaceBuilder displayed guidelines to help you
     197      position the text field near the edge of the window, it also
     198      displays guide lines to help you position the labels near the
     199      text fields. Just drag each text field until the blue guide
     200      lines appear, and release the label.</p>
     201
     202      <p>Now change the text of the labels. Click a label to select
     203      it. Then show the Inspector by choosing the "Show Inspector"
     204      item from the "Tools" menu. Select the "Attributes" item from
     205      the pull-down menu at the top of the Inspector window, and type
     206      the correct text into the Title field. For example, here is how
     207      to enter the text for the top label:</p>
     208
     209      <div class="inline-image">
     210        <img src="../images/ibwin-tiger11.jpg"alt=""
     211             border='0'/>
     212      </div>
     213
     214      <p>Here's how the labels should look after you have entered the
     215      text for all three:</p>
     216
     217      <div class="inline-image">
     218        <img src="../images/ibwin-tiger12.jpg"alt=""
     219             border='0'/>
     220      </div>
     221
     222      <p>When you first enter the text for a label, the label may not
     223      be wide enough to show it all. In that case, you'll see only
     224      part of the text in the label. You can resise the label to make
     225      the full text visible. Click the label to select it. Notice the
     226      small blue dots that surround it. Grab a dot on the left side
     227      and drag it to the left to make the label wider, until you can
     228      see the entire text.</p>
     229
    163230    </div>
    164231  </body>
  • branches/event-ide/ccl/level-1/l1-readloop-lds.lisp

    r7808 r7969  
    218218              (setq *in-read-loop* nil
    219219                    *break-level* break-level)
    220               (multiple-value-bind (form path print-result)
     220              (multiple-value-bind (form env print-result)
    221221                  (toplevel-read :input-stream input-stream
    222222                                 :output-stream output-stream
     
    232232                    (exit-interactive-process *current-process*))
    233233                    (or (check-toplevel-command form)
    234                         (let* ((values (toplevel-eval form path)))
     234                        (let* ((values (toplevel-eval form env)))
    235235                          (if print-result (toplevel-print values))))))))
    236236           (format *terminal-io* "~&Cancelled")))
     
    291291    form))
    292292
    293 (defun toplevel-eval (form &optional *loading-file-source-file*)
    294   (setq +++ ++ ++ + + - - form)
    295   (let* ((package *package*)
    296          (values (multiple-value-list (cheap-eval-in-environment form nil))))
    297     (unless (eq package *package*)
    298       (application-ui-operation *application* :note-current-package *package*))
    299     values))
     293(defun toplevel-eval (form &optional env)
     294  (destructuring-bind (vars . vals) (or env '(nil . nil))
     295    (progv vars vals
     296      (setq +++ ++ ++ + + - - form)
     297      (unwind-protect
     298          (let* ((package *package*)
     299                 (values (multiple-value-list (cheap-eval-in-environment form nil))))
     300            (unless (eq package *package*)
     301              ;; If changing a local value (e.g. buffer-local), not useful to notify app
     302              ;; without more info.  Perhaps should have a *source-context* that can send along?
     303              (unless (member '*package* vars)
     304                (application-ui-operation *application* :note-current-package *package*)))
     305            values)
     306        (loop for var in vars as pval on vals
     307          do (setf (car pval) (symbol-value var)))))))
     308
    300309
    301310(defun toplevel-print (values &optional (out *standard-output*))
  • branches/event-ide/ccl/level-1/l1-streams.lisp

    r7809 r7969  
    54285428
    54295429(defclass selection-input-stream (fd-character-input-stream)
    5430     ((package :initform nil :reader selection-input-stream-package)
    5431      (pathname :initform nil :reader selection-input-stream-pathname)
    5432      (peer-fd  :reader selection-input-stream-peer-fd)))
     5430  ((package :initform nil :reader selection-input-stream-package)
     5431   (pathname :initform nil :reader selection-input-stream-pathname)
     5432   (env :initform nil :reader selection-input-stream-env)
     5433   (peer-fd  :reader selection-input-stream-peer-fd)))
    54335434
    54345435(defmethod select-stream-class ((class (eql 'selection-input-stream))
     
    54545455;;; else raw data
    54555456(defmethod stream-read-char ((s selection-input-stream))
    5456   (with-slots (package pathname) s
     5457  (with-slots (env package pathname) s
    54575458    (let* ((quoted nil))
    54585459      (loop
     
    54615462            (return ch)
    54625463            (case ch
    5463               (#\^p (setq package nil)
     5464              (#\^p (setq package nil env nil)
    54645465                    (let* ((p (read-line s nil nil)))
    54655466                      (unless (zerop (length p))
    54665467                        (setq package p))))
    5467               (#\^v (setq pathname nil)
     5468              (#\^v (setq pathname nil env nil)
    54685469                    (let* ((p (read-line s nil nil)))
    54695470                      (unless (zerop (length p))
     
    56395640
    56405641;;; Interaction with the REPL.  READ-TOPLEVEL-FORM should return 3
    5641 ;;; values: a form, a (possibly null) pathname, and a boolean that
     5642;;; values: a form, a (possibly null) evaluation env, and a boolean that
    56425643;;; indicates whether or not the result(s) of evaluating the form
    56435644;;; should be printed.  (The last value has to do with how selections
     
    56895690                               eof-value)
    56905691  (if (eq (stream-peek-char stream) :eof)
    5691     (values eof-value nil t)
    5692     (let* ((*package* *package*)
    5693            (pkg-name (selection-input-stream-package stream)))
    5694       (when pkg-name (setq *package* (pkg-arg pkg-name)))
    5695       (let* ((form (call-next-method))
     5692    (with-slots (env package pathname) stream
     5693      (setf env nil package nil pathname nil)
     5694      (values eof-value nil t))
     5695    (with-slots (env package pathname) stream
     5696      (when (and (or package pathname) (null env))
     5697        (setf env (cons '(*package* *loading-file-source-file*)
     5698                        (list (or (and package (pkg-arg package)) *package*) pathname))))
     5699      (let* ((form (progv (car env) (cdr env)
     5700                     (call-next-method)))
    56965701             (last-form-in-selection (not (listen stream))))
    5697         (values form
    5698                 (selection-input-stream-pathname stream)
    5699                 (or last-form-in-selection *verbose-eval-selection*))))))
    5700 
    5701                              
     5702        (values form env (or last-form-in-selection *verbose-eval-selection*))))))
     5703
     5704
    57025705(defun column (&optional stream)
    57035706  (let* ((stream (real-print-stream stream)))
Note: See TracChangeset for help on using the changeset viewer.