Re: What should we do if file-opening takes a long time?

2017-01-14 Thread Daryle Walker
> On Dec 31, 2016, at 9:03 PM, Charles Srstka wrote: > >> On Dec 31, 2016, at 7:35 PM, Graham Cox > > wrote: >> >> NSProgress is thread safe and might be useful for this. > > One thing to be careful about when using NSProgress with threads is not to > bind direc

Re: What should we do if file-opening takes a long time?

2016-12-31 Thread Charles Srstka
> On Dec 31, 2016, at 7:35 PM, Graham Cox wrote: > > NSProgress is thread safe and might be useful for this. One thing to be careful about when using NSProgress with threads is not to bind directly to it from your UI elements, since the updates will come in on the same thread the changes were

Re: What should we do if file-opening takes a long time?

2016-12-31 Thread Graham Cox
NSDocument will open it on a background thread if you implement +canConcurrentlyReadDocumentsOfType: to return YES for that file type. All of the data is read in and the model prepared before any user interface (e.g. the document window) is created. If there’s a failure you’ll see an error alert

Re: What should we do if file-opening takes a long time?

2016-12-31 Thread Charles Srstka
> On Dec 31, 2016, at 1:06 PM, Jens Alfke wrote: > >> On Dec 31, 2016, at 12:52 AM, Daryle Walker > > wrote: >> >> Let’s assume we’re using a NSDocument-based application. If we’re opening a >> big file, like a gigabyte or more, does the system code automatically show a

Re: What should we do if file-opening takes a long time?

2016-12-31 Thread Jens Alfke
> On Dec 31, 2016, at 12:52 AM, Daryle Walker wrote: > > Let’s assume we’re using a NSDocument-based application. If we’re opening a > big file, like a gigabyte or more, does the system code automatically show a > progress bar dialog? Or does the user look at a whole bunch of nothing (i.e.

What should we do if file-opening takes a long time?

2016-12-31 Thread Daryle Walker
Let’s assume we’re using a NSDocument-based application. If we’re opening a big file, like a gigabyte or more, does the system code automatically show a progress bar dialog? Or does the user look at a whole bunch of nothing (i.e. wondering if the app locked up)? If the latter, I guess we woul