mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 07:10:47 +00:00
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:
parent
d7de540dc4
commit
55f34d177a
1 changed files with 14 additions and 0 deletions
|
@ -494,6 +494,20 @@ static NSMapTable* windowmaps = NULL;
|
||||||
*/
|
*/
|
||||||
- (void) endEditingFor: (id)anObject
|
- (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
|
- (NSText *) fieldEditor: (BOOL)createFlag forObject: (id)anObject
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue