• 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: Where do these come from...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where do these come from...


  • Subject: Re: Where do these come from...
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 15 Aug 2012 20:03:48 -0700

On Aug 15, 2012, at 8:20 AM, Charlie Dickman <email@hidden> wrote:

> I have been getting the following messages in the console window while my program is running...
>
> Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] <Error>: CGContextSetFillColorWithColor: invalid context 0x0
> Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] <Error>: CGContextSetStrokeColorWithColor: invalid context 0x0
> Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] <Error>: CGContextFillRects: invalid context 0x0
> Wed Aug 15 11:13:51 charlie-dickmans-mac-pro.local Mah-Jongg[4416] <Error>: CGContextFillRects: invalid context 0x0
>
> I have isolated their source to the following code...
>
>    [[NSColor whiteColor] set];
>    [die1 drawInRect: iDieDrawRect
>              fromRect: imageRect1
>             operation: NSCompositeSourceOver
>              fraction: 1.0];
>    [die2 drawInRect: jDieDrawRect
>              fromRect: imageRect2
>             operation: NSCompositeSourceOver
>              fraction: 1.0];
>
> What can I do to eliminate these errors? I know the simple answer is to make the context valid but I don't know how to do that.

Where does this code live? Are you trying to draw outside of -drawRect:? If so, stop doing that.

--Kyle Sluder
_______________________________________________

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

References: 
 >Where do these come from... (From: Charlie Dickman <email@hidden>)

  • Prev by Date: Re: Mountain Lion crashes Simulator
  • Next by Date: Re: Where do these come from...
  • Previous by thread: Re: Where do these come from...
  • Next by thread: Re: Where do these come from...
  • Index(es):
    • Date
    • Thread