Re: PDFView drawPage called often after selecting text

2013-01-08 Thread Martin Hewitson
Andy, Kyle, Thank you both for your assistance on this. I've got something working now which doesn't cause the responsiveness issues and even looks visually more pleasant. Here's the solution: - (void) drawPagePost:(PDFPage *)page { [super drawPagePost:page]; if ([[self window]

Re: Printing layer-based view

2013-01-08 Thread David Duncan
On Jan 8, 2013, at 3:34 PM, Graham Cox wrote: > On 09/01/2013, at 2:20 AM, Kyle Sluder wrote: > >> That'll generate huge 72dpi bitmaps rather than a vector representation. > > But it doesn't > > The layers that are CAShapeLayers render as vectors, and no amount of zooming > in Preview sh

Re: Printing layer-based view

2013-01-08 Thread Graham Cox
On 09/01/2013, at 2:20 AM, Kyle Sluder wrote: > That'll generate huge 72dpi bitmaps rather than a vector representation. But it doesn't The layers that are CAShapeLayers render as vectors, and no amount of zooming in Preview shows any pixelation. Other layers, such as CATextLayer, do pi

How to enable the close window button while showing a modal sheet?

2013-01-08 Thread Oleg Krupnov
I don't want to start a HIG flame on this, but just want to know if it's technically possible to enable the close button of a window while showing a modal sheet (NSApp beginSheet:modalForWindow:…) on it? Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: PDFView drawPage called often after selecting text

2013-01-08 Thread Andy Lee
On Jan 8, 2013, at 3:59 AM, Martin Hewitson wrote: > Maybe not. I just didn't know about this, but I will read up on it. However, > as far as my tests show, -drawRect: is never called on PDFView. This seemed really odd, so I checked and it turns out there is a view hierarchy under PDFView. When

Re: PDFView drawPage called often after selecting text

2013-01-08 Thread Kyle Sluder
On Tue, Jan 8, 2013, at 07:58 AM, Andy Lee wrote: > You're already calling setKeyboardFocusRingNeedsDisplayInRect: in > become/resignFirstResponder, which seems like the right place. But I > notice Apple's "Dicey" example project uses NSSetFocusRingStyle > differently than you do. It pushes and pop

Re: PDFView drawPage called often after selecting text

2013-01-08 Thread Andy Lee
On Jan 7, 2013, at 10:02 PM, Martin Hewitson wrote: > Yes, that's right. But doesn't help the problem, unfortunately. The PDFView > is not the first responder when I'm typing, so the 'fault' is triggered when > the PDFView first becomes first responder then the NSSetFocusRingStyle part > of th

Re: Printing layer-based view

2013-01-08 Thread Kyle Sluder
On Jan 8, 2013, at 2:19 AM, Graham Cox wrote: > Wow, thanks that looks like a lot of work (for you, or someone...) > > But I find I can just call -renderInContext on the view's root layer and I > get what I need, apparently. Is there something I'm missing? That'll generate huge 72dpi bitm

[MEET] CocoaHeadsNYC this Thursday, January 10

2013-01-08 Thread Andy Lee
When: Thursday, January 10, 2013, 6:30-8:00 PM, followed by pizza at Patsy's. What: Anton Marini will talk about OpenGL in the context of Quartz Composer plug-ins. As always, we'll have time for questions for the group ("I'm stuck on this bug…") and general show-and-tell ("Check out this debugg

Re: PDFView drawPage called often after selecting text

2013-01-08 Thread Martin Hewitson
On Jan 8, 2013, at 09:21 AM, Kyle Sluder wrote: > On Jan 7, 2013, at 9:16 AM, Martin Hewitson > wrote: > >> >> On 7, Jan, 2013, at 05:52 PM, Kyle Sluder wrote: >> >>> On Jan 7, 2013, at 2:48 AM, Martin Hewitson >>> wrote: >>> Actually, at the risk of having a conversation with myse

Re: Printing layer-based view

2013-01-08 Thread Graham Cox
Wow, thanks that looks like a lot of work (for you, or someone...) But I find I can just call -renderInContext on the view's root layer and I get what I need, apparently. Is there something I'm missing? --Graham On 08/01/2013, at 5:27 PM, Kyle Sluder wrote: > On Mon, Jan 7, 2013,

Re: PDFView drawPage called often after selecting text

2013-01-08 Thread Kyle Sluder
On Jan 7, 2013, at 9:16 AM, Martin Hewitson wrote: > > On 7, Jan, 2013, at 05:52 PM, Kyle Sluder wrote: > >> On Jan 7, 2013, at 2:48 AM, Martin Hewitson >> wrote: >> >>> Actually, at the risk of having a conversation with myself, I've narrowed >>> the issue down to the actions I'm taking w