Re: Closing Drawers
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.