• 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: Bug in NSImageView / NSPDFImageRep in Tiger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Bug in NSImageView / NSPDFImageRep in Tiger?
      • From: Troy Stephens <email@hidden>
  • Prev by Date: Re: Newbie: Advice needed on "XML App"
  • Next by Date: Re: Newbie: Advice needed on "XML App"
  • Previous by thread: addObserver and multiple registrations
  • Next by thread: Re: Bug in NSImageView / NSPDFImageRep in Tiger?
  • Index(es):
    • Date
    • Thread