• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
if an NSWindow is a drawer, how can I find the NSDrawer instance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: if an NSWindow is a drawer, how can I find the NSDrawer instance?
      • From: Andy Lee <email@hidden>
  • Prev by Date: AddressBook-like TextFields?
  • Next by Date: bindings question
  • Previous by thread: Re: AddressBook-like TextFields?
  • Next by thread: Re: if an NSWindow is a drawer, how can I find the NSDrawer instance?
  • Index(es):
    • Date
    • Thread