Closing Drawers
Closing Drawers
- Subject: Closing Drawers
- From: The Amazing Llama <email@hidden>
- Date: Mon, 8 Apr 2002 00:49:07 -0700
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.