mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Correct issues encoding as a NSCustomView. Now loads properly in IB.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@23250 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7a60003663
commit
91a2a62ea0
2 changed files with 30 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-08-11 01:53-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormCustomView.m: Corrected encoding issues with custom
|
||||
view in encodeWithCoder: it now properly encodes itself as
|
||||
an NSCustomView.
|
||||
|
||||
2006-08-09 02:29-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormCustomView.m: encodeWithCoder: changes to encode the
|
||||
|
|
|
@ -112,10 +112,30 @@
|
|||
{
|
||||
if([aCoder allowsKeyedCoding])
|
||||
{
|
||||
id cv = [[NSCustomView alloc] initWithFrame: [self frame]];
|
||||
[cv setAutoresizingMask: [self autoresizingMask]];
|
||||
[cv setClassName: className];
|
||||
[cv encodeWithCoder: aCoder];
|
||||
GormClassManager *classManager = [(id<Gorm>)NSApp classManager];
|
||||
NSString *extension = nil;
|
||||
|
||||
ASSIGNCOPY(extension,[classManager nonCustomSuperClassOf: className]);
|
||||
|
||||
[aCoder encodeObject: className forKey: @"NSClassName"];
|
||||
[aCoder encodeRect: [self frame] forKey: @"NSFrame"];
|
||||
|
||||
if(extension != nil)
|
||||
{
|
||||
[aCoder encodeObject: extension forKey: @"NSExtension"];
|
||||
}
|
||||
|
||||
if([self nextResponder] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self nextResponder] forKey: @"NSNextResponder"];
|
||||
}
|
||||
|
||||
if([self superview] != nil)
|
||||
{
|
||||
[aCoder encodeObject: [self superview] forKey: @"NSSuperview"];
|
||||
}
|
||||
|
||||
RELEASE(extension);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue