Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (NSURLDownload)The control never reaches downloadDidFinish:



This may sound rubbish, but the fact is that the code
runs fine when I build and run it the second time, but
the first run always fails.
I don't understand why.
I tried removing [download autorelease] and running
it, but it didn't work. So I reverted back to the
original code.

Deepak
--- Scott Anguish <email@hidden> wrote:

> 
> On Sep 27, 2007, at 7:18 PM, deepak gopal wrote:
> 
> > Hi
> >
> > I am downloading a file from the server.
> > Its a zip file and I need to uarchive it.
> > I have the code in place (copied below) and I
> > unarchive the file in downloadDidFinish:
> > But the control doesn't seem to reach
> > downloadDidFinish:
> > There is no syntax error.
> >
> 
> 	I'm just guessing here.. but
> 
> 
> > cachePolicy:NSURLRequestReloadIgnoringCacheData
> >                            timeoutInterval:60.0];
> > NSURLDownload *download = [[NSURLDownload alloc]
> > initWithRequest:request
> >
> >       delegate:self];
> >      [download autorelease];
> >
> 
> you're autoreleasing download. that means that it
> can disappear as  
> soon as the method finishes, if not at the start of
> the next runloop.   
> and NSURLDownload requires a runloop running to
> work.
> 
> So, my guess is that the object is being released
> and things are never  
> finishing as a result.
> 
> 



      Get the freedom to save as many mails as you wish. To know how, go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: (NSURLDownload)The control never reaches downloadDidFinish: (From: Scott Anguish <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.