Debugging NSTextField categories
Debugging NSTextField categories
- Subject: Debugging NSTextField categories
- From: Mark Dawson <email@hidden>
- Date: Fri, 13 May 2005 17:01:30 -0700
I've added a category to
NSTextField; it has worked fine for months. However, one text field that I added returns the previous value when that field's action is called. I'm not sure how to debug this. I DID double (triple) check that the correct outlet is attached to that text field. I DO have a formatter (mine) attached to the text field, but as far as I can tell, it is returning the correct string. I'm not sure how to debug "bad" NSTextField return values. Any suggestions would be appreciated
Here is the category code--when I step into "[self stringValue]", I see the previous value (i.e., the value before that was in the text field BEFORE I started typing and pressed the enter key)
x = [myNewTextOutletField readFieldAsDimension];
- (unsigned long)readFieldAsDimension
{
DimensionFormatter *aFormatter = [self formatter];
if (aFormatter && [aFormatter isMemberOfClass:[DimensionFormatter class]])
{
return [aFormatter readFormatValueAsDimension: [self stringValue]];
}
return 0; // error
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden