• 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
stroke and fill - logs CGContextSetFillColorWithColor invalid context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stroke and fill - logs CGContextSetFillColorWithColor invalid context


  • Subject: stroke and fill - logs CGContextSetFillColorWithColor invalid context
  • From: Richard Salvatierra <email@hidden>
  • Date: Tue, 10 Apr 2007 17:11:26 -0400

I am drawing a color swatch for a popupmenu but noticed in the console the following log:
CGContextSetFillColorWithColor invalid context
CGContextSetStrokeColorWithColor: invalid context


What am I doing incorrectly?

while (nil != (color = [enumerator nextObject]))
{
subitem = [colorMenu addItemWithTitle:color action:@selector (setColorTag:) keyEquivalent:@""];
NSRect rect = NSMakeRect(0,0,16,16);
NSImage *colorImage = [[NSImage alloc] initWithSize: rect.size];
[colorImage lockFocus];
[(NSColor*) [colorList colorWithKey: color] drawSwatchInRect: NSInsetRect (rect, 2.0, 2.0)];
[colorImage unlockFocus];
[subitem setImage: colorImage];
[colorImage release];
}


-Rich
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Filevault and SUID Incompatibilities
  • Next by Date: Re: Detecting Click Location in NSOutlineView
  • Previous by thread: Re: Value transformer in NSPredicate?
  • Next by thread: NSTimer and Selector
  • Index(es):
    • Date
    • Thread