Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
- Subject: Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
- From: Lee Morgan <email@hidden>
- Date: Mon, 4 Jul 2005 04:18:26 -0400
The easiest way is to create a NSURL instance and use NSURL's
loadResourceDataNotifyingClient:usingCache:
Then in URLResourceDidFinishLoading: create your dictionary with the
NSURL (sender).
- Lee
On Jul 4, 2005, at 4:11 AM, Adam Holt wrote:
I'm calling dictionaryWithContentsOfURL but experience modal
behaviour if
there are any networking problems that prevent this from completing
quickly.
I assume the same problem applies to other *WithContentsOfURL
functions.
Let me explain the context and symptoms:
2 seconds after my awakeFromNib is invoked I call
dictionaryWithContentsOfURL which is used to check to see if the
current
version of the software is up to date and what the description of
the new
version is, etc. If there are network problems (or the remote
server is
taking a long time to respond) then my app will hang and the
spinning pizza
wheel takes over.
Is there a way that I can prevent dictionaryWithContentsOfURL from
taking
over the show, to allow the rest of the application to function
during a
long retrieval?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden