• 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: Crash while getting the NSColor components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash while getting the NSColor components


  • Subject: Re: Crash while getting the NSColor components
  • From: Chris Suter <email@hidden>
  • Date: Wed, 21 Jun 2006 15:50:42 +1000

On 21/06/2006, at 3:41 PM, Vinay Prabhu wrote:

I have found out the cause for the crash,

Before I call the method, where it was crashing,
I was manipulating the color of the iVar colorOfPanelSolid.

This is how the code is,

float red, green, blue, alpha;
float redEdit = [sender floatValue]/255; // divide by 255 is because the
text field will take values from 0 to 255
currentColor = [activeColorWell color];
[currentColor getRed:&red green:&green blue:&blue alpha:&alpha];
editedColor = [NSColor colorWithCalibratedRed:redEdit green:green blue:blue
alpha:alpha];


colorOfPanelSolid = editedColor;

If the value's of redEdit and red is same, afterwards when I execute
[colorOfPanelSolid getRed:&red green:&green blue:&blue alpha:&alpha];
Application crashes.

I suppose it should not crash in the above condition...

I haven't fully followed this thread. You're not doing something silly like forgetting a retain are you? You realise colorWithCalibratedRed:green:blue: returns an autoreleased object?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • RE: Crash while getting the NSColor components
      • From: Vinay Prabhu <email@hidden>
References: 
 >RE: Crash while getting the NSColor components (From: Vinay Prabhu <email@hidden>)

  • Prev by Date: RE: Crash while getting the NSColor components
  • Next by Date: Process Priority
  • Previous by thread: RE: Crash while getting the NSColor components
  • Next by thread: RE: Crash while getting the NSColor components
  • Index(es):
    • Date
    • Thread