Re: stringWithContentsOfURL doesn't work sometimes
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