Re: Threading - How its done?
Re: Threading - How its done?
- Subject: Re: Threading - How its done?
- From: John Calhoun <email@hidden>
- Date: Mon, 5 May 2008 19:35:17 -0700
On May 5, 2008, at 7:17 PM, Karl von Moller wrote:
-(void)openPDFandCreatePreview:(id)sender
{
//[progressOutlet setUsesThreadedAnimation:YES];
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
[progressOutlet startAnimation:nil];
NSPDFImageRep *pdfRep;
NSImage *pdfImage;
pdfRep = [NSPDFImageRep imageRepWithContentsOfFile:
finalStringOutput];
pdfImage = [[[NSImage alloc] init] autorelease];
[pdfImage addRepresentation: pdfRep];
[imageWellOutlet setImage:pdfImage];
PDFDocument *pdfDoc;
pdfDoc = [[[PDFDocument alloc] initWithURL: [NSURL fileURLWithPath:
finalStringOutput]] autorelease];
[pdfOutlet setDocument:pdfDoc];
[progressOutlet stopAnimation:nil];
[pool release];
return;
}
If there is another way to load a PDF into a PDF view using
Multithreading techniques that is easier to understand please let me
know! Any help with this would be much appreciated.
I'm not exactly following the above....
Why the mix of NSImage and PDFDocument? You seem to be creating the
PDF twice (at least the first page).
Are mutliple threads trying to share a single PDFView? I know that wll
break....
John Calhoun—_______________________________________________
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