How to receive: - (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error;
How to receive: - (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error;
- Subject: How to receive: - (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error;
- From: Andy <email@hidden>
- Date: Sun, 06 Jan 2002 12:57:38 -0500
Hi all,
I have an NSTextField which has an NSNumberFormatter attached to it (by
dragging from the pallette in IB onto the text field in the GUI).
I also have a class which is the delegate for the NSTextField.
What's confusing me is that my delegate doesn't seem to be being called
consistently. I know its basically set up right, because it does see the
- (void)controlTextDidBeginEditing:(NSNotification *)aNotification;
message. However it never gets a
- (void)control:(NSControl *)control
didFailToValidatePartialString:(NSString *)string
errorDescription:(NSString *)error;
even when I type complete garbage into the field (eg, its an
NSNumberFormater, so I would expect a "didFailToValidatePartialString"
if I type "hello" or even just "h").
I'm wondering if this has something to do with the way I attached the
formatter... I note that if one looks at the Connections for my
NSTextField in IB then the "formatter" outlet (is that the right name?)
isn't connected to anything.
Do I need a custom formatter to get the validation message to fire?
--
AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside
I think we finally found the killer app for Flash: animated stick men