RE: Crash while getting the NSColor components
RE: Crash while getting the NSColor components
- Subject: RE: Crash while getting the NSColor components
- From: Vinay Prabhu <email@hidden>
- Date: Wed, 21 Jun 2006 11:11:12 +0530
- Importance: Normal
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...
-----Original Message-----
From: Corbin Dunn [mailto:email@hidden]
Sent: Wednesday, June 21, 2006 4:04 AM
To: Vinay Prabhu
Cc: email@hidden
Subject: Re: Crash while getting the NSColor components
> [colorOfPanelSolid getRed:&red green:&green blue:&blue
> alpha:&alpha];
This ivar, colorOfPanelSolid, may not be properly retained. It is hard
to say without seeing more code. Also, what is the backtrace of the
crash?
corbin
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or email@hidden
_______________________________________________
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