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: Markus Spoettl <email@hidden>
- Date: Sun, 10 Nov 2013 14:05:42 +0100
On 11/10/13 1:21 PM, Uli Kusterer wrote:
On 08 Nov 2013, at 20:17, Graham Cox <email@hidden> wrote:
If the file is small and can be read quickly, it really doesn’t make much
difference either way whether it’s threaded or not. But if it’s a large
file, there may be some time (even minutes) between clicking ‘Open’ in the
NSOpenPanel and the document opening its window. During that time, there is
no feedback whatsoever that anything is happening. It acts, for all intents
and purposes, as if the ‘Open’ click was ignored.
Are you saying there’s no way to get the async document loading mechanism to
open the empty document first, then asynchronously load the data into that
window (giving you the opportunity to show partially loaded content or a
progress indicator *inside* the document window)?
That’s what I would expect it to do. Open the document, then call the read
method asynchronously, giving you behaviour as if it was a “revert”,
effectively. I haven’t used the async loading API, but I’d expect there to be
some oddly-named call that gives you such behaviour, or something implicit
you’re doing wrong that keeps your document from appearing?
No, he's doing it right, this is just how the NSDocument architecture works. It
reads the document file content first (asynchronously or synchronously), then
creates the UI for it.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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