NSURLDownloadを使用してURLをダウンロードしようとしていますが、ダウンロードが開始されません。続行する前に、私はこれにGNUStepを使用していると言わなければなりません。
私のプロジェクトの概要は次のとおりです。
MyClass.h:
@interface MyClass : Object {
}
-(void)downloadDidBegin:(NSURLDownload*)download;
-(void)downloadDidFinish:(NSURLDownload*)download;
@end
Main.m
int main()
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSLog(@"creating url");
NSURL* url = [[[NSURL alloc] initWithString:@"http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/NSURLRequest_Class.pdf"] autorelease];
NSLog(@"creating url request");
NSURLRequest* url_request = [[[NSURLRequest alloc] initWithURL:url] autorelease];
NSLog(@"creating MyClass instance");
MyClass* my_class = [[MyClass alloc] init];
NSLog(@"creating url download");
NSURLDownload* url_download = [[[NSURLDownload alloc] initWithRequest:url_request
delegate:my_class] autorelease];
[pool drain];
}
MyClassの両方の関数にNSLogがあり、どちらもヒットしていません。ダウンロードを開始するにはどうすればよいですか?それともこれはGNUStepの問題ですか?