In NSMenu compare target for identity not equality.

Decoding and encoding for NSWindowController.
Extend the responder chain of a window beyond itself.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26959 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-10-24 07:59:42 +00:00
parent 5a50f7ad69
commit 3b4cc1196a
4 changed files with 103 additions and 81 deletions

View file

@ -40,6 +40,14 @@
@implementation NSWindowController
+ (void) initialize
{
if (self == [NSWindowController class])
{
[self setVersion: 1];
}
}
- (id) initWithWindowNibName: (NSString *)windowNibName
{
return [self initWithWindowNibName: windowNibName owner: self];
@ -476,7 +484,16 @@
- (id) initWithCoder: (NSCoder *)coder
{
return [self init];
if ([coder versionForClassName: @"NSWindowController"] >= 1)
{
return [super initWithCoder: coder];
}
else
{
/* backward compatibility: old NSWindowController instances are not
subclasses of NSResponder, but of NSObject */
return [self init];
}
}
- (void) encodeWithCoder: (NSCoder *)coder
@ -484,6 +501,8 @@
// What are we supposed to encode? Window nib name? Or should these
// be empty, just to conform to NSCoding, so we do an -init on
// unarchival. ?
[super encodeWithCoder: coder];
}
@end