mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:30:37 +00:00
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:
parent
ec16871d00
commit
d50fcc77d9
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue