Mac OS X compatibility tweaks for NSFormatter coding and copying.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29268 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
qmathe 2010-01-11 22:08:21 +00:00
parent acab61a463
commit 4c33ef3076
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2010-01-11 Quentin Mathe <quentin.mathe@gmail.com>
* Source/NSFormatter.m (-copyWithZone:, -initWithCoder:,
-encodeWithCoder:): Removed the subclass responsability, in order to
have subclasses automatically coding and copying compliant as Cocoa does.
You can also now safely call [super copyWithZone:/initWithCoder:] in a
subclass.
2010-01-11 Richard Frith-Macdonald <rfm@gnu.org> 2010-01-11 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSMapTable.m: * Source/NSMapTable.m:

View file

@ -38,8 +38,7 @@
- (id) copyWithZone: (NSZone*)zone - (id) copyWithZone: (NSZone*)zone
{ {
[self subclassResponsibility: _cmd]; return [[self class] allocWithZone: zone];
return nil;
} }
- (NSString*) editingStringForObjectValue: (id)anObject - (NSString*) editingStringForObjectValue: (id)anObject
@ -49,7 +48,7 @@
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
[self subclassResponsibility: _cmd];
} }
- (BOOL) getObjectValue: (id*)anObject - (BOOL) getObjectValue: (id*)anObject
@ -62,8 +61,7 @@
- (id) initWithCoder: (NSCoder*)aCoder - (id) initWithCoder: (NSCoder*)aCoder
{ {
[self subclassResponsibility: _cmd]; return [super init];
return nil;
} }
- (BOOL) isPartialStringValid: (NSString*)partialString - (BOOL) isPartialStringValid: (NSString*)partialString