• 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: Michael Heinz <email@hidden>
  • Date: Fri, 3 Jun 2005 17:58:25 -0400


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

References: 
 >Bug in NSImageView / NSPDFImageRep in Tiger? (From: Michael Heinz <email@hidden>)
 >Re: Bug in NSImageView / NSPDFImageRep in Tiger? (From: Michael Heinz <email@hidden>)

  • Prev by Date: Re: Cocoa NSTextView in Carbon
  • Next by Date: Re: CoreData: Using willSave to update timestamps causes hang?
  • Previous by thread: Re: Bug in NSImageView / NSPDFImageRep in Tiger?
  • Next by thread: completePathIntoString doesn't work with unicode paths??
  • Index(es):
    • Date
    • Thread