• 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: Drawer-related problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawer-related problem


  • Subject: Re: Drawer-related problem
  • From: Matt Ridley <email@hidden>
  • Date: Sat, 12 May 2001 03:57:04 +0100

On Saturday, May 12, 2001, at 01:15 am, mmalcolm crawford wrote:

I have a drawer attached to a window. Via my main controller class, I've implemented the applicationShouldTerminateAfterLastWindowClosed method, so that my app quits when the window closes. This works fine, unless the drawer is open at the time. Any ideas what I can do to make sure the app always quits when that window closes, as it did before I added the drawer?

- (void)windowWillClose:(NSNotification *)aNotification
{
NSArray *drawers = [[aNotification object] drawers];
NSEnumerator *enumerator = [drawers objectEnumerator];
NSDrawer *drawer;
while (drawer = [enumerator nextObject])
[drawer close];
}

Hi Malcolm,

Thanks for your reply. The approach you detailed occurred to me, but what I ended up doing was simply using Interface Builder to set the window to "Release on close" (to be sent a release message when it's closed). Since it's my app's only window, and since I've already coded the app to quit when all windows are closed, when it closes then it's always time to quit. The release message gets rid of the drawer at the same time.


Best,
-Matt

--
Matt Ridley
<http://www.mattridley.com/>


References: 
 >Re: Drawer-related problem (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Re: Drawer-related problem
  • Next by Date: NSBezierPath, illustration, 3D bezier shapes
  • Previous by thread: Re: Drawer-related problem
  • Next by thread: Re: simple "canvas" like example?
  • Index(es):
    • Date
    • Thread