mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:00:37 +00:00
* Headers/AppKit/NSTableView.h: Add _isValidating
* Source/NSCell.m (+initialize): Expose title binding. * Source/NSOpenPanel.m (-runModal): Use _directory if it is set. * Source/NSTableView.m (-validateEditing): Check _isValidating to prevent recursive calls into validateEditing. * Source/NSTabView.m (-initWithCoder:): Set _selected_item to NSNotFound. * Source/NSView.m (-addSubview:): Do not throw an exception when adding a nil subview, just ignore it. This matches behavior on Cocoa. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35562 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3945e35d2c
commit
c06308b00a
7 changed files with 38 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue