Re: Running NSURLConnection from within an NSOperation?
Re: Running NSURLConnection from within an NSOperation?
- Subject: Re: Running NSURLConnection from within an NSOperation?
- From: Laurent Daudelin <email@hidden>
- Date: Tue, 9 Feb 2010 14:18:29 -0800
On Feb 9, 2010, at 14:10, Greg Reichow wrote:
>
>> I'm trying to run an NSURLConnection from an NSOperation. Apparently, it won't run. I know that NSURLConnection need a run loop. Does that mean I'll have to setup some kind of NSTime in my NSOperation and then call my run loop at regular intervals?
>
> Try using the synchronous version of NSURLConnection since you are launching it from within a NSOperation already-
>
> + (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse**)response error:(NSError **)error
>
>
> The docs mention that no special run loop configuration is necessary in this case.
>
> Greg
Thanks, Greg!
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org
Logiciels Nemesys Software email@hidden
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden