_currentEditor from plasq's branch

This commit is contained in:
Christopher Lloyd 2012-04-20 23:08:11 -04:00
parent 628a3cfdc8
commit da37436be1
3 changed files with 8 additions and 10 deletions

View File

@ -878,9 +878,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
-(void)_fieldEditCell:(NSCell *)cell row:(int)row column:(int)column {
[self selectCell:cell];
_currentEditor=[[self window] fieldEditor:YES forObject:self];
_currentEditor=[cell setUpFieldEditorAttributes:_currentEditor];
[_currentEditor retain];
NSText *editor=[[self window] fieldEditor:YES forObject:self];
_currentEditor=[[cell setUpFieldEditorAttributes:editor] retain];
}
-(void)_selectTextCell:(NSCell *)cell {

View File

@ -741,10 +741,10 @@ _dataSource);
[_editingCell setBackgroundColor:_backgroundColor];
NSText *oldEditor = _currentEditor;
_currentEditor=[[self window] fieldEditor:YES forObject:self];
_currentEditor=[_editingCell setUpFieldEditorAttributes:_currentEditor];
[_currentEditor retain];
[oldEditor release];
NSText *editor=[[self window] fieldEditor:YES forObject:self];
_currentEditor=[[_editingCell setUpFieldEditorAttributes:editor] retain];
[oldEditor release];
if (select == YES)
[_editingCell selectWithFrame:_editingFrame inView:self editor:_currentEditor delegate:self start:0 length:[[_editingCell stringValue] length]];

View File

@ -212,9 +212,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
else {
if([cell isEditable] || [cell isSelectable]){
if(_currentEditor==nil){
_currentEditor=[[self window] fieldEditor:YES forObject:self];
_currentEditor=[cell setUpFieldEditorAttributes:_currentEditor];
[_currentEditor retain];
NSText *editor=[[self window] fieldEditor:YES forObject:self];
_currentEditor=[[cell setUpFieldEditorAttributes:editor] retain];
}
[cell editWithFrame:[self bounds] inView:self editor:_currentEditor delegate:self event:event];