From 347b646c1d2ff2c39f665c0942dc042c5ee95932 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Tue, 4 Sep 2007 13:07:04 +0000 Subject: [PATCH] Add validation of editing for -objectValue and -attributedStringValue. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25449 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSActionCell.m | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index 025f3d788..180569ee1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-04 Fred Kiefer + + * Source/NSActionCell.m (-objectValue, -attributedStringValue): + Add validation of editing. + 2007-08-31 Fred Kiefer * Source/NSWindow.m (-makeFirstResponder:): When parameter is nil, diff --git a/Source/NSActionCell.m b/Source/NSActionCell.m index a33f074cb..77c80294f 100644 --- a/Source/NSActionCell.m +++ b/Source/NSActionCell.m @@ -141,6 +141,28 @@ static Class controlClass; * Manipulating NSActionCell Values */ +/** + * Retrieve the value of the receiver + */ +- (id)objectValue +{ + if (_control_view) + if ([_control_view isKindOfClass: controlClass]) + [(NSControl *)_control_view validateEditing]; + return [super objectValue]; +} + +/** + * Retrieve the value of the receiver as an NSAttributedString. + */ +- (NSAttributedString*)attributedStringValue +{ + if (_control_view) + if ([_control_view isKindOfClass: controlClass]) + [(NSControl *)_control_view validateEditing]; + return [super attributedStringValue]; +} + /** * Retrieve the value of the receiver as an NSString. */