• 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
Re: Avoiding UI hangs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoiding UI hangs


  • Subject: Re: Avoiding UI hangs
  • From: Dominik Pich <email@hidden>
  • Date: Sun, 4 Sep 2005 11:50:12 +0200

start a new NSThread for the upload - set the frist as 'delegate'.

On Sep 4, 2005, at 11:43 AM, Sanri Parov wrote:

On Sun, 4 Sep 2005 11:19:52 +0200, Sanri Parov wrote:

Hi everybody,

I'm doing an application for a customer of mine which requires the
capability to upload a file to a certain server.


I add some more informations, as far I've seen I've not explained my self quite well. The upload button calls send: selector

- (IBAction)send:(id)sender
{

    NSString *fileToUpload;
    fileToUpload = [NSString
stringWithFormat:@"%@/%@/%@.mp3",[g_finPrincipale
title],[g_lingueTitolo stringValue],[g_lingueTitolo stringValue]];

    // Executing upload
    NSString *urlString = [NSString
stringWithFormat:@"ftp://%@:%@@%@/%@%@";,
WEBUSER_DEF,WEBPASSWD_DEF,WEBSITE_DEF,WEBDIR_DEF,[fileToUpload
lastPathComponent]];
    NSURL *url = [NSURL URLWithString:urlString];
    CURLHandle *urlHandle = [[CURLHandle alloc] initWithURL:url
cached:NO] ;
    [urlHandle setPutFile:fileToUpload];
    [self startUpload:urlHandle];
}


-(void)startUpload:(CURLHandle *)handle { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [handle prepareAndPerformCurl]; if (![[handle curlError] isEqualToString:@""]) { NSBeginAlertSheet(@"Upload error",@"Ok",nil,nil,g_finPrincipale,self,nil,nil,nil,[NSString stringWithFormat:@"Upload failed\nHere's the error generated by CURL:\n\n %@",[handle curlError]]); return; } [pool release]; return; }

--
Sanri Parov
 _______________________________________________
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



_______________________________________________ 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
  • Follow-Ups:
    • Re: Avoiding UI hangs
      • From: Sanri Parov <email@hidden>
References: 
 >Avoiding UI hangs (From: Sanri Parov <email@hidden>)
 >Re: Avoiding UI hangs (From: Sanri Parov <email@hidden>)

  • Prev by Date: Re: Avoiding UI hangs
  • Next by Date: Re: Core Data : where are the docs ?
  • Previous by thread: Re: Avoiding UI hangs
  • Next by thread: Re: Avoiding UI hangs
  • Index(es):
    • Date
    • Thread