Re: NSDocument's Open File Panel unresponsive when opening large file from disc
Re: NSDocument's Open File Panel unresponsive when opening large file from disc
- Subject: Re: NSDocument's Open File Panel unresponsive when opening large file from disc
- From: Mike Abdullah <email@hidden>
- Date: Wed, 30 Jan 2013 11:41:34 +0000
On 29 Jan 2013, at 16:18, Gilles Celli <email@hidden> wrote:
> I looked a little bit today here with my application, and the term unresponsive for the Open Panel is not appropriate:
> it should be "stays open" when reading /processing the big data file and then the panel closes.
>
> The main processing time is when converting date/time to NSTimeIntervalSince1970, and extracting data values..so a big ASCII data file can have > 500000 lines
>
> Simply put, the Open Panel should be closed, but it stays open until the data file has been processed and the data displayed as a graph.
>
> There should be a way to close NSDocument openPanel but didn't find anything about it…
>
> Any help is as always greatly appreciated :-)
So I ran a quick little test here. Our app already uses asynchronous document opening. I simply whacked in a sleep(5) call to make sure that opening documents takes a long time. With that in place:
1. Bring up the Open Panel (File > Open, no custom code here)
2. Select a document
3. Click Open
4. The panel disappears shortly after
5. After a delay, the document appears
Thus I conclude that if you are seeing the open panel hang around, you're likely doing something wrong to block the main thread.
_______________________________________________
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