Dear list,

I have an app which has a main split view. In the left panel there is a text 
editor (NSTextView), in the right panel there is a PDFView. I find that when 
typing in the text view, the -drawPage: method of the PDFView is called about 
once every 200ms but only if the PDFView is displaying a (large) graphic. I 
have this method overridden because I do some additional drawing. The problem 
is that if the drawing of the PDF page is heavy (due to the complex graphic), 
then the responsiveness of the text view becomes noticeably poorer. In fact the 
responsiveness of the whole app is affected.

The strange thing is, that this behaviour is only triggered if I have selected 
text in the PDF at least once since loading the PDF document. If text has never 
been selected, then the -drawPage: is called only a couple of times at the 
beginning or when scrolling (as expected), but not when typing in the text view 
or doing other non-pdf related actions. Clearing the selected text (by just 
clicking somewhere on the PDFView) doesn't rectify the problem - it persists 
until the app is restarted.

Can anyone explain to me why the -drawPage: method of PDFView is being called 
when I'm typing in the text view? I'm pretty sure I'm not calling it anywhere 
in my app.  I've also checked that -setNeedsDisplay: is not being called on the 
PDFView.

Could this be a PDFKit bug?

Best wishes,

Martin


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to