Re: NSFormatter not getting called
Re: NSFormatter not getting called
- Subject: Re: NSFormatter not getting called
- From: Todd Freese <email@hidden>
- Date: Mon, 16 Feb 2009 18:55:44 -0600
So here it is with the other three methods. I had them, just snipped
them out of the post. Ops!
@implementation FileNameFormatter
- (NSString *)stringForObjectValue:(id)anObject
{
if ([anObject isKindOfClass:[NSString class]]) {
NSString *sourceString = [NSString stringWithString:anObject];
return sourceString;
} else {
return nil;
}
}
- (BOOL)getObjectValue:(id *)obj forString:(NSString *)aString
errorDescription:(NSString **)error
{
if (aString != NULL) {
*obj = [NSString stringWithString:aString];
return YES;
} else {
return NO;
}
}
- (NSAttributedString *)attributedStringForObjectValue:(id)anObject
withDefaultAttributes:(NSDictionary *)attributes
{
return [[[NSAttributedString alloc] initWithString:[self
stringForObjectValue:anObject] attributes:attributes] autorelease];
}
- (BOOL)isPartialStringValid:(NSString *)partialString
newEditingString:(NSString **)newString errorDescription:(NSString
**)error
{
NSLog(@"formatter called"); //NEVER GETS CALLED.
return YES;
}
@end
_______________________________________________
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