Corrected a bug which was causing issues with custom classes and gorm file

corruption.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@16684 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-05-10 17:34:45 +00:00
parent 1678fafeae
commit 2795d5b995
2 changed files with 17 additions and 3 deletions

View file

@ -1,4 +1,12 @@
2003-05-07 Gregory John Casamento <greg_casamento@yahoo.com>
2003-05-09 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: Further improved the fix to the problem found
yesterday. The custom class code was issuing a RELEASE call to
all of the objects in the nameTable. This was not necessary unless
the object is a template object and was causing some issues with
gorm file corruption.
2003-05-08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: Corrected a problem which was causing the
NSVisible array in the nameTable to become corrupted when

View file

@ -1259,33 +1259,39 @@ static NSImage *classesImage = nil;
[(NSWindow *)obj setContentView: [template contentView]];
[self setObject: template isVisibleAtLaunch: NO];
[self setObject: obj isVisibleAtLaunch: isVisible];
RELEASE(template); // get rid of the template...
}
else if ([template isKindOfClass: [GormNSTextViewTemplate class]])
{
[[template superview] replaceSubview: template with: obj];
RELEASE(template); // get rid of the template...
}
else if ([template isKindOfClass: [GormNSTextTemplate class]])
{
[[template superview] replaceSubview: template with: obj];
RELEASE(template); // get rid of the template...
}
else if ([template isKindOfClass: [GormNSButtonTemplate class]])
{
[[template superview] replaceSubview: template with: obj];
RELEASE(template); // get rid of the template...
}
else if ([template isKindOfClass: [GormNSControlTemplate class]])
{
[[template superview] replaceSubview: template with: obj];
RELEASE(template); // get rid of the template...
}
else if ([template isKindOfClass: [GormNSViewTemplate class]])
{
[[template superview] replaceSubview: template with: obj];
RELEASE(template); // get rid of the template...
}
else if ([template isKindOfClass: [GormNSMenuTemplate class]])
{
[[template superview] replaceSubview: template with: obj];
RELEASE(template); // get rid of the template...
}
[nameTable setObject: obj forKey: key];
RELEASE(template); // get rid of the template...
}
[tempNameTable removeAllObjects];
}
@ -2445,7 +2451,7 @@ static NSImage *classesImage = nil;
{
a = [NSMutableArray new];
[nameTable setObject: a forKey: @"NSVisible"];
// RELEASE(a);
RELEASE(a);
}
if ([a containsObject: anObject] == NO)
{