Re: Closing Drawers
Re: Closing Drawers
- Subject: Re: Closing Drawers
- From: Thomas Lachand-Robert <email@hidden>
- Date: Mon, 8 Apr 2002 13:45:43 +0200
Le lundi 8 avril 2002, ` 09:49 , The Amazing Llama a icrit :
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.
Sure. it can work only if your app is multi-threaded, and the loop in
another thread. Here you are just blocking. Remember that non-immediate UI
actions (animations, in particular) takes places in the main run loop, so
if you don't return to it, nothing happens.
Use delegate's "drawerDidClose" to do that.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
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.