, 2012 3:33 PM
Subject: NSData DataWithContentsOfURL within a protocol handler
Hello, I was callingNSData *data = [NSData DataWithContentsOfURL:url
within the -startLoading of custom protocol handler, which worked fine for
10.5 through 10.7, but in 10.8, for some reason the call
Hi,
Fritz Anderson is right. We can only agree.
And recently, they made following Jens Alfke's advice incredibly easy.
Just post a block to one of the available dispatch queues (not the one running
on your main thread thought) and let it run its curse.
Jean
On 6 sept. 2012, at 16:36, Fritz
No, actually I've completely missed that it was answered. Thank you.
Unfortunatelly, the requester is expecting a return data, error or a
redirect. And until the api can be respeced, the sync response has to stay
in. It isn't that it needs to load from network every request, but some
volotile
if you meant using the grand central dispatch, i think that only became
available in 10.6, I need to support this for 10.5
On Thu, Sep 6, 2012 at 11:25 AM, Dan S danc...@rebelbase.com wrote:
No, actually I've completely missed that it was answered. Thank you.
Unfortunatelly, the requester
On Sep 6, 2012, at 11:25 AM, Dan S danc...@rebelbase.com wrote:
I will try to offload the server access to a different thread (though I
still need to block the protocol thread because I still have to return the
correct data for the current call).
No — as I said before, you should _never_
doh! I've been treating -startLoading as a sync routine that must return a
final result to the caller, and just now realized that I can return from
the routine without completing the request, while the caller will be kept
blocked on that request untill I respond with URLProtocolDidFinishLoading
hehe, yes thank you, I was definatelly treating -startLoading it as the end
all call. So, following your suggestion, to avoid
calling URLProtocolDidFinishLoading from the thread, what would be
preferable for calling it from main thread? performSelectorOnMainthread or
listening to
On Sep 6, 2012, at 1:21 PM, Dan S danc...@rebelbase.com wrote:
I can return from
the routine without completing the request, while the caller will be kept
blocked on that request untill I respond with URLProtocolDidFinishLoading
Well, the caller probably won’t be blocked, since it should be
Yes, I meant GCD. Sorry I missed the part where you told us about supporting
10.5 in your original message.
On 6 sept. 2012, at 20:55, Dan S wrote:
if you meant using the grand central dispatch, i think that only became
available in 10.6, I need to support this for 10.5
On Thu, Sep 6,
Hello, is there a recomendation of a better list for this question ?
- Original Message -
From: danchik danc...@rebelbase.com
To: cocoa-dev-boun...@lists.apple.com
Sent: Thursday, August 02, 2012 3:33 PM
Subject: NSData DataWithContentsOfURL within a protocol handler
Hello, I
Hello, I was callingNSData *data = [NSData DataWithContentsOfURL:url
within the -startLoading of custom protocol handler, which worked fine for
10.5 through 10.7, but in 10.8, for some reason the call timesout with
unknown error (256)
Seems that in 10.8 any calls I make to pull the content
On Aug 29, 2012, at 12:42 PM, danchik danc...@rebelbase.com wrote:
Seems like it is waiting for me to return before it will process the
command, is there a way I can make a syncronouse url content pull from
within the -startLoading protocol handler?
Don't do that. Never block the URL-loading
12 matches
Mail list logo