Index: /branches/ide-1.0/ccl/examples/cocoa-window.lisp
===================================================================
--- /branches/ide-1.0/ccl/examples/cocoa-window.lisp	(revision 6788)
+++ /branches/ide-1.0/ccl/examples/cocoa-window.lisp	(revision 6789)
@@ -175,5 +175,5 @@
 (objc:defmethod (#/toggleTypeout: :void) ((self lisp-application) sender)
   (declare (ignore sender))
-  (#/show (#/sharedPanel typeout-panel)))
+  (#/show (#/sharedPanel typeout-window)))
 
 (defun nslog-condition (c)
@@ -287,5 +287,5 @@
 (defun create-paragraph-style (font line-break-mode)
   (let* ((p (make-instance 'ns:ns-mutable-paragraph-style))
-	 (charwidth (fround (ns:ns-size-width (#/maximumAdvancement font)))))
+	 (charwidth (fround (nth-value 1 (size-of-char-in-font font)))))
     (#/setLineBreakMode: p
                          (ecase line-break-mode
@@ -342,4 +342,11 @@
   ;; Make w the "key" and frontmost window.  Make it visible, if need be.
   (#/makeKeyAndOrderFront: w nil))
+
+(defun set-window-title (window title)
+  (#/setTitle: window (if title
+                        (if (typep title 'ns:ns-string)
+                          title
+                          (%make-nsstring title))
+                        #@"") ))
 
 (defun new-cocoa-window (&key
@@ -382,5 +389,5 @@
             auto-display)
       (when activate (activate-window w))
-      (when title (#/setTitle: w (%make-nsstring title)))
+      (when title (set-window-title w title))
       w)))
 
