• 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: Dismissing Open dlog before doc actually opens
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dismissing Open dlog before doc actually opens


  • Subject: Re: Dismissing Open dlog before doc actually opens
  • From: Graham Cox <email@hidden>
  • Date: Wed, 14 Aug 2013 18:04:11 +0200


On 14/08/2013, at 5:52 PM, Graham Cox <email@hidden> wrote:

> The only other thing you might try is running the run loop a few cycles in your completion handler so that the orderOut: is processed. It might have unexpected side-effects though, which might also reveal a very good reason why it's not done by default. For example, this works to close the panel immediately:


This also does the trick and may well be safer, since it only runs the loop in the modal panel mode, and just the once, according to docs:

			[p orderOut:self];

			[[NSRunLoop mainRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];


By the way, about the 'orderOut', 'orderFront' methods - I tend to think of these in terms of 'order' as in a food order in a restaurant, not an order that is to be immediately obeyed. The food takes a little time to arrive - so does the actual visible effect of these methods, and it's the run loop that doing the cooking in the kitchen.

--Graham




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Prev by Date: Re: Dismissing Open dlog before doc actually opens
  • Next by Date: Re: Dismissing Open dlog before doc actually opens
  • Previous by thread: Re: Dismissing Open dlog before doc actually opens
  • Next by thread: Re: Dismissing Open dlog before doc actually opens
  • Index(es):
    • Date
    • Thread