Index: /trunk/source/cocoa-ide/cocoa-utils.lisp
===================================================================
--- /trunk/source/cocoa-ide/cocoa-utils.lisp	(revision 15029)
+++ /trunk/source/cocoa-ide/cocoa-utils.lisp	(revision 15030)
@@ -158,4 +158,14 @@
   (first-window-satisfying-predicate #'(lambda (w) (typep (#/windowController w) controller-type))))
 
+
+(defun new-listener ()
+  (let ((wptr (execute-in-gui (lambda ()
+                                (declare (special hemlock-listener-document))
+                                (#/newListener: (#/delegate *NSApp*) (%null-ptr))
+                                (let ((doc (#/topListener hemlock-listener-document)))
+                                  (unless (%null-ptr-p doc)
+                                    (#/window (#/lastObject (#/windowControllers doc)))))))))
+    (when wptr (hemlock-view wptr))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
