Index: /trunk/ccl/examples/cocoa-editor.lisp
===================================================================
--- /trunk/ccl/examples/cocoa-editor.lisp	(revision 5884)
+++ /trunk/ccl/examples/cocoa-editor.lisp	(revision 5885)
@@ -521,6 +521,5 @@
 			buffer))))
 
-(define-objc-method ((:id :attributes-at-index (#+apple-objc-2.0 :<NSUI>nteger
-                                                #-apple-objc-2.0 :unsigned index)
+(define-objc-method ((:id :attributes-at-index (:<NSUI>nteger index)
 			  :effective-range ((* :<NSR>ange) rangeptr))
 		     hemlock-text-storage)
@@ -816,7 +815,7 @@
                                    (- index (mark-absolute-position m2)))
                              (return-from HANDLED nil))))))))))))
-    (objc-message-send-super-stret r (super) "selectionRangeForProposedRange:granularity:"
-                                   :<NSR>ange proposed
-                                   :<NSS>election<G>ranularity g)
+    (send-super/stret r
+                      :selection-range-for-proposed-range proposed
+                      :granularity g)
     #+debug
     (#_NSLog #@"range = %@, proposed = %@, granularity = %d"
@@ -1060,16 +1059,16 @@
            (let* ((modeline-width (* (pref modeline-frame
                                            :<NSR>ect.size.width)
-                                     0.75e0)))
-             (declare (single-float modeline-width))
+                                     0.75f0)))
+             (declare (type cg-float single-float modeline-width))
              (setf (pref modeline-frame :<NSR>ect.size.width)
                    modeline-width
-                   (the single-float
+                   (the cg-float
                      (pref scrollbar-frame :<NSR>ect.size.width))
-                   (- (the single-float
+                   (- (the cg-float
                         (pref scrollbar-frame :<NSR>ect.size.width))
                       modeline-width)
-                   (the single-float
+                   (the cg-float
                      (pref scrollbar-frame :<NSR>ect.origin.x))
-                   (+ (the single-float
+                   (+ (the cg-float
                         (pref scrollbar-frame :<NSR>ect.origin.x))
                       modeline-width))
@@ -1132,5 +1131,5 @@
         (send pane :set-box-type #$NSBoxPrimary)
         (send pane :set-border-type #$NSNoBorder)
-        (send pane :set-content-view-margins (ns-make-size *text-pane-margin-width* *text-pane-margin-height*))
+        (send pane :set-content-view-margins (ns-make-size (float *text-pane-margin-width* +cgfloat-zero+) (float *text-pane-margin-height* +cgfloat-zero+)))
         (send pane :set-title-position #$NSNoTitle))
       pane))
@@ -1138,5 +1137,9 @@
 
 (defun make-scrolling-text-view-for-textstorage (textstorage x y width height tracks-width color)
-  (slet ((contentrect (ns-make-rect x y width height)))
+  (slet ((contentrect (ns-make-rect
+                       (float x +cgfloat-zero+)
+                       (float y +cgfloat-zero+)
+                       (float width +cgfloat-zero+)
+                       (float height +cgfloat-zero+))))
     (let* ((scrollview (send (make-objc-instance
 			      'modeline-scroll-view
@@ -1250,5 +1253,8 @@
 
 (defun make-echo-area (hemlock-frame x y width height gap-context color)
-  (slet ((frame (ns-make-rect x y width height)))
+  (slet ((frame (ns-make-rect (float x +cgfloat-zero+)
+                              (float y +cgfloat-zero+)
+                              (float width +cgfloat-zero+)
+                              (float height +cgfloat-zero+))))
     (let* ((box (make-objc-instance "NSView"
                                     :with-frame frame)))
@@ -1462,6 +1468,6 @@
   (let* ((window-content-view (send w 'content-view)))
     (slet ((window-frame (send window-content-view 'frame)))
-      (slet ((pane-rect (ns-make-rect 0.0f0
-				      reserve-below
+      (slet ((pane-rect (ns-make-rect +cgfloat-zero+
+				      (float reserve-below +cgfloat-zero+)
 				      (pref window-frame :<NSR>ect.size.width)
 				      (- (pref window-frame :<NSR>ect.size.height) (+ reserve-above reserve-below)))))
@@ -1810,12 +1816,17 @@
 	 (width (fceiling (* ncols char-width)))
 	 (scrollview (text-pane-scroll-view pane))
-	 (window (send scrollview 'window)))
+	 (window (send scrollview 'window))
+         (has-horizontal-scroller (send scrollview 'has-horizontal-scroller))
+         (has-vertical-scroller (send scrollview 'has-vertical-scroller)))
+    (format t "~& width = ~s, height = ~s" width height)
     (rlet ((tv-size :<NSS>ize :height height
 		    :width (+ width (* 2 (send (send tv 'text-container)
                                                'line-fragment-padding)))))
-      (when (send scrollview 'has-vertical-scroller)
+      (#_NSLog #@"\ntv-size = %@\n" :address (#_NSStringFromSize tv-size))
+      
+      (when has-vertical-scroller 
 	(send scrollview :set-vertical-line-scroll char-height)
 	(send scrollview :set-vertical-page-scroll +cgfloat-zero+ #|char-height|#))
-      (when (send scrollview 'has-horizontal-scroller)
+      (when has-horizontal-scroller
 	(send scrollview :set-horizontal-line-scroll char-width)
 	(send scrollview :set-horizontal-page-scroll +cgfloat-zero+ #|char-width|#))
@@ -1823,9 +1834,8 @@
 	      (send (@class ns-scroll-view)
 		    :frame-size-for-content-size tv-size
-		    :has-horizontal-scroller
-		    (send scrollview 'has-horizontal-scroller)
-		    :has-vertical-scroller
-		    (send scrollview 'has-vertical-scroller)
+		    :has-horizontal-scroller has-horizontal-scroller
+		    :has-vertical-scroller has-vertical-scroller
 		    :border-type (send scrollview 'border-type))))
+        (#_NSLog #@"\na: sv-size = %@\n" :address (#_NSStringFromSize sv-size))
 	(slet ((pane-frame (send pane 'frame))
                (margins (send pane 'content-view-margins)))
@@ -1835,4 +1845,5 @@
           (incf (pref sv-size :<NSS>ize.width)
                 (pref margins :<NSS>ize.width))
+          (#_NSLog #@"\nb: sv-size = %@\n" :address (#_NSStringFromSize sv-size))
 	  (send window :set-content-size sv-size)
 	  (send window :set-resize-increments
@@ -1862,8 +1873,9 @@
 (defmethod textview-background-color ((doc hemlock-editor-document))
   (send (find-class 'ns:ns-color)
-        :color-with-calibrated-red *editor-background-red-component*
-        :green *editor-background-green-component*
-        :blue *editor-background-blue-component*
-        :alpha *editor-background-alpha-component*))
+        :color-with-calibrated-red (float *editor-background-red-component*
+                                          +cgfloat-zero+)
+        :green (float *editor-background-green-component* +cgfloat-zero+)
+        :blue (float *editor-background-blue-component* +cgfloat-zero+)
+        :alpha (float *editor-background-alpha-component* +cgfloat-zero+)))
 
 
Index: /trunk/ccl/examples/cocoa-prefs.lisp
===================================================================
--- /trunk/ccl/examples/cocoa-prefs.lisp	(revision 5884)
+++ /trunk/ccl/examples/cocoa-prefs.lisp	(revision 5885)
@@ -148,5 +148,5 @@
 (define-objc-method ((:id :init-with-frame (:<NSR>ect frame))
                      prefs-view)
-    (send-super :init-with-frame frame)
+  (send-super :init-with-frame frame)
   (slet ((scroll-frame (ns-make-rect (float 20.0f0 +cgfloat-zero+)
                                      (float 40.0f0 +cgfloat-zero+)
@@ -211,6 +211,7 @@
          (let* ((panel (new-cocoa-window :class self
                                          :title "Preferences"
-                                         :activate nil)))
-           (slet ((bounds (send (send panel 'content-view) 'bounds)))
+                                         :activate nil))
+                (view (send panel 'content-view)))
+           (slet ((bounds (send view 'bounds)))
              (let* ((v (make-instance 'prefs-view :with-frame bounds)))
                (send panel :set-content-view v)
Index: /trunk/ccl/examples/cocoa-typeout.lisp
===================================================================
--- /trunk/ccl/examples/cocoa-typeout.lisp	(revision 5884)
+++ /trunk/ccl/examples/cocoa-typeout.lisp	(revision 5885)
@@ -47,6 +47,6 @@
     (slet* ((contentsize (send scrollview 'content-size))
 	    (text-frame (ns-make-rect
-			 0.0f0
-			 0.0f0
+			 +cgfloat-zero+
+			 +cgfloat-zero+
 			 (pref contentsize :<NSS>ize.width)
 			 (pref contentsize :<NSS>ize.height))))
@@ -77,7 +77,9 @@
 					 :width 600
                                          :activate nil)))
-	   (rlet ((size :<NSS>ize :width 600.0f0 :height 10000.0f0))
+	   (rlet ((size :<NSS>ize
+                    :width (float 600.0f0 +cgfloat-zero+)
+                    :height (float 10000.0f0 +cgfloat-zero+)))
 		 (send panel :set-max-size size)
-		 (setf (pref size :<NSS>ize.height) 1.0f0)
+		 (setf (pref size :<NSS>ize.height) (float 1.0f0 +cgfloat-zero+))
 		 (send panel :set-min-size size))
            (slet ((bounds (send (send panel 'content-view) 'bounds)))
