Re: NSArrayController's "selectionIndex" weirdness
Re: NSArrayController's "selectionIndex" weirdness
- Subject: Re: NSArrayController's "selectionIndex" weirdness
- From: Quincey Morris <email@hidden>
- Date: Thu, 10 Apr 2008 19:37:15 -0700
On Apr 10, 2008, at 19:09, Johnny Lundy wrote:
- (void) nightKill:(NSUInteger) theWhackedOne
{
NSLog(@"SelectionIndex=%@",theWhackedOne);
[playerArray removeObjectAtIndex:theWhackedOne];
return;
}
The array controller is sending you a NSNumber whose value is the
selection index. That's why it NSLogs correctly with the %@ (object)
format specifier.
You need:
- (void) nightKill:(NSNumber *) theWhackedOne
{
NSLog(@"SelectionIndex=%@",theWhackedOne);
[playerArray removeObjectAtIndex:[theWhackedOne integerValue]];
return;
}
_______________________________________________
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