TextMate-style CAPI drawer
Folks, Is there an easy way to implement drawers using CAPI? I'm looking for something like the file and project drawer in TextMate. Thanks, Joel -- http://wagerlabs.com
Folks, Is there an easy way to implement drawers using CAPI? I'm looking for something like the file and project drawer in TextMate. Thanks, Joel -- http://wagerlabs.com
Am 03.10.2007 um 23:37 schrieb Joel Reymont:
>
> Folks,
>
> Is there an easy way to implement drawers using CAPI? I'm looking
> for something like the file and project drawer in TextMate.
>
>
I've experimented with this quite some time with no real results.
I tried (based on some ObjC code I found):
(defun setup-left-drawer (parent-window)
(let* ((content-size (vector 100 100))
(drawer (invoke (invoke "NSDrawer" "alloc")
"initWithContentSize:preferredEdge:" content-size 1)))
(invoke drawer "setParentWindow:" parent-window)
(invoke drawer "setMinContentSize:" content-size)
(invoke drawer "setMaxContentSize:" content-size)
drawer))
Then I opened a Listener and selected Window->Interface->Listen to
get the listener interface object.
CAPI-INTERNALS:REPRESENTATION gave me the Cocoa Window representation
of the listener and OBJC:OBJC-OBJECT-POINTER the ObjC pointer to it.
I called the SETUP-LEFT-DRAWER from above on this ObjC pointer. To
open the drawer I tried
(invoke *drawer* "openOnEdge:" 1)
within an CAPI:APPLY-IN-PANE-PROCESS on the Listener pane. Nothing
happened... no drawer, no crash... nothing.
Well - perhaps I'm doing something completely wrong with this.
ciao,
Jochen