Re: checkbox in nstableview
Re: checkbox in nstableview
- Subject: Re: checkbox in nstableview
- From: Graham Cox <email@hidden>
- Date: Sun, 15 Jun 2008 01:08:35 +1000
NSInteger (nor BOOL) isn't an object, it's just a scalar value (in
fact, an int), so you don't need to retain it - I expect trying to
send a message to it for any value other than 0 will crash if it
compiles at all. It should work if you just get rid of the retain/
release messages. KVC internally packages scalar values into NSNumber
objects behind the scenes - you don't have to worry about it.
hth,
Graham
On 15 Jun 2008, at 12:59 am, Bart Beulen wrote:
-(void)setPOIEnabled:(NSInteger *)penabled
{
[penabled retain];
[POIEnabled release];
POIEnabled = penabled;
}
- (NSInteger *)POIEnabled
{
return POIEnabled;
}
I think the actual problem is that I have to get and set the value
of the checkbox in another way (not using NSInteger, I tried also
using a BOOL but that doesn't work).
I searched online but could not find an actual solution or usable
hints.
_______________________________________________
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