• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
      • From: Scott Anguish <email@hidden>
References: 
 >Is it possible to make dictionaryWithContentsOfURL non-blocking? (From: Adam Holt <email@hidden>)

  • Prev by Date: Is it possible to make dictionaryWithContentsOfURL non-blocking?
  • Next by Date: Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
  • Previous by thread: Is it possible to make dictionaryWithContentsOfURL non-blocking?
  • Next by thread: Re: Is it possible to make dictionaryWithContentsOfURL non-blocking?
  • Index(es):
    • Date
    • Thread