NSMatrix problem
NSMatrix problem
- Subject: NSMatrix problem
- From: Mark T <email@hidden>
- Date: Tue, 3 Jul 2001 03:02:38 -0400
I'm having an amazingly tough time doing something that I believe should
be incredibly simple. I'm trying to make a 1x2 NSMatrix consisting of
just 2 NSBussonCells (checkboxes). The NSMatrix is configured as radio
mode, allowing empty selection. But when you click on a checked checkbox,
it doesn't uncheck. I've tried numerous attempts at fixing this in code,
but with no success, so if anyone could point out how to do this, I would
be grateful.
On another matter entirely, isn't it a little odd that NSNumber doesn't
allow you to change its value after the object has been created? I
expected to find setIntValue, setShortValue, etc... methods for it, and
was surprised to find that they weren't there. Is there a reason for
this? I ended up writing my own very simple methods to account for this
omission, implemented as a category, of the following form:
- (void) setTypeValue:(Type)value{ [self release]; self = [[NSNumber
alloc] initWithType:value];}
Can anyone see any obvious problems with this, and if not, why didn't
Apple implement it?
Thanks,Mark T.