Re: Bug in NSImageView / NSPDFImageRep in Tiger?
Re: Bug in NSImageView / NSPDFImageRep in Tiger?
- Subject: Re: Bug in NSImageView / NSPDFImageRep in Tiger?
- From: Buddy Kurz <email@hidden>
- Date: Mon, 12 Sep 2005 08:49:47 -0700
I'm having this problem as well - is there some solution?
On Jun 3, 2005, at 2:58 PM, Michael Heinz wrote:
I have an app that functions correctly in 10.3.x but has an odd
behavior in 10.4.x.
The app processes multi-page PDF files and has an NSImageView to
preview them. This view consistently displays the current page in
10.3.x, but in 10.4 it will only display the first page. What is
weird is that if I set the current page to some number (say, 10)
and resize the window, the correct page will be displayed - but if
I then go to the next page (say, 11) the NSImageView displays the
first page again!?!
Here's how I'm doing the image view. In the code fragment,
"documentRep" is the NSPDFImageRep, "document" is the NSImage it
belongs to and "myView" is the NSImageView.
[myView setImage:document];
.
.
.
[documentRep setCurrentPage:pageNumber];
[document recache];
As I mention, this behaves as expected in 10.3.x. I have also tried
the following approach:
[document release];
[documentRep setCurrentPage:pageNumber];
[documentRep recache];
document = [[NSImage alloc] init];
[document addRepresentation:documentRep];
[myView setImage:document];
This code behaves the same as the first snippet.
I've googled around and everything I've found says that these
methods should work. Am I missing something? The fact that it
displays the correct page during/after a resize but then jumps back
to the first page the next time I call setCurrentPage is just weird...
If anyone wants to see the effect, you can download the app at
http://prdownloads.sourceforge.net/pdf2psp/PDF2PSP.app.sitx?download
_______________________________________________
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