• 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: checkbox in nstableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >checkbox in nstableview (From: Bart Beulen <email@hidden>)

  • Prev by Date: checkbox in nstableview
  • Next by Date: Re: Converting string to encoding
  • Previous by thread: checkbox in nstableview
  • Next by thread: Newbie: applescript "call method" to obj-c method (booleans & image data)
  • Index(es):
    • Date
    • Thread