mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
Various fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2796 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4cf95f8203
commit
65b9b6186c
7 changed files with 61 additions and 31 deletions
|
@ -223,6 +223,25 @@ static Class NSMutableArray_concrete_class;
|
|||
return self;
|
||||
}
|
||||
|
||||
- initWithContentsOfFile: (NSString*)file
|
||||
{
|
||||
NSString *myString;
|
||||
|
||||
myString = [[NSString alloc] initWithContentsOfFile:file];
|
||||
if (myString)
|
||||
{
|
||||
id result = [myString propertyList];
|
||||
if ( [result isKindOfClass: [NSArray class]] )
|
||||
{
|
||||
[self initWithArray: result];
|
||||
return self;
|
||||
}
|
||||
}
|
||||
NSLog(@"Contents of file does not contain an array");
|
||||
[self dealloc];
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ arrayWithObjects: firstObject, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -735,24 +754,6 @@ static Class NSMutableArray_concrete_class;
|
|||
autorelease];
|
||||
}
|
||||
|
||||
- initWithContentsOfFile: (NSString*)file
|
||||
{
|
||||
NSString *myString;
|
||||
|
||||
myString = [[NSString alloc] initWithContentsOfFile:file];
|
||||
if (myString)
|
||||
{
|
||||
id result = [myString propertyList];
|
||||
if ( [result isKindOfClass: [NSArray class]] )
|
||||
{
|
||||
[self initWithArray: result];
|
||||
return self;
|
||||
}
|
||||
}
|
||||
[self dealloc];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile
|
||||
{
|
||||
return [[self description] writeToFile:path atomically:useAuxiliaryFile];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue