* Headers/AppKit/NSController.h: Added new ivar.

* Headers/AppKit/NSObjectController.h: Added new ivar.
        * Source/GNUmakefile: Added NSManagedObjectContext.[hm].
        * Source/NSController.m: Add keys for nib encoding/decoding.
        * Source/NSObjectController.m: Add keys for nib encoding/decoding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25391 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2007-08-15 03:24:37 +00:00
parent 87163a8515
commit 6e1fd2e328
6 changed files with 103 additions and 7 deletions

View file

@ -26,20 +26,27 @@
*/
#include <Foundation/NSArray.h>
#include <Foundation/NSArchiver.h>
#include <Foundation/NSKeyedArchiver.h>
#include <AppKit/NSController.h>
@implementation NSController
- (id) init
{
_editors = [[NSMutableArray alloc] init];
if((self = [super init]) != nil)
{
_editors = [[NSMutableArray alloc] init];
_declared_keys = [[NSMutableArray alloc] init];
}
return self;
}
- (void) dealloc
{
RELEASE(_editors);
RELEASE(_declared_keys);
[super dealloc];
}
@ -50,7 +57,18 @@
- (id) initWithCoder: (NSCoder *)aDecoder
{
// TODO
if((self = [super init]) != nil)
{
if([aDecoder allowsKeyedCoding])
{
NSLog(@"%@-%@",self,[aDecoder keyMap]);
ASSIGN(_declared_keys,[aDecoder decodeObjectForKey: @"NSDeclaredKeys"]);
}
else
{
ASSIGN(_declared_keys,[aDecoder decodeObject]);
}
}
return self;
}