Index: /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html
===================================================================
--- /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html	(revision 7968)
+++ /branches/event-ide/ccl/examples/cocoa/currency-converter/HOWTO_files/pages/building_ui_tiger.html	(revision 7969)
@@ -161,4 +161,71 @@
       </div>
 
+      <p>If you drag a view near the edges of a window,
+      InterfaceBuilder displays blue guide lines that show the
+      standard placement of a view near the edge of the window. Drag
+      the text view to the right and upward until the guide lines
+      appear, and then let go. The text view is then positioned in
+      the standard way.</p>
+
+      <p>Now add two more text fields. You can drag them from the
+      palette as you did the first one, or you can duplicate the
+      first one. To duplicate, select the first text view and then
+      choose "Duplicate" from the "Edit" menu. Alternatively, you can
+      option-drag the text field to duplicate it.</p>
+
+      <div class="inline-image">
+        <img src="../images/ibwin-tiger9.jpg"alt="" 
+             border='0'/>
+      </div>
+
+      <div class="section-head">
+        <h2>Label the Text Fields</h2>
+      </div>
+
+      <p>Now add labels to the text fields, to idenitfy their
+      purposes for the user. For each text field, drag a Label object
+      from the palette and drop it next to the field. (Alternatively,
+      you can drop one Label and then duplicate it, just as you can
+      duplicate the text fields.)</p>
+
+      <div class="inline-image">
+        <img src="../images/ibwin-tiger10.jpg"alt="" 
+             border='0'/>
+      </div>
+
+      <p>Just as InterfaceBuilder displayed guidelines to help you
+      position the text field near the edge of the window, it also
+      displays guide lines to help you position the labels near the
+      text fields. Just drag each text field until the blue guide
+      lines appear, and release the label.</p>
+
+      <p>Now change the text of the labels. Click a label to select
+      it. Then show the Inspector by choosing the "Show Inspector"
+      item from the "Tools" menu. Select the "Attributes" item from
+      the pull-down menu at the top of the Inspector window, and type
+      the correct text into the Title field. For example, here is how
+      to enter the text for the top label:</p>
+
+      <div class="inline-image">
+        <img src="../images/ibwin-tiger11.jpg"alt="" 
+             border='0'/>
+      </div>
+
+      <p>Here's how the labels should look after you have entered the
+      text for all three:</p>
+
+      <div class="inline-image">
+        <img src="../images/ibwin-tiger12.jpg"alt="" 
+             border='0'/>
+      </div>
+
+      <p>When you first enter the text for a label, the label may not
+      be wide enough to show it all. In that case, you'll see only
+      part of the text in the label. You can resise the label to make
+      the full text visible. Click the label to select it. Notice the
+      small blue dots that surround it. Grab a dot on the left side
+      and drag it to the left to make the label wider, until you can
+      see the entire text.</p>
+
     </div>
   </body>
Index: /branches/event-ide/ccl/level-1/l1-readloop-lds.lisp
===================================================================
--- /branches/event-ide/ccl/level-1/l1-readloop-lds.lisp	(revision 7968)
+++ /branches/event-ide/ccl/level-1/l1-readloop-lds.lisp	(revision 7969)
@@ -218,5 +218,5 @@
               (setq *in-read-loop* nil
                     *break-level* break-level)
-              (multiple-value-bind (form path print-result)
+              (multiple-value-bind (form env print-result)
                   (toplevel-read :input-stream input-stream
                                  :output-stream output-stream
@@ -232,5 +232,5 @@
                     (exit-interactive-process *current-process*))
                     (or (check-toplevel-command form)
-                        (let* ((values (toplevel-eval form path)))
+                        (let* ((values (toplevel-eval form env)))
                           (if print-result (toplevel-print values))))))))
            (format *terminal-io* "~&Cancelled")))
@@ -291,11 +291,20 @@
     form))
 
-(defun toplevel-eval (form &optional *loading-file-source-file*)
-  (setq +++ ++ ++ + + - - form)
-  (let* ((package *package*)
-         (values (multiple-value-list (cheap-eval-in-environment form nil))))
-    (unless (eq package *package*)
-      (application-ui-operation *application* :note-current-package *package*))
-    values))
+(defun toplevel-eval (form &optional env)
+  (destructuring-bind (vars . vals) (or env '(nil . nil))
+    (progv vars vals
+      (setq +++ ++ ++ + + - - form)
+      (unwind-protect
+          (let* ((package *package*)
+                 (values (multiple-value-list (cheap-eval-in-environment form nil))))
+            (unless (eq package *package*)
+              ;; If changing a local value (e.g. buffer-local), not useful to notify app
+              ;; without more info.  Perhaps should have a *source-context* that can send along?
+              (unless (member '*package* vars)
+                (application-ui-operation *application* :note-current-package *package*)))
+            values)
+        (loop for var in vars as pval on vals
+          do (setf (car pval) (symbol-value var)))))))
+
 
 (defun toplevel-print (values &optional (out *standard-output*))
Index: /branches/event-ide/ccl/level-1/l1-streams.lisp
===================================================================
--- /branches/event-ide/ccl/level-1/l1-streams.lisp	(revision 7968)
+++ /branches/event-ide/ccl/level-1/l1-streams.lisp	(revision 7969)
@@ -5428,7 +5428,8 @@
 
 (defclass selection-input-stream (fd-character-input-stream)
-    ((package :initform nil :reader selection-input-stream-package)
-     (pathname :initform nil :reader selection-input-stream-pathname)
-     (peer-fd  :reader selection-input-stream-peer-fd)))
+  ((package :initform nil :reader selection-input-stream-package)
+   (pathname :initform nil :reader selection-input-stream-pathname)
+   (env :initform nil :reader selection-input-stream-env)
+   (peer-fd  :reader selection-input-stream-peer-fd)))
 
 (defmethod select-stream-class ((class (eql 'selection-input-stream))
@@ -5454,5 +5455,5 @@
 ;;; else raw data
 (defmethod stream-read-char ((s selection-input-stream))
-  (with-slots (package pathname) s
+  (with-slots (env package pathname) s
     (let* ((quoted nil))
       (loop
@@ -5461,9 +5462,9 @@
             (return ch)
             (case ch
-              (#\^p (setq package nil)
+              (#\^p (setq package nil env nil)
                     (let* ((p (read-line s nil nil)))
                       (unless (zerop (length p))
                         (setq package p))))
-              (#\^v (setq pathname nil)
+              (#\^v (setq pathname nil env nil)
                     (let* ((p (read-line s nil nil)))
                       (unless (zerop (length p))
@@ -5639,5 +5640,5 @@
 
 ;;; Interaction with the REPL.  READ-TOPLEVEL-FORM should return 3
-;;; values: a form, a (possibly null) pathname, and a boolean that
+;;; values: a form, a (possibly null) evaluation env, and a boolean that
 ;;; indicates whether or not the result(s) of evaluating the form
 ;;; should be printed.  (The last value has to do with how selections
@@ -5689,15 +5690,17 @@
                                eof-value)
   (if (eq (stream-peek-char stream) :eof)
-    (values eof-value nil t)
-    (let* ((*package* *package*)
-           (pkg-name (selection-input-stream-package stream)))
-      (when pkg-name (setq *package* (pkg-arg pkg-name)))
-      (let* ((form (call-next-method))
+    (with-slots (env package pathname) stream
+      (setf env nil package nil pathname nil)
+      (values eof-value nil t))
+    (with-slots (env package pathname) stream
+      (when (and (or package pathname) (null env))
+        (setf env (cons '(*package* *loading-file-source-file*)
+                        (list (or (and package (pkg-arg package)) *package*) pathname))))
+      (let* ((form (progv (car env) (cdr env)
+                     (call-next-method)))
              (last-form-in-selection (not (listen stream))))
-        (values form
-                (selection-input-stream-pathname stream)
-                (or last-form-in-selection *verbose-eval-selection*))))))
-
-                             
+        (values form env (or last-form-in-selection *verbose-eval-selection*))))))
+
+
 (defun column (&optional stream)
   (let* ((stream (real-print-stream stream)))
