Fixed -encodeWithCoder: in NSView to encode the superview conditionally as Cocoa

does (Apple discusses  superview encoding as a use case for conditional encoding 
in the Archiving related documentation).

Note: A view can now be archived (or copied) without having to remove the view 
from its hierarchy before archiving it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36065 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
qmathe 2013-02-06 17:28:52 +00:00
parent ec16871d00
commit d50fcc77d9
2 changed files with 9 additions and 1 deletions

View file

@ -4566,7 +4566,7 @@ static NSView* findByTag(NSView *view, NSInteger aTag, NSUInteger *level)
//
if (([[self window] contentView] != self) && _super_view != nil)
{
[aCoder encodeObject: _super_view forKey: @"NSSuperview"];
[aCoder encodeConditionalObject: _super_view forKey: @"NSSuperview"];
}
}
else