2007-01-01 21:11:21 +00:00
|
|
|
/* Copyright (c) 2006-2007 Christopher J. W. Lloyd
|
2006-12-22 04:41:44 +00:00
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
|
|
this software and associated documentation files (the "Software"), to deal in
|
|
|
|
the Software without restriction, including without limitation the rights to
|
|
|
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
|
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
|
|
subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
|
|
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
|
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
2006-12-22 04:41:44 +00:00
|
|
|
|
|
|
|
// Original - Christopher Lloyd <cjwl@objc.net>
|
|
|
|
#import <Foundation/NSFormatter.h>
|
|
|
|
#import <Foundation/NSRaise.h>
|
|
|
|
|
|
|
|
@implementation NSFormatter
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (BOOL) isPartialStringValid: (NSString *) partial
|
|
|
|
newEditingString: (NSString **) editing
|
2020-05-12 00:04:26 +00:00
|
|
|
errorDescription: (NSString **) error
|
|
|
|
{
|
2020-05-11 15:52:05 +00:00
|
|
|
NSInvalidAbstractInvocation();
|
|
|
|
return NO;
|
2006-12-22 04:41:44 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (BOOL) getObjectValue: (id *) object
|
2020-05-12 18:51:39 +00:00
|
|
|
forString: (NSString *) string
|
|
|
|
errorDescription: (NSString **) error
|
2020-05-12 00:04:26 +00:00
|
|
|
{
|
2020-05-11 15:52:05 +00:00
|
|
|
NSInvalidAbstractInvocation();
|
|
|
|
return NO;
|
2006-12-22 04:41:44 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (NSString *) stringForObjectValue: (id) object {
|
|
|
|
NSInvalidAbstractInvocation();
|
|
|
|
return nil;
|
2006-12-22 04:41:44 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (NSString *) editingStringForObjectValue: (id) object {
|
|
|
|
NSInvalidAbstractInvocation();
|
|
|
|
return nil;
|
2006-12-22 04:41:44 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (NSAttributedString *) attributedStringForObjectValue: (id) object
|
|
|
|
withDefaultAttributes:
|
2020-05-12 18:51:39 +00:00
|
|
|
(NSDictionary *) attributes
|
2020-05-12 00:04:26 +00:00
|
|
|
{
|
2020-05-11 15:52:05 +00:00
|
|
|
NSInvalidAbstractInvocation();
|
|
|
|
return nil;
|
2006-12-22 04:41:44 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (BOOL) isPartialStringValid: (NSString **) partialStringp
|
|
|
|
proposedSelectedRange: (NSRange *) proposedRangep
|
|
|
|
originalString: (NSString *) originalString
|
|
|
|
originalSelectedRange: (NSRange) originalRange
|
2020-05-12 00:04:26 +00:00
|
|
|
errorDescription: (NSString **) errorStringp
|
|
|
|
{
|
2020-05-11 15:52:05 +00:00
|
|
|
NSInvalidAbstractInvocation();
|
|
|
|
return NO;
|
2008-01-02 03:31:21 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- initWithCoder: (NSCoder *) coder {
|
|
|
|
return self;
|
2007-05-22 17:16:17 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 15:52:05 +00:00
|
|
|
- (void) encodeWithCoder: (NSCoder *) coder {
|
2007-05-22 17:16:17 +00:00
|
|
|
}
|
|
|
|
|
2006-12-22 04:41:44 +00:00
|
|
|
@end
|