• 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: stringWithContentsOfURL doesn't work sometimes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stringWithContentsOfURL doesn't work sometimes


  • Subject: Re: stringWithContentsOfURL doesn't work sometimes
  • From: Lorenzo <email@hidden>
  • Date: Wed, 13 Jul 2005 16:35:58 +0200

Ok, now it's more clear.
I already used NSURLConnection successfully. Only I wanted something
simplier and synchronous. I know how to make it in sync. Just split the code
in 2 and write the second part of the code in the callBack method invoked by
connectionDidFinishLoading:

Thank you.

It is still a mistery why when the screensaver is in /Library and not in
(Home)/Library, it works. :-O
Anyway, forget. I skip it.



Best Regards
--
Lorenzo
email: email@hidden

> From: Nicko van Someren <email@hidden>
> Date: Wed, 13 Jul 2005 12:38:46 +0100
> To: j o a r <email@hidden>
> Cc: Lorenzo <email@hidden>, Cocoa Dev Dev <email@hidden>
> Subject: Re: stringWithContentsOfURL doesn't work sometimes
>
> On 13 Jul 2005, at 12:16, j o a r wrote:
>
>> On 13 jul 2005, at 12.48, Lorenzo wrote:
>>
>>> I meant that the API stringWithContentsOfURL cannot get the string
>>> and my
>>> screensaver freezes just there. Nothing to do with resources.
>>
>> I think that you should basically never use the "initWithURL:"
>> methods. In the vast majority of cases you want something that's
>> asynchronous and that have better error reporting. Have a look at
>> NSURLConnection for example, it's easy to use and powerful enough
>> for most things you would want to do.
>
> Also all the initWith(ContentsOf)URL: methods which ultimately use
> the NSData method of that name (which is most of them) inherit the
> still unfixed bug that if the web server supports content compression
> in transit then you end up with completely the wrong data.  This is
> because the request sent to the server explicitly indicates that the
> client will accept gzip transport compression but the client then
> ignores the server telling it that compression was used, you are
> handed back the compressed transport stream rather than the real
> content.
>
>    Nicko
>

 _______________________________________________
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

References: 
 >Re: stringWithContentsOfURL doesn't work sometimes (From: Nicko van Someren <email@hidden>)

  • Prev by Date: How to get container when overriding NSCreateCommand
  • Next by Date: Re: splitter and views resize problems
  • Previous by thread: Re: stringWithContentsOfURL doesn't work sometimes
  • Next by thread: FilterPredicate binding not automatically updated?
  • Index(es):
    • Date
    • Thread