NSFormatter not getting called
NSFormatter not getting called
- Subject: NSFormatter not getting called
- From: Apple Cocoa List <email@hidden>
- Date: Mon, 16 Feb 2009 18:21:02 -0600
I can't get this very simple NSFormatter to get called on an
NSTextField.
Here is the formatter:
@implementation FileNameFormatter
- (BOOL)isPartialStringValid:(NSString *)partialString
newEditingString:(NSString **)newString errorDescription:(NSString
**)error
{
NSLog(@"Formatter called"); //NEVER GETS CALLED.
return YES;
}
@end
Here is my code assigning it to an NSTextField:
- (void)windowDidLoad
{
NSLog(@"windowDidLoad called"); //GETS CALLED OK.
FileNameFormatter *fileNameFormatter = [[[FileNameFormatter alloc]
init] autorelease];
[nameField setFormatter:fileNameFormatter];
}
Is there anything I am missing?
Thanks,
Todd Freese
_______________________________________________
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