if an NSWindow is a drawer, how can I find the NSDrawer instance?
if an NSWindow is a drawer, how can I find the NSDrawer instance?
- Subject: if an NSWindow is a drawer, how can I find the NSDrawer instance?
- From: Mike Morton <email@hidden>
- Date: Fri, 20 May 2005 15:08:17 -0400
All --
I have an NSWindow which is showing the contents of a drawer, and I want to find the NSDrawer instance for it. How can I do this? (I don't want to check for undocumented classes like NSDrawerWindow.)
I thought I'd be able to do it by asking for the window's
parentWindow, asking the parent window for
drawers, then walking the drawers to find one with a content view whose window is the window I started with.
This doesn't work because the window which runs the drawer doesn't have a parent window. (I haven't tried this in a small testbed app, so I'm not 100% sure that most drawers work this way -- perhaps I've broken something.)
Thanks in advance,
-- Mike
P.S. Why do I want to do all this? Running a modal sheet blocks clicks in the sheet's window,
but in not a sheet's window's drawer. So I thought I'd override NSWindow's
sendEvent: to check whether a click is in a drawer whose parent is a sheet...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden