• 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
(NSURLDownload)The control never reaches downloadDidFinish:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(NSURLDownload)The control never reaches downloadDidFinish:


  • Subject: (NSURLDownload)The control never reaches downloadDidFinish:
  • From: deepak gopal <email@hidden>
  • Date: Fri, 28 Sep 2007 00:18:11 +0100 (BST)

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.

What should I do?

Thank you
DG

code:
-----------------------------------------------
 NSURLRequest *request;
      request= [NSURLRequest requestWithURL:[NSURL
URLWithString:breakPath]

cachePolicy:NSURLRequestReloadIgnoringCacheData
                            timeoutInterval:60.0];
 NSURLDownload *download = [[NSURLDownload alloc]
initWithRequest:request

       delegate:self];
      [download autorelease];

      // assigning the complete path to the
destination
      NSString *destination =
        [garage_
stringByAppendingString:kNewBreakPath];

      if (download) {
        // This will go and download
        [download setDestination:destination
allowOverwrite:YES];
      }

------------------------------

- (void)downloadDidFinish:(NSURLDownload *)download {

  NSString *breakPath = [framePath_ stringValue];
  breakPath = [breakPath
stringByTrimmingCharactersInSet:
                   [NSCharacterSet
whitespaceAndNewlineCharacterSet]];

  NSString *presentDestination =
    [garage_ stringByAppendingString:kNewBreakPath];

  NSString *finalDestination =
    [[garage_ stringByAppendingString:kNewBreakPath]
      stringByAppendingPathExtension:[breakPath
pathExtension]];

  NSFileManager *fileManager = [NSFileManager
defaultManager];
  [fileManager movePath:presentDestination
toPath:finalDestination handler:nil];

  // this will unarchive the zipped/dmg file
downloaded.
  [self unarchiveDownloadedFile:finalDestination];

}





      Why delete messages? Unlimited storage is just a click away. 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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: (NSURLDownload)The control never reaches downloadDidFinish:
      • From: Scott Anguish <email@hidden>
    • Re: (NSURLDownload)The control never reaches downloadDidFinish:
      • From: Nick Zitzmann <email@hidden>
    • Re: (NSURLDownload)The control never reaches downloadDidFinish: (readable code)
      • From: deepak gopal <email@hidden>
  • Prev by Date: Re: creating a cocoa nsapp event polling callback
  • Next by Date: Re: (NSURLDownload)The control never reaches downloadDidFinish: (readable code)
  • Previous by thread: NSView receives twice and more "mouseEntered" when window show&hide
  • Next by thread: Re: (NSURLDownload)The control never reaches downloadDidFinish: (readable code)
  • Index(es):
    • Date
    • Thread