On 14/08/2013, at 5:52 PM, Graham Cox <graham....@bigpond.com> 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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com