• 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: dataWithContentsOfURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dataWithContentsOfURL


  • Subject: Re: dataWithContentsOfURL
  • From: Angela Brett <email@hidden>
  • Date: Fri, 9 Nov 2001 12:52:34 +1300

Hi

You have to implement
- (void)URLResourceDidFinishLoading:(NSURL *)sender
{
// 'sender' is the NSURL object you used for starting donwload
// use sender to use your data. For instance:
NSDictionary * tDict = [NSDictionary dictionaryWithContentsOfURL:sender];
// if the data you got is a dictionary, or any xxxWithContentsOfURL message of your class of interest.
}

I've just realised that's actually incorrect... it needs to be:
NSDictionary * tDict = [sender resourceDataUsingCache:YES];
or else the data will be loaded all over again in the dictionaryWithContentsOfURL:sender.


References: 
 >Re: dataWithContentsOfURL (From: Marc Laffitte <email@hidden>)

  • Prev by Date: Re: control-clicking an NSSlider
  • Next by Date: More Authorization.h questions...
  • Previous by thread: Re: dataWithContentsOfURL
  • Next by thread: Re: Catching key events
  • Index(es):
    • Date
    • Thread