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 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]