[p orderOut:self];
   // Let the run loop finish so the UI updates - button finishes tracking, 
window updates, etc
   [self performSelector:@selector(documentOpeningStuff:) withObject:p 
afterDelay:0];


----- Original Message -----
From: "Steve Mills" <smi...@makemusic.com>
To: "Kyle Sluder" <k...@ksluder.com>
Cc: "Cocoa dev" <cocoa-dev@lists.apple.com>
Sent: Wednesday, August 14, 2013 7:03:59 AM
Subject: Re: Dismissing Open dlog before doc actually opens

On Aug 13, 2013, at 18:56:20, Kyle Sluder <k...@ksluder.com> wrote:

> And for a long time you used to have to keep the mouse button held down
> while navigating a menu hierarchy. Times change.

Let's focus on the question, shall we?

> The fact that -orderOut: didn't dismiss the open panel points at a
> deeper issue with your code that's probably worth investigating.

There most certainly is not a deeper issue with my code. Run this and you'll 
see for yourself:

-(IBAction) openDocument:(id)sender
{
        NSOpenPanel*                    p = [NSOpenPanel openPanel];
        
        if([p runModal] == NSFileHandlingPanelOKButton) {
                [p orderOut:self];
                // Simulate code that takes 5 seconds to open a document:
                sleep(5);
        }
}

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157




_______________________________________________

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/lrucker%40vmware.com

This email sent to lruc...@vmware.com
_______________________________________________

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

Reply via email to