Re: Dismissing Open dlog before doc actually opens
Re: Dismissing Open dlog before doc actually opens
- Subject: Re: Dismissing Open dlog before doc actually opens
- From: Steve Mills <email@hidden>
- Date: Wed, 14 Aug 2013 13:11:02 -0500
On Aug 14, 2013, at 11:53:41, Bryan Vines <email@hidden>
wrote:
> Using Graham's NSRunLoop solution, it looks like you don't even need to send -orderOut to the panel.
Hmm, most of the time yes. If I go through the dlog quickly, it remains onscreen until the file has been opened. Like if I quickly command-o, type a couple chars to select a file, and return, it will remain. But if I pause a 1/4 second or so before hitting return, it will go away like it should. This is using [[NSRunLoop mainRunLoop] runMode:NSModalPanelRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.5]];
Wait, now it's not working as above. Annoying!
I went back to [[NSRunLoop mainRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; without calling orderOut first. This is working 100% of the time for my tests. I'm not sure how the other version using NSModalPanelRunLoopMode would actually work in this case, because the model loop has already ended before runModal returned.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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