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

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.
  • Follow-Ups:
    • Re: Closing Drawers
      • From: Thomas Lachand-Robert <email@hidden>
    • Re: Closing Drawers
      • From: Markus Hitter <email@hidden>
    • Re: Closing Drawers
      • From: David Vierra <email@hidden>
  • Prev by Date: Re: encodeWithCoder for a BOOL?
  • Next by Date: Recognising multiple selection dropped on app icon
  • Previous by thread: Re: Scripting, OSA style
  • Next by thread: Re: Closing Drawers
  • Index(es):
    • Date
    • Thread