mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Use the "classes" map from the nib instead of the "swappedObjects" dictionary. Remove the (now unecessary) delegate code which was building it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@23102 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7d9741531c
commit
cbba5cb5c7
3 changed files with 16 additions and 25 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-06-24 10:22 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormNibWrapperLoader.m: Use the "classes" map properly in
|
||||
-[GormNibWrapperLoader loadWrapperFile:withDocument:].
|
||||
* main.m: Correct comment.
|
||||
|
||||
2006-06-23 00:57 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormGModelWrapperLoader.m: call
|
||||
|
|
|
@ -270,21 +270,16 @@
|
|||
}
|
||||
|
||||
//
|
||||
// add the swapped objects...
|
||||
// Add custom classes...
|
||||
//
|
||||
en = [swappedObjects keyEnumerator];
|
||||
NSString *key = nil;
|
||||
while((key = [en nextObject]) != nil)
|
||||
NSMapTable *classes = [container classes];
|
||||
NSArray *classKeys = NSAllMapTableKeys(classes);
|
||||
en = [classKeys objectEnumerator];
|
||||
while((o = [en nextObject]) != nil)
|
||||
{
|
||||
NSArray *array = [swappedObjects objectForKey: key];
|
||||
NSEnumerator *oen = [array objectEnumerator];
|
||||
id actualObj = nil;
|
||||
|
||||
while((actualObj = [oen nextObject]) != nil)
|
||||
{
|
||||
NSString *name = [document nameForObject: actualObj];
|
||||
[classManager setCustomClass: key forName: name];
|
||||
}
|
||||
NSString *name = [document nameForObject: o];
|
||||
NSString *customClass = NSMapGet(classes, o);
|
||||
[classManager setCustomClass: customClass forName: name];
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -350,17 +345,7 @@
|
|||
|
||||
- (void) unarchiver: (NSKeyedUnarchiver *)unarchiver willReplaceObject: (id)obj withObject: (id)newObj
|
||||
{
|
||||
if([obj isKindOfClass: [NSClassSwapper class]])
|
||||
{
|
||||
NSString *className = [obj className];
|
||||
NSMutableArray *objects = [swappedObjects objectForKey: className];
|
||||
if(objects == nil)
|
||||
{
|
||||
objects = [NSMutableArray array];
|
||||
[swappedObjects setObject: objects forKey: className];
|
||||
}
|
||||
[objects addObject: newObj];
|
||||
}
|
||||
// Nothing for now...
|
||||
}
|
||||
|
||||
- (id) unarchiver: (NSKeyedUnarchiver *)unarchiver didDecodeObject: (id)obj
|
||||
|
|
2
main.m
2
main.m
|
@ -1,7 +1,7 @@
|
|||
/* main.m
|
||||
*
|
||||
* Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
|
||||
*
|
||||
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
* Date: 2004
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue