mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 13:10:52 +00:00
Add flag for controlling recursive validation invocation loop
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35529 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3a023b859a
commit
317dfe3470
2 changed files with 13 additions and 1 deletions
|
@ -107,6 +107,11 @@ typedef enum _NSTableViewColumnAutoresizingStyle
|
|||
BOOL _verticalMotionDrag;
|
||||
NSArray *_sortDescriptors;
|
||||
|
||||
/*
|
||||
* Ivars Acting as Control...
|
||||
*/
|
||||
BOOL _isValidating;
|
||||
|
||||
/*
|
||||
* Ivars Acting as Cache
|
||||
*/
|
||||
|
|
|
@ -2007,6 +2007,7 @@ static void computeNewSelection
|
|||
|
||||
- (void) _initDefaults
|
||||
{
|
||||
_isValidating = NO;
|
||||
_drawsGrid = YES;
|
||||
_rowHeight = 16.0;
|
||||
_intercellSpacing = NSMakeSize (5.0, 2.0);
|
||||
|
@ -3207,13 +3208,16 @@ byExtendingSelection: (BOOL)flag
|
|||
|
||||
- (void) validateEditing
|
||||
{
|
||||
if (_textObject)
|
||||
if (_textObject && (_isValidating == NO))
|
||||
{
|
||||
NSFormatter *formatter;
|
||||
NSString *string;
|
||||
id newObjectValue = nil;
|
||||
BOOL validatedOK = YES;
|
||||
|
||||
// Avoid potential recursive sequences...
|
||||
_isValidating = YES;
|
||||
|
||||
formatter = [_editedCell formatter];
|
||||
string = AUTORELEASE([[_textObject text] copy]);
|
||||
|
||||
|
@ -3272,6 +3276,9 @@ byExtendingSelection: (BOOL)flag
|
|||
row: _editedRow];
|
||||
}
|
||||
}
|
||||
|
||||
// Avoid potential recursive sequences...
|
||||
_isValidating = NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue