• 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
Re: 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]

Re: if an NSWindow is a drawer, how can I find the NSDrawer instance?


  • Subject: Re: if an NSWindow is a drawer, how can I find the NSDrawer instance?
  • From: Mike Morton <email@hidden>
  • Date: Mon, 23 May 2005 16:31:44 -0400

Andy --

On May 20, 2005, at 3:08 PM, Mike Morton wrote:
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.

How about if you start the search one level higher -- walk NSApp's -windows to find the one whose -drawers include one whose display window (i.e., its -contentView's window) is the window you started with? It means traversing a larger data structure, but maybe not prohibitively large?

Works very nicely; thanks!

-- Mike

_______________________________________________
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


References: 
 >if an NSWindow is a drawer, how can I find the NSDrawer instance? (From: Mike Morton <email@hidden>)
 >Re: if an NSWindow is a drawer, how can I find the NSDrawer instance? (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: ~/library/application support/myapp directory creation
  • Next by Date: Re: Very simple - UNIX like - filename expansion?
  • Previous by thread: Re: if an NSWindow is a drawer, how can I find the NSDrawer instance?
  • Next by thread: bindings question
  • Index(es):
    • Date
    • Thread