mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Corrected issue found by Riccardo for version 0 gorm files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@25414 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
33b20b7b63
commit
235f48c5ea
2 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-08-24 00:50-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormPrivate.m: Changed initWithCoder: to handle
|
||||
older .gorm (version 0) files correctly.
|
||||
|
||||
2007-08-19 21:22-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* ChangeLog
|
||||
|
|
|
@ -40,6 +40,9 @@ NSString *GormDidDeleteClassNotification = @"GormDidDeleteClassNotification";
|
|||
NSString *GormWillDetachObjectFromDocumentNotification = @"GormWillDetachObjectFromDocumentNotification";
|
||||
NSString *GormResizeCellNotification = @"GormResizeCellNotification";
|
||||
|
||||
// Private, and soon to be deprecated, notification string...
|
||||
NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedNotification";
|
||||
|
||||
// Define this as "NO" initially. We only want to turn this on while loading or testing.
|
||||
static BOOL _isInInterfaceBuilder = NO;
|
||||
|
||||
|
@ -126,7 +129,9 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
{
|
||||
int version = [aCoder versionForClassName:
|
||||
NSStringFromClass([GSNibItem class])];
|
||||
|
||||
int cv = [aCoder versionForClassName:
|
||||
NSStringFromClass([GSNibContainer class])];
|
||||
|
||||
if (version == NSNotFound)
|
||||
{
|
||||
NSLog(@"no GSNibItem");
|
||||
|
@ -134,6 +139,14 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSStringFromClass([GormObjectProxy class])];
|
||||
}
|
||||
|
||||
// add to the top level items during unarchiving, if the container is old.
|
||||
if (cv == 0)
|
||||
{
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
[nc postNotificationName: GSInternalNibItemAddedNotification
|
||||
object: self];
|
||||
}
|
||||
|
||||
if (version == 0)
|
||||
{
|
||||
// do not decode super (it would try to morph into theClass ! )
|
||||
|
|
Loading…
Reference in a new issue