iMinor bugfix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3684 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-02-10 15:09:51 +00:00
parent 289e8029d1
commit d181ea9940
2 changed files with 33 additions and 15 deletions

View file

@ -1,6 +1,8 @@
Wed Feb 10 12:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSClipView.m: Tidy flip-view errors by Benhur
* Source/NSText.m: Lock focus around drawing insertion point while
becoming/resiging first responder.
Wed Feb 10 10:32:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>

View file

@ -1548,22 +1548,38 @@ NSLog(@"keycode:%x",keyCode);
else return NO;
}
-(BOOL) resignFirstResponder
{ if([self shouldDrawInsertionPoint])
{ [self drawInsertionPointAtIndex:[self selectedRange].location color:nil turnedOn:NO];
//<!> stop timed entry
}
if([self isEditable])
return [self textShouldEndEditing:(NSText*)self];
return YES;
- (BOOL) resignFirstResponder
{
if ([self shouldDrawInsertionPoint])
{
[self lockFocus];
[self drawInsertionPointAtIndex: [self selectedRange].location
color: nil
turnedOn: NO];
[self unlockFocus];
//<!> stop timed entry
}
if ([self isEditable])
return [self textShouldEndEditing: self];
else
return YES;
}
-(BOOL) becomeFirstResponder
{ if([self shouldDrawInsertionPoint])
{ [self drawInsertionPointAtIndex:[self selectedRange].location color:[NSColor blackColor] turnedOn:YES];
//<!> restart timed entry
}
if([self isEditable] && [self textShouldBeginEditing:(NSText*)self]) return YES;
else return NO;
- (BOOL) becomeFirstResponder
{
if ([self shouldDrawInsertionPoint])
{
[self lockFocus];
[self drawInsertionPointAtIndex: [self selectedRange].location
color: [NSColor blackColor]
turnedOn: YES];
[self unlockFocus];
//<!> restart timed entry
}
if ([self isEditable] && [self textShouldBeginEditing: self])
return YES;
else
return NO;
}
//