Thu Feb 18 1999 Felipe A. Rodriguez <farz@mindspring.com>

* NSView.m display: fix for display bug in buttons example
	* NSCell.m endEditing: fix for display bug in buttons example
	* NSTextField.m textShouldEndEditing: The changes to these three classes
    fix a display bug visible in the buttons example when the top text field is
    selected for editing and then asked to resign when the user clicks on say
    the bottom text field.  This causes a rect encompassing both views to be
    invalidated and displayed.  Beyond being inefficient this also causes a
    display glitch given the current drawing methodology.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3755 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Felipe A. Rodriguez 1999-02-18 10:46:39 +00:00
parent c064034852
commit ee210229a6
4 changed files with 54 additions and 18 deletions

View file

@ -384,8 +384,28 @@ id nextResponder;
- (BOOL)textShouldEndEditing:(NSText *)aTextObject // NSText(field editor)
{ // delegate method
[cell endEditing:aTextObject];
fprintf(stderr, " TextField textShouldEndEditing --- ");
if([cell isEntryAcceptable: [aTextObject text]])
{
// if([delegate respondsTo:control:textShouldEndEditing:]) // FIX ME
// {
// if(![delegate control:textShouldEndEditing:])
// {
// NSBeep();
// return NO;
// }
// else
// return YES;
// }
[cell endEditing:aTextObject];
}
else
{ // entry is not valid
NSBeep();
return NO;
}
[self display];
[window flushWindow];
return YES;
}