OK, so I have an table view text cell that has a number formatter attached in Interface Builder. In order to protect against throwing an exception, I've overridden setNilValueForKey: as follows:

- (void)setNilValueForKey:(NSString *)key
{
    NSLog(@"setNilValueForKey: has been successfully called...");
    if ([key isEqual:@"dollarValue"])
  {
        [self setDollarValue:0.00];
  } else {
  {
        [super setNilValueForKey:key];
  }
}

dollarValue is a float and is KVC/KVO compliant (with a getter and setter) and setNilValueForKey: was overridden in the same class.

The table view text cell updates properly so long as an empty value (aka 'nil') is not attempted (which results in a format error even though setNilValueForKey: has been overridden). The NSLog statement within setNilValueForKey: some unknown reason never gets called. I've also performed a "Clean All" and still the same results.

I'm probably missing the obvious, but too tired to fight it right now.

Any thoughts would be greatly appreciated.

Thanks in advance,

Marc
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to