Add back in encoding/decoding for testing.

This commit is contained in:
Gregory John Casamento 2021-05-09 00:08:16 -04:00
parent 49b98e385d
commit 95d77eb982
6 changed files with 29 additions and 74 deletions

View file

@ -57,7 +57,7 @@
}
@end
@interface GormDocument : NSDocument <IBDocuments, GSNibContainer>
@interface GormDocument : NSDocument <IBDocuments, GSNibContainer, NSCoding>
{
GormClassManager *classManager;
GormFilesOwner *filesOwner;

View file

@ -3518,6 +3518,29 @@ static void _real_close(GormDocument *self,
{
return isOlderArchive;
}
//
// Encoding is here for testing the interface. This allows
// Gorm to encode the interface and then run it like a regular
// app. It needs to act like a container in order to do this.
//
- (void) encodeWithCoder: (NSCoder *)coder
{
[coder encodeObject: topLevelObjects];
[coder encodeObject: nameTable];
[coder encodeObject: visibleWindows];
[coder encodeObject: connections];
}
- (id) initWithCoder: (NSCoder *)coder
{
ASSIGN(topLevelObjects, [coder decodeObject]);
ASSIGN(nameTable, [coder decodeObject]);
ASSIGN(visibleWindows, [coder decodeObject]);
ASSIGN(connections, [coder decodeObject]);
return self;
}
- (void) awakeWithContext: (NSDictionary *)context
{

View file

@ -14,7 +14,7 @@
{
NSName = "GSStoryboardFileType";
NSHumanReadableName = "Cocoa Storyboard";
NSRole = Editor;
NSRole = Viewer;
NSDocumentClass = GormDocument;
NSUnixExtensions = ( "storyboard" );
NSIcon = "GormFile.tiff";
@ -51,7 +51,7 @@
ApplicationDescription = "[GNUstep | Graphical] Object Relationship Modeller";
ApplicationIcon = "Gorm.tiff";
ApplicationName = "Gorm";
ApplicationRelease = "Gorm 1.2.26 (Release)";
ApplicationRelease = "Gorm 1.3.0 (Release)";
Authors = ("Gregory John Casamento <greg.casamento@gmail.com>",
"Adam Fedor <fedor@gnu.org>",
"Richard Frith-Macdonald <rfm@gnu.org>",

View file

@ -1,32 +0,0 @@
/* GormNibCustomResource
*
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 2009
*
* This file is part of GNUstep.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*/
#ifndef GORM_NIBCUSTOMRESOURCE
#define GORM_NIBCUSTOMRESOURCE
#include <GNUstepGUI/GSNibLoading.h>
@interface GormNibNibCustomResource : NSCustomResource
@end
#endif

View file

@ -1,36 +0,0 @@
/* GormNibCustomResource
*
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 2009
*
* This file is part of GNUstep.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*/
#include "GormNibCustomResource.h"
@implementation GormNibNibCustomResource : NSCustomResource
- (id) initWithCoder: (NSCoder *)coder
{
return self;
}
- (void) encodeWithCoder: (NSCoder *)coder
{
}
@end

View file

@ -6,10 +6,10 @@
GNUSTEP_GCC=3.3.0
# GNUstep GUI version required
GNUSTEP_CORE_VERSION=0.25.0
GNUSTEP_CORE_VERSION=0.30.0
# The version number of this release.
MAJOR_VERSION=1
MINOR_VERSION=2
SUBMINOR_VERSION=26
MINOR_VERSION=3
SUBMINOR_VERSION=0
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION}