* Source/NSViewController.m: Retain the view.

* Source/NSOutline.m(-drawRow:clipRect:): The selected cell
        * shows
        its first responder state.
        Patch by Frank LeGrand <frank.legrand@testplant.com>



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36378 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-03-17 22:36:34 +00:00
parent 20dbc07afd
commit 0334fe3bca
3 changed files with 56 additions and 3 deletions

View file

@ -27,9 +27,11 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSKeyedArchiver.h>
#import <Foundation/NSString.h>
#import "AppKit/NSKeyValueBinding.h"
#import "AppKit/NSNib.h"
#import "AppKit/NSView.h"
#import "AppKit/NSViewController.h"
@ -60,7 +62,8 @@
DESTROY(_editors);
DESTROY(_autounbinder);
DESTROY(_designNibBundleIdentifier);
DESTROY(view);
[super dealloc];
}
@ -95,7 +98,10 @@
- (void)setView:(NSView *)aView
{
view = aView;
if (view != aView)
{
ASSIGN(view, aView);
}
}
- (void)loadView
@ -137,6 +143,42 @@
return _nibBundle;
}
- (id) initWithCoder: (NSCoder *)aDecoder
{
self = [super initWithCoder: aDecoder];
if (!self)
{
return nil;
}
if ([aDecoder allowsKeyedCoding])
{
NSView *aView = [aDecoder decodeObjectForKey: @"NSView"];
[self setView: aView];
}
else
{
NSView *aView;
[aDecoder decodeValueOfObjCType: @encode(id) at: &aView];
[self setView: aView];
}
return self;
}
- (void) encodeWithCoder: (NSCoder *)aCoder
{
[super encodeWithCoder: aCoder];
if ([aCoder allowsKeyedCoding])
{
[aCoder encodeObject: [self view] forKey: @"NSView"];
}
else
{
[aCoder encodeObject: [self view]];
}
}
@end
@implementation NSViewController (NSEditorRegistration)