• 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: NSColor with alpha problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColor with alpha problem


  • Subject: Re: NSColor with alpha problem
  • From: Dominic Edward Feira <email@hidden>
  • Date: Mon, 26 Apr 2004 03:18:58 -0400 (EDT)

Sorry to fill the list with stupidity!

I forgot to do a retain on the NSColor I was creating. For some reason
not doing the retain didn't show up as a problem until I wanted to use
an alpha value...weird.

My example below was an oversimplification of what I was doing. I am
creating a NSColor in the constructor and using it later.

All is well now.

-- Dominic Feira
email@hidden

Earlier today I stupidly wrote:

>>
>> I have run into a rather annoying little problem. I'm not sure if I'm
>> the annoying problem or if NSColor is to blame.
>>
>> I am trying to do some drawing with an alpha channel. Anytime I call:
>>
>> NSColor* myNSColor = [NSColor colorWithCalibratedRed: 1.0 green: 0.5
>> blue:0.0 alpha:0.75];
>> [myNSColor set];
>>
>> I get a segmentation fault. If I set the alpha value to 1.0 it runs
>> fine. I'm not sure what I'm missing, but...a segmentation fault isn't
>> the most graceful way for cocoa to handle this.
>>
>> -- Dominic Feira
>> email@hidden
>> _______________________________________________
>> cocoa-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSColor with alpha problem
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: xCode 1.2
  • Next by Date: custom alert panel
  • Previous by thread: Re: NSColor with alpha problem
  • Next by thread: Re: NSColor with alpha problem
  • Index(es):
    • Date
    • Thread