Re: CGContextSetStyle console log error?
Re: CGContextSetStyle console log error?
- Subject: Re: CGContextSetStyle console log error?
- From: Keith Blount <email@hidden>
- Date: Mon, 27 Aug 2007 10:56:40 -0700 (PDT)
Thanks the replies.
Unfortunately (or fortunately :) ) I don't do anything
like call -drawRect: directly from anywhere...
I did realise that my original post wasn't entirely
correct - whilst I only call -currentContext in my
NSView subclass to set the patternImage origin, I use
Andreas Meyer's NSBezier categories for gradient fills
(NSBezierPath_AMGradient) which also has calls to
-currentContext and does some Quartz stuff.
I followed the original poster's suggestion of putting
NSLogs around all the calls to -currentContext and the
Quartz-related methods so that I could narrow down
where these errors are coming from, but wouldn't you
know that in the past several days I haven't seen
these errors at all, despite using the app
intensively. As I said before, the error seems very
erratic (fortunately it has no effect on the running
of the program anyway). Though I did get another CG
error when switching between screens, when the window
of my app - which was being used on a 24" external
display - was now bigger than my MacBook Pro's 15"
display. Odd.
Anyway, as before, if anyone has any more insights
into what could be causing this - especially given
that right now I'm just waiting for the error to
appear again - I would be very grateful.
Thanks again and all the best,
Keith
--- Felix Franz <email@hidden> wrote:
> On Aug 24, 2007, at 10:29 AM, Keith Blount wrote:
>
> > Hi,
> >
> >> From time to time my app generates the following
> > console error:
> >
> > CGContextSetStyle: invalid context
> >
> > Does anybody know what this means or what it
> indicates
> > I am doing wrong? An internet and archive search
> > reveals nothing, and there is nothing about
> > "CGContextSetStyle" in the docs. Moreover, I do
> > nothing with CGContext at all in my code. My app
> > includes the Quartz framework only for use of the
> > PDFView.
>
> I saw similar console errors while running some
> badly coded unit-tests.
> I called drawRect: directly on a custom view to
> assure the objects in
> this view get their
> draw-method called. All calls to the graphicsContext
> emitted those
> "invalid context"
> errors. You can put a breakpoint on the
> syslog-function (seems to be
> called by
> Quartz error-reporting) to stop where the error
> message gets logged.
>
> HTH,
>
> felix
>
>
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden