• 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: Closing Drawers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closing Drawers


  • Subject: Re: Closing Drawers
  • From: David Vierra <email@hidden>
  • Date: Sun, 7 Apr 2002 23:06:05 -1000

I have encountered this problem before. Just implement drawerDidClose in the drawer's delegate, or respond to the NSDrawerDidCloseNotification. Since this message is sent each time the drawer is closed and not just when you want to reopen it, try setting a member variable before closing and having your delegate method check the variable to see if it needs to reopen the drawer.



On Sunday, April 7, 2002, at 09:49 PM, The Amazing Llama wrote:

I want to do some code like this:

[ drawer close ];
[ self changeContentsOf:drawer ];
[ drawer open ];

But the drawer never actually closes in the UI: the contents just change. close is called, but it doesn't have enough time to actualy close before I open it again, so it just redisplays.

So I attempted to modify my code, as so:

[ drawer close ];
while ( [ drawer state ] == NSDrawerClosingState )
{
//do nothing. just wait for it to close.
}
[ self changeContentsOf:drawer ];
[ drawer open ];

to make sure that the drawer closes before we do the update. But I just get caught in an infinite loop in that while loop. It seems that the drawer doesn't proceed with closing while I'm monitoring it.

So how do I make sure that the drawer closes before I open it up again? I looked for a -blockingClose but there isn't one.

Any ideas?

-The Amazing Llama <tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Closing Drawers (From: The Amazing Llama <email@hidden>)

  • Prev by Date: calling carbon functions from Cocoa
  • Next by Date: Re: Closing Drawers
  • Previous by thread: Closing Drawers
  • Next by thread: Re: Closing Drawers
  • Index(es):
    • Date
    • Thread