Implemented endEditingFor:

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5172 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 1999-11-14 03:16:39 +00:00
parent 35f25ca47f
commit a09e30074b

View file

@ -494,6 +494,20 @@ static NSMapTable* windowmaps = NULL;
*/
- (void) endEditingFor: (id)anObject
{
NSText *t = [self fieldEditor: NO
forObject: anObject];
if (t && (first_responder == t))
{
[[NSNotificationCenter defaultCenter]
postNotificationName: NSTextDidEndEditingNotification
object: t];
[t setText: @""];
[t setDelegate: nil];
[t removeFromSuperview];
first_responder = self;
[first_responder becomeFirstResponder];
}
}
- (NSText *) fieldEditor: (BOOL)createFlag forObject: (id)anObject