Re: Breaking on nil context

2013-02-12 Thread Joar Wingfors
Try breaking on CGPostError(). Joar On 11 feb 2013, at 23:20, Graham Cox graham@bigpond.com wrote: I'm getting this logged at times: Error: CGContextSetStrokeColorWithColor: invalid context 0x0 This is despite NSAssert-ing every function I pass a context to for nil. What can I

Re: Breaking on nil context

2013-02-12 Thread Sean McBride
On Tue, 12 Feb 2013 18:20:15 +1100, Graham Cox said: I'm getting this logged at times: Error: CGContextSetStrokeColorWithColor: invalid context 0x0 This is despite NSAssert-ing every function I pass a context to for nil. What can I set a breakpoint on to trap where this error is coming from?

Re: Breaking on nil context

2013-02-12 Thread Graham Cox
Thanks chaps, that did the trick. The plot thickens though, since I'm getting this logged when the context is NOT nil, usually in a call (but only now and again) to CTLineDraw. Mysterious --Graham On 12/02/2013, at 7:09 PM, Joar Wingfors j...@joar.com wrote: Try breaking on

Re: Breaking on nil context

2013-02-12 Thread David Duncan
On Feb 12, 2013, at 5:01 PM, Graham Cox graham@bigpond.com wrote: Thanks chaps, that did the trick. The plot thickens though, since I'm getting this logged when the context is NOT nil, usually in a call (but only now and again) to CTLineDraw. Mysterious Does your attributed

Re: Breaking on nil context

2013-02-12 Thread Graham Cox
On 13/02/2013, at 12:04 PM, David Duncan david.dun...@apple.com wrote: Does your attributed string use an NSColor to specify the stroke color? Maybe I'll check that out. Actually that raises a point about using CoreText. There are new NSAttributedString attributes that allow you to

Breaking on nil context

2013-02-11 Thread Graham Cox
I'm getting this logged at times: Error: CGContextSetStrokeColorWithColor: invalid context 0x0 This is despite NSAssert-ing every function I pass a context to for nil. What can I set a breakpoint on to trap where this error is coming from? --Graham