mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-21 02:20:55 +00:00
* EOAccess/EOModelGroup.m ([+globalModelGroup]): Search for
.eomodel files as well and call -addModelWithFile: with full path. * EOAccess/EOModel.m ([-initWithContentsOfFile:]): Add assert if file could not be read. * EOControl/EOKeyGlobalID.m ([-hash]): Improve quality of hash values. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20294 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aad84f842f
commit
2f6232368a
4 changed files with 23 additions and 7 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-11-04 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* EOAccess/EOModelGroup.m ([+globalModelGroup]): Search for
|
||||
.eomodel files as well and call -addModelWithFile: with full
|
||||
path.
|
||||
* EOAccess/EOModel.m ([-initWithContentsOfFile:]): Add assert
|
||||
if file could not be read.
|
||||
|
||||
* EOControl/EOKeyGlobalID.m ([-hash]): Improve quality of hash
|
||||
values.
|
||||
|
||||
2004-11-03 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* EOAccess/EOAdaptorContext.h: Only use ASCII characters.
|
||||
|
|
|
@ -579,6 +579,7 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
|
|||
}
|
||||
|
||||
fileContents = [NSString stringWithContentsOfFile: indexPath];
|
||||
NSAssert1(fileContents!=nil, @"File %@ could not be read.", indexPath);
|
||||
propList = [fileContents propertyList];
|
||||
EOFLOGObjectLevelArgs(@"gsdb", @"propList=%@", propList);
|
||||
NSAssert1(propList!=nil, @"Model at path %@ is invalid", indexPath);
|
||||
|
|
|
@ -123,10 +123,11 @@ static EOModelGroup *globalModelGroup = nil;
|
|||
{
|
||||
NSMutableArray *bundles = [NSMutableArray arrayWithCapacity: 2];
|
||||
NSBundle *bundle = nil;
|
||||
NSArray *paths = nil;
|
||||
NSMutableArray *paths = nil;
|
||||
NSEnumerator *pathsEnum = nil;
|
||||
NSEnumerator *bundleEnum = nil;
|
||||
NSString *path = nil;
|
||||
id tmp;
|
||||
|
||||
globalModelGroup = [EOModelGroup new];
|
||||
|
||||
|
@ -138,8 +139,13 @@ static EOModelGroup *globalModelGroup = nil;
|
|||
bundleEnum = [bundles objectEnumerator];
|
||||
while ((bundle = [bundleEnum nextObject]))
|
||||
{
|
||||
paths = [bundle pathsForResourcesOfType: @"eomodeld"
|
||||
inDirectory: nil];
|
||||
paths = (id)[NSMutableArray array];
|
||||
tmp = [bundle pathsForResourcesOfType: @"eomodeld"
|
||||
inDirectory: nil];
|
||||
[paths addObjectsFromArray: tmp];
|
||||
tmp = [bundle pathsForResourcesOfType: @"eomodel"
|
||||
inDirectory: nil];
|
||||
[paths addObjectsFromArray: tmp];
|
||||
|
||||
if (!paths)
|
||||
{
|
||||
|
@ -150,8 +156,6 @@ static EOModelGroup *globalModelGroup = nil;
|
|||
pathsEnum = [paths objectEnumerator];
|
||||
while ((path = [pathsEnum nextObject]))
|
||||
{
|
||||
path = [path stringByDeletingPathExtension];
|
||||
NSLog(@"%@", path);
|
||||
[globalModelGroup addModelWithFile: path];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,9 +150,9 @@ RCS_ID("$Id$")
|
|||
unsigned int hash = 0;
|
||||
|
||||
for (i = 0; i < _keyCount; i++)
|
||||
hash += [_keyValues[i] hash];
|
||||
hash ^= [_keyValues[i] hash];
|
||||
|
||||
hash += [_entityName hash];
|
||||
hash ^= [_entityName hash];
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue