• 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: Auto-opening a Drawer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-opening a Drawer


  • Subject: Re: Auto-opening a Drawer
  • From: Peter Ammon <email@hidden>
  • Date: Thu, 12 Jul 2001 21:39:00 -0700

On Thursday, July 12, 2001, at 01:35 PM, Charles Jolley wrote:

Hello Cocoa Afscinandos:

I know this is simple, but I can't seem to get it to work. I have an NSDrawer attached to a window that I want to have open automatically when the window is created. I am using NSDocument and the default NSWindowController instances.

I have tried sending [(NSDrawer instance) open] in windowControllerDidLoadNib: in NSDocument and awakeFromNib: in NSDocument. The result is that the NSDrawer thinks it is open, but does not actually display itself.

Where do I put this call?


The solution I use is to just create a timer in my awakeFromNib method. I'm sure you could put it lots of other places.

[NSTimer scheduledTimerWithTimeInterval:0
target:myDrawer
selector:@selector(open:)
userInfo:nil
repeats:NO];

Hope this helps.

-Peter


  • Follow-Ups:
    • Re: Auto-opening a Drawer
      • From: Charles Jolley <email@hidden>
References: 
 >Auto-opening a Drawer (From: Charles Jolley <email@hidden>)

  • Prev by Date: Re: Singleton instances and multithreading
  • Next by Date: Re: Auto-opening a Drawer
  • Previous by thread: Re: Auto-opening a Drawer
  • Next by thread: Re: Auto-opening a Drawer
  • Index(es):
    • Date
    • Thread