Re: Getting mouse clicks when the main loop is busy
Re: Getting mouse clicks when the main loop is busy
- Subject: Re: Getting mouse clicks when the main loop is busy
- From: Charles Srstka <email@hidden>
- Date: Sun, 10 Nov 2013 17:57:37 -0600
On Nov 10, 2013, at 3:14 PM, Kyle Sluder <email@hidden> wrote:
>> On Nov 10, 2013, at 1:06 PM, Charles Srstka <email@hidden> wrote:
>>
>> What I usually do is just have NSDocument's readFromData/URL/fileWrapper/etc method not actually do much, and then in windowControllerDidLoadNib: put up a progress bar, and start the loading in a background thread. You can either do this by hiding the main window and displaying the progress bar in a separate window, or by showing the empty document window and putting up a sheet with the progress bar in it while the document window is populated with data.
>
> This sounds like a violation of file coordination and NSDocument file-activity rules. You really ought to load your document contents in the initializer.
>
> --Kyle Sluder
My app reads complex files that may take up to two minutes to completely load. Beachballing while waiting for it is really not an option.
Fortunately I don't bother with the autosave stuff (or with saving at all, actually; the app is a viewer only).
Charles
_______________________________________________
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