Fix coding bugs etc.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14808 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-10-21 17:20:46 +00:00
parent 20247dac50
commit a19302360b
4 changed files with 15 additions and 11 deletions

View file

@ -1,7 +1,9 @@
2002-10-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSView.m: Key view code ... complete rewrite to match
MacOS-X implementation.
MacOS-X implementation. Fix coding bug in rewrite.
* Source/NSTextField.m: don't use _nextKeyView
* Source/NSMatrix.m: don't use _nextKeyView
Mon Oct 21 01:17:41 2002 Nicola Pero <n.pero@mi.flashnet.it>

View file

@ -1445,12 +1445,12 @@ static SEL getSel;
- (id) nextText
{
return _nextKeyView;
return [self nextKeyView];
}
- (id) previousText
{
return _previousKeyView;
return [self previousKeyView];
}
- (void) textDidBeginEditing: (NSNotification *)aNotification

View file

@ -171,12 +171,12 @@ static Class textFieldCellClass;
//
- (id) nextText
{
return _nextKeyView;
return [self nextKeyView];
}
- (id) previousText
{
return _previousKeyView;
return [self previousKeyView];
}
- (void) setNextText: (id)anObject

View file

@ -285,8 +285,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
_autoresizes_subviews = YES;
_autoresizingMask = NSViewNotSizable;
_coordinates_valid = NO;
_nextKeyView = nil;
_previousKeyView = nil;
_nextKeyView = 0;
_previousKeyView = 0;
_rFlags.flipped_view = [self isFlipped];
@ -3501,8 +3501,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_post_frame_changes];
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autoresizes_subviews];
[aCoder encodeValueOfObjCType: @encode(unsigned int) at: &_autoresizingMask];
[aCoder encodeConditionalObject: _nextKeyView];
[aCoder encodeConditionalObject: _previousKeyView];
[aCoder encodeConditionalObject: [self nextKeyView]];
[aCoder encodeConditionalObject: [self previousKeyView]];
[aCoder encodeObject: _sub_views];
NSDebugLLog(@"NSView", @"NSView: finish encoding\n");
}
@ -3512,6 +3512,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
NSRect rect;
NSEnumerator *e;
NSView *sub;
NSView *prev;
NSArray *subs;
self = [super initWithCoder: aDecoder];
@ -3549,8 +3550,9 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_autoresizes_subviews];
[aDecoder decodeValueOfObjCType: @encode(unsigned int)
at: &_autoresizingMask];
_nextKeyView = [aDecoder decodeObject];
_previousKeyView = [aDecoder decodeObject];
[self setNextKeyView: [aDecoder decodeObject]];
[[aDecoder decodeObject] setNextKeyView: self];
[aDecoder decodeValueOfObjCType: @encode(id) at: &subs];
e = [subs objectEnumerator];