Re: Where do these come from...
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