Fixed: shouldSelectRow was called with selectionIndexesForProposedSelection

Previously the method shouldSelectRow was called even it's the method selectionIndexesForProposedSelection was implemented by the delegate. Now it works as in Cocoa.
The method selectionIndexesForProposedSelection is called when it has to be called, like in Cocoa.
This PR adds new methods to check and call the delegate/datasource methods more easily

Test app in Tests/Manual/TableTest/DelegateSelectionTest/
This commit is contained in:
Alexandre Wilhelm
2013-10-17 14:26:19 -07:00
parent 406a049380
commit 4b8a6ee674
5 changed files with 847 additions and 185 deletions
+1 -1
View File
@@ -382,7 +382,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
_mouseDownLocation = currentLocation;
_activeColumn = columnIndex;
[_tableView _sendDelegateDidMouseDownInHeader:columnIndex];
[_tableView _mouseDownInHeaderOfTableColumn:columnIndex];
if (shouldResize)
[self startResizingTableColumn:columnIndex at:currentLocation];
+556 -176
View File
@@ -1072,23 +1072,6 @@ NOT YET IMPLEMENTED
[self reloadDataForRowIndexes:_exposedRows columnIndexes:[CPIndexSet indexSetWithIndex:[_tableColumns indexOfObject:previouslyDraggedColumn]]];
}
/*
@ignore
Returns YES if the column at columnIndex can be reordered.
It can be possible if column reordering is allowed and if the tableview
delegate also accept the reordering
*/
- (BOOL)_shouldReorderColumn:(int)columnIndex toColumn:(int)newColumnIndex
{
if ([self allowsColumnReordering] &&
_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldReorderColumn_toColumn_)
{
return [_delegate tableView:self shouldReorderColumn:columnIndex toColumn:newColumnIndex];
}
return [self allowsColumnReordering];
}
/*
@ignore
Same as moveColumn:toColumn: but doesn't trigger an autosave
@@ -1520,8 +1503,7 @@ NOT YET IMPLEMENTED
{
if (_allowsMultipleSelection)
{
if (_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_ &&
![_delegate selectionShouldChangeInTableView:self])
if (![self _selectionShouldChangeInTableView])
return;
if ([[self selectedColumnIndexes] count])
@@ -1535,8 +1517,7 @@ NOT YET IMPLEMENTED
{
if ([self allowsEmptySelection])
{
if (_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_ &&
![_delegate selectionShouldChangeInTableView:self])
if (![self _selectionShouldChangeInTableView])
return;
[self deselectAll];
@@ -1568,13 +1549,17 @@ NOT YET IMPLEMENTED
_numberOfRows = [[destination valueForKeyPath:keyPath] count];
}
else if (_dataSource && (_implementedDataSourceMethods & CPTableViewDataSource_numberOfRowsInTableView_))
_numberOfRows = [_dataSource numberOfRowsInTableView:self] || 0;
else
{
if (_dataSource)
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement numberOfRowsInTableView:");
_numberOfRows = 0;
_numberOfRows = [self _numberOfRowsInTableView];
if (!_numberOfRows)
{
if (_dataSource && ![self _dataSourceRespondsToNumberOfRowsinTableView])
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement numberOfRowsInTableView:");
_numberOfRows = 0;
}
}
return _numberOfRows;
@@ -2429,7 +2414,7 @@ NOT YET IMPLEMENTED
var height;
if ([anIndexSet containsIndex:i])
height = [_delegate tableView:self heightOfRow:i];
height = [self _heightOfRow:i];
else
height = _cachedRowHeights[i].height || _rowHeight; // in case the cache entry is empty
@@ -2917,55 +2902,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
return _delegate;
}
/*!
@ignore
*/
- (void)_sendDelegateDidClickColumn:(int)column
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_didClickTableColumn_)
[_delegate tableView:self didClickTableColumn:_tableColumns[column]];
}
/*!
@ignore
*/
- (void)_sendDelegateDidDragColumn:(int)column
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_didDragTableColumn_)
[_delegate tableView:self didDragTableColumn:_tableColumns[column]];
}
- (void)_sendDelegateDidMouseDownInHeader:(int)column
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_mouseDownInHeaderOfTableColumn_)
[_delegate tableView:self mouseDownInHeaderOfTableColumn:_tableColumns[column]];
}
/*
@ignore
*/
- (BOOL)_sendDelegateDeleteKeyPressed
{
if ([_delegate respondsToSelector: @selector(tableViewDeleteKeyPressed:)])
{
[_delegate tableViewDeleteKeyPressed:self];
return YES;
}
return NO;
}
/*!
@ignore
*/
- (void)_sendDataSourceSortDescriptorsDidChange:(CPArray)oldDescriptors
{
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_sortDescriptorsDidChange_)
[_dataSource tableView:self sortDescriptorsDidChange:oldDescriptors];
}
/*!
@ignore
*/
@@ -2975,7 +2911,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (_allowsColumnSelection)
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_) || [_delegate selectionShouldChangeInTableView:self])
if ([self _selectionShouldChangeInTableView])
{
[self _noteSelectionIsChanging];
if (modifierFlags & CPPlatformActionKeyMask)
@@ -3003,7 +2939,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
}
}
[self _sendDelegateDidClickColumn:clickedColumn];
[self _didClickTableColumn:clickedColumn];
}
// From GNUSTEP
@@ -3370,7 +3306,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[self setIndicatorImage:nil inTableColumn:oldColumn];
[self setIndicatorImage:image inTableColumn:newColumn];
[self _sendDataSourceSortDescriptorsDidChange:oldSortDescriptors];
[self _sortDescriptorsDidChange:oldSortDescriptors];
var binderClass = [[self class] _binderClassForBinding:@"sortDescriptors"];
[[binderClass getBinding:@"sortDescriptors" forObject:self] reverseSetValueFor:@"sortDescriptors"];
@@ -3384,21 +3320,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
return _sortDescriptors;
}
- (BOOL)_dataSourceRespondsToObjectValueForTableColumn
{
return _implementedDataSourceMethods & CPTableViewDataSource_tableView_objectValueForTableColumn_row_;
}
- (BOOL)_delegateRespondsToDataViewForTableColumn
{
return _implementedDelegateMethods & CPTableViewDelegate_tableView_dataViewForTableColumn_row_;
}
- (BOOL)_delegateRespondsToViewForTableColumn
{
return _implementedDelegateMethods & CPTableViewDelegate_tableView_viewForTableColumn_row_;
}
/*!
@ignore
*/
@@ -3420,7 +3341,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
{
if ([self _dataSourceRespondsToObjectValueForTableColumn])
{
objectValue = [_dataSource tableView:self objectValueForTableColumn:aTableColumn row:aRowIndex];
objectValue = [self _dataSourceObjectValueForTableColumn:aTableColumn row:aRowIndex];
tableColumnObjectValues[aRowIndex] = objectValue;
}
else if (!_isViewBased && ![self infoForBinding:@"content"])
@@ -3636,25 +3557,39 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
else
[dataView unsetThemeState:CPThemeStateSelectedDataView];
// FIX ME: for performance reasons we might consider diverging from cocoa and moving this to the reloadData method
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_isGroupRow_)
{
if ([_delegate tableView:self isGroupRow:row])
{
[_groupRows addIndex:row];
[dataView setThemeState:CPThemeStateGroupRow];
}
else
{
[_groupRows removeIndexesInRange:CPMakeRange(row, 1)];
[dataView unsetThemeState:CPThemeStateGroupRow];
}
[self setNeedsDisplay:YES];
if ([self _isGroupRow:row])
{
[_groupRows addIndex:row];
[dataView setThemeState:CPThemeStateGroupRow];
}
else
{
[_groupRows removeIndexesInRange:CPMakeRange(row, 1)];
[dataView unsetThemeState:CPThemeStateGroupRow];
}
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_)
[_delegate tableView:self willDisplayView:dataView forTableColumn:tableColumn row:row];
[self setNeedsDisplay:YES];
// // FIX ME: for performance reasons we might consider diverging from cocoa and moving this to the reloadData method
// if (_implementedDelegateMethods & CPTableViewDelegate_tableView_isGroupRow_)
// {
// if ([_delegate tableView:self isGroupRow:row])
// {
// [_groupRows addIndex:row];
// [dataView setThemeState:CPThemeStateGroupRow];
// }
// else
// {
// [_groupRows removeIndexesInRange:CPMakeRange(row, 1)];
// [dataView unsetThemeState:CPThemeStateGroupRow];
// }
//
// [self setNeedsDisplay:YES];
// }
[self _willDisplayView:dataView forTableColumn:tableColumn row:row];
if ([dataView superview] !== self)
[self addSubview:dataView];
@@ -3692,7 +3627,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
- (void)_setObjectValueForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRow forView:(CPView)aDataView
{
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_objectValueForTableColumn_row_)
if ([self _dataSourceRespondsToObjectValueForTableColumn])
[aDataView setObjectValue:[self _objectValueForTableColumn:aTableColumn row:aRow]];
// This gives the table column an opportunity to apply its bindings.
@@ -3767,8 +3702,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
_editingCellIndex = nil;
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_)
[_dataSource tableView:self setObjectValue:[sender objectValue] forTableColumn:sender.tableViewEditedColumnObj row:sender.tableViewEditedRowIndex];
[self _setObjectValue:[sender objectValue] forTableColumn:sender.tableViewEditedColumnObj row:sender.tableViewEditedRowIndex];
// Allow the column binding to do a reverse set. Note that we do this even if the data source method above
// is implemented.
@@ -3811,19 +3745,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
_editingCellIndex = nil;
}
/*!
@ignore
*/
- (CPView)_viewForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRow
{
return [_delegate tableView:self viewForTableColumn:aTableColumn row:aRow];
}
- (CPView)_dataViewForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRow
{
return [_delegate tableView:self dataViewForTableColumn:aTableColumn row:aRow];
}
/*!
@ignore
*/
@@ -4525,10 +4446,13 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
// If the user clicks outside a row then deselect everything.
if (row < 0 && _allowsEmptySelection)
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_) || [_delegate selectionShouldChangeInTableView:self])
if ([self _selectionShouldChangeInTableView])
{
var indexSet = [self _selectionIndexesForProposedSelection:[CPIndexSet indexSet]],
extend = [self allowsMultipleSelection];
[self _noteSelectionIsChanging];
[self selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO];
[self selectRowIndexes:indexSet byExtendingSelection:extend];
}
}
@@ -4542,12 +4466,12 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
_startTrackingPoint = aPoint;
_startTrackingTimestamp = new Date();
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_)
if ([self _dataSourceRespondsToSetObjectValueForTableColumnRow])
_trackingPointMovedOutOfClickSlop = NO;
// if the table has drag support then we use mouseUp to select a single row.
// otherwise it uses mouse down.
if (row >= 0 && !(_implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_))
if (row >= 0 && !([self _dataSourceRespondsToWriteRowsWithIndexesToPasteboard]))
[self _updateSelectionWithMouseAtRow:row];
return YES;
@@ -4558,15 +4482,12 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
*/
- (CPMenu)menuForEvent:(CPEvent)theEvent
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableViewMenuForTableColumn_Row_))
return [super menuForEvent:theEvent];
var location = [self convertPoint:[theEvent locationInWindow] fromView:nil],
row = [self rowAtPoint:location],
column = [self columnAtPoint:location],
tableColumn = [[self tableColumns] objectAtIndex:column];
return [_delegate tableView:self menuForTableColumn:tableColumn row:row];
return [self _menuForTableColumn:tableColumn row:row event:theEvent];
}
/*
@@ -4593,7 +4514,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
// begin the drag is the datasource lets us, we've move at least +-3px vertical or horizontal,
// or we're dragging from selected rows and we haven't begun a drag session
if (!_isSelectingSession && _implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_)
if (!_isSelectingSession && [self _dataSourceRespondsToWriteRowsWithIndexesToPasteboard])
{
if (row >= 0 && (ABS(_startTrackingPoint.x - aPoint.x) > 3 || (_verticalMotionCanDrag && ABS(_startTrackingPoint.y - aPoint.y) > 3)) ||
([_selectedRowIndexes containsIndex:row]))
@@ -4606,7 +4527,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
//ask the datasource for the data
var pboard = [CPPasteboard pasteboardWithName:CPDragPboard];
if ([self canDragRowsWithIndexes:_draggedRowIndexes atPoint:aPoint] && [_dataSource tableView:self writeRowsWithIndexes:_draggedRowIndexes toPasteboard:pboard])
if ([self canDragRowsWithIndexes:_draggedRowIndexes atPoint:aPoint] && [self _writeRowsWithIndexes:_draggedRowIndexes toPasteboard:pboard])
{
var currentEvent = [CPApp currentEvent],
offset = CGPointMakeZero(),
@@ -4652,7 +4573,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[self _updateSelectionWithMouseAtRow:row];
}
if ((_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_)
if ([self _dataSourceRespondsToSetObjectValueForTableColumnRow]
&& !_trackingPointMovedOutOfClickSlop)
{
var CLICK_SPACE_DELTA = 5.0; // Stolen from AppKit/Platform/DOM/CPPlatformWindow+DOM.j
@@ -4679,7 +4600,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
rowIndex,
shouldEdit = YES;
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_)
if ([self _dataSourceRespondsToWriteRowsWithIndexesToPasteboard])
{
rowIndex = [self rowAtPoint:aPoint];
@@ -4700,7 +4621,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (!_isViewBased && mouseIsUp
&& !_trackingPointMovedOutOfClickSlop
&& ([[CPApp currentEvent] clickCount] > 1)
&& ((_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_)
&& ([self _dataSourceRespondsToSetObjectValueForTableColumnRow]
|| [self infoForBinding:@"content"]))
{
columnIndex = [self columnAtPoint:lastPoint];
@@ -4715,9 +4636,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (rowIndex !== -1)
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldEditTableColumn_row_)
shouldEdit = [_delegate tableView:self shouldEditTableColumn:column row:rowIndex];
if (shouldEdit)
if ([self _shouldEditTableColumn:column row:rowIndex])
{
[self editColumn:columnIndex row:rowIndex withEvent:nil select:YES];
return;
@@ -4846,17 +4765,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
return row;
}
/*!
@ignore
*/
- (void)_validateDrop:(id)info proposedRow:(CPInteger)row proposedDropOperation:(CPTableViewDropOperation)dropOperation
{
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_)
return [_dataSource tableView:self validateDrop:info proposedRow:row proposedDropOperation:dropOperation];
return CPDragOperationNone;
}
/*!
@ignore
*/
@@ -4931,7 +4839,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
// actual validation is called in draggingUpdated:
[_dropOperationFeedbackView removeFromSuperview];
return (_implementedDataSourceMethods & CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_);
return [self _dataSourceRespondsToValidateDropProposedRowProposedDropOperation];
}
/*
@@ -4946,7 +4854,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (row === nil)
var row = [self _proposedRowAtPoint:location];
return [_dataSource tableView:self acceptDrop:sender row:row dropOperation:operation];
return [self _acceptDrop:sender row:row dropOperation:operation];
}
/*
@@ -4957,15 +4865,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[self reloadData];
}
/*
This method is sent to the data source for convenience...
*/
- (void)draggedImage:(CPImage)anImage endedAt:(CGPoint)aLocation operation:(CPDragOperation)anOperation
{
if ([_dataSource respondsToSelector:@selector(tableView:didEndDraggedImage:atPosition:operation:)])
[_dataSource tableView:self didEndDraggedImage:anImage atPosition:aLocation operation:anOperation];
}
/*
@ignore
We're using this because we drag views instead of images so we can get the rows themselves to actually drag.
@@ -5034,14 +4933,12 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if ([newSelection isEqualToIndexSet:_selectedRowIndexes])
return;
if (_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_ &&
![_delegate selectionShouldChangeInTableView:self])
if (![self _selectionShouldChangeInTableView])
return;
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_)
newSelection = [_delegate tableView:self selectionIndexesForProposedSelection:newSelection];
newSelection = [self _selectionIndexesForProposedSelection:newSelection];
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectRow_)
if (![self _delegateRespondsToSelectionIndexesForProposedSelection] && [self _delegateRespondsToShouldSelectRow])
{
var indexArray = [];
@@ -5053,7 +4950,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
{
var index = indexArray[indexCount];
if (![_delegate tableView:self shouldSelectRow:index])
if (![self _shouldSelectRow:index])
[newSelection removeIndex:index];
}
@@ -5251,7 +5148,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
else if (character === CPDeleteCharacter || character === CPDeleteFunctionKey)
{
// Don't call super if the delegate is interested in the delete key
if ([self _sendDelegateDeleteKeyPressed])
if ([self _deleteKeyPressed])
return;
}
@@ -5275,8 +5172,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
*/
- (void)_moveSelectionWithEvent:(CPEvent)theEvent upward:(BOOL)shouldGoUpward
{
if (_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_ && ![_delegate selectionShouldChangeInTableView:self])
if (![self _selectionShouldChangeInTableView])
return;
var selectedIndexes = [self selectedRowIndexes];
if ([selectedIndexes count] > 0)
@@ -5313,9 +5211,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (i >= [self numberOfRows] || i < 0)
return;
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectRow_)
if (![self _delegateRespondsToSelectionIndexesForProposedSelection] && [self _delegateRespondsToShouldSelectRow])
{
var shouldSelect = [_delegate tableView:self shouldSelectRow:i];
var shouldSelect = [self _shouldSelectRow:i];
/* If shouldSelect returns NO it means this row cannot be selected.
The proper behaviour is to then try to see if the next/previous
@@ -5324,7 +5222,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
while (!shouldSelect && (i < [self numberOfRows] && i > 0))
{
shouldGoUpward ? --i : ++i; //check to see if the row can be selected. If it can't be then see if the next row can be selected.
shouldSelect = [_delegate tableView:self shouldSelectRow:i];
shouldSelect = [self _shouldSelectRow:i];
}
if (!shouldSelect)
@@ -5362,6 +5260,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
var differedLastSelectedRow = i;
}
selectedIndexes = [self _selectionIndexesForProposedSelection:selectedIndexes];
[self selectRowIndexes:selectedIndexes byExtendingSelection:extend];
// we differ because selectRowIndexes: does its own thing which would set the wrong index
@@ -5374,6 +5274,486 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
@end
@implementation CPTableView (TableViewDataSource)
/*!
@ignore
Return YES if the dataSource implements tableView:objectValueForTableColumn:row
*/
- (BOOL)_dataSourceRespondsToObjectValueForTableColumn
{
return _implementedDataSourceMethods & CPTableViewDataSource_tableView_objectValueForTableColumn_row_;
}
/*!
@ignore
Return YES if the dataSource implements tableView:writeRowsWithIndexes:toPasteboard:
*/
- (BOOL)_dataSourceRespondsToWriteRowsWithIndexesToPasteboard
{
return _implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_;
}
/*!
@ignore
Return YES if the dataSource implements tableView:setObjectValue:forTableColumn:row:
*/
- (BOOL)_dataSourceRespondsToSetObjectValueForTableColumnRow
{
return CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_;
}
/*!
@ignore
Return YES if the dataSource implements tableView:validateDrop:proposedRow:proposedDropOperation:;
*/
- (BOOL)_dataSourceRespondsToValidateDropProposedRowProposedDropOperation
{
return _implementedDataSourceMethods & CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_;
}
/*!
@ignore
Return YES if the dataSource implements numberOfRowsInTableView
*/
- (BOOL)_dataSourceRespondsToNumberOfRowsinTableView
{
return _implementedDataSourceMethods & CPTableViewDataSource_numberOfRowsInTableView_;
}
/*!
@ignore
Return the number of rows of the tableView
By default return 0.
*/
- (int)_numberOfRowsInTableView
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_numberOfRowsInTableView_))
return 0;
return [_dataSource numberOfRowsInTableView:self];
}
/*!
@ignore
Return the objectValue for the given column and row.
By default return nil.
*/
- (id)_dataSourceObjectValueForTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_objectValueForTableColumn_row_))
return nil;
return [_dataSource tableView:self objectValueForTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Call the method tableView:setObjectValue:ForTableColum:row: of the dataSource
*/
- (void)_setObjectValue:(id)anObject forTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_))
return;
[_dataSource tableView:self setObjectValue:anObject forTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Call the method tableView:sortDescriptorsDidChange: of the dataSource
*/
- (void)_sortDescriptorsDidChange:(CPArray)descriptors
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_sortDescriptorsDidChange_))
return;
[_dataSource tableView:self sortDescriptorsDidChange:descriptors];
}
/*!
@ignore
Return if the drop is accepted or not for the given dropOperation, info and row. By default return NO.
*/
- (BOOL)_acceptDrop:(id)info row:(int)aRowIndex dropOperation:(CPTableViewDropOperation)operation
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_acceptDrop_row_dropOperation_))
return NO;
return [_dataSource tableView:self acceptDrop:info row:aRowIndex dropOperation:operation];
}
/*!
@ignore
Return the dragOperation for the given row and dropOperation. By default return CPDragOperationNone.
*/
- (CPDragOperation)_validateDrop:(id)info proposedRow:(int)aRowIndex proposedDropOperation:(CPTableViewDropOperation)operation
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_))
return CPDragOperationNone;
return [_dataSource tableView:self validateDrop:info proposedRow:aRowIndex proposedDropOperation:operation];
}
/*!
@ignore
Return a boolean for writeRowsWithIndexes:toPasteroard for the given pasteboard and row. By default return NO
*/
- (BOOL)_writeRowsWithIndexes:(CPIndexSet)rowIndexes toPasteboard:(CPPasteboard)pboard
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_))
return NO;
return [_dataSource tableView:self writeRowsWithIndexes:rowIndexes toPasteboard:pboard];
}
/*
This method is sent to the data source for convenience...
*/
- (void)draggedImage:(CPImage)anImage endedAt:(CGPoint)aLocation operation:(CPDragOperation)anOperation
{
if ([_dataSource respondsToSelector:@selector(tableView:didEndDraggedImage:atPosition:operation:)])
[_dataSource tableView:self didEndDraggedImage:anImage atPosition:aLocation operation:anOperation];
}
#pragma mark -
#pragma mark DataSource methods to implement
/*!
@ignore
Not yet implemented
*/
- (CPArray)_namesOfPromisedFilesDroppedAtDestination:(CPURL)dropDestination forDraggedRowsWithIndexes:(CPIndexSet)indexSet
{
if (!(_implementedDataSourceMethods & CPTableViewDataSource_tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_))
return [];
return [_dataSource tableView:self namesOfPromisedFilesDroppedAtDestination:dropDestination forDraggedRowsWithIndexes:indexSet];
}
@end
@implementation CPTableView (TableViewDelegate)
/*!
@ignore
Return YES if the delegate implements tableView:dataViewFortableColumn:row:
*/
- (BOOL)_delegateRespondsToDataViewForTableColumn
{
return _implementedDelegateMethods & CPTableViewDelegate_tableView_dataViewForTableColumn_row_;
}
/*!
@ignore
Return YES if the delegate implements tableView:viewFortableColumn:row:
*/
- (BOOL)_delegateRespondsToViewForTableColumn
{
return _implementedDelegateMethods & CPTableViewDelegate_tableView_viewForTableColumn_row_;
}
/*!
@ignore
Return YES if the delegate implements tableView:shouldSelectRow:
*/
- (BOOL)_delegateRespondsToShouldSelectRow
{
return _implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectRow_;
}
/*!
@ignore
Return YES if the delegate implements tableView:selectionShouldChangeInTableView
*/
- (BOOL)_delegateRespondsToSelectionShouldChangeInTableView
{
return _implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_;
}
/*!
@ignore
Return YES if the delegate implements tableView:selectionIndexesForProposedSelection
*/
- (BOOL)_delegateRespondsToSelectionIndexesForProposedSelection
{
return _implementedDelegateMethods & CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_;
}
/*!
@ignore
Call the delegate didClickTableColumn with the given tableColumn
*/
- (void)_didClickTableColumn:(int)column
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_didClickTableColumn_)
[_delegate tableView:self didClickTableColumn:_tableColumns[column]];
}
/*!
@ignore
Call the delegate didDragTableColumn with the given tableColumn
*/
- (void)_didDragTableColumn:(int)column
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_didDragTableColumn_)
[_delegate tableView:self didDragTableColumn:_tableColumns[column]];
}
/*!
@ignore
Call the delegate mouseDownInHeaderOfTableColumn with the given tableColumn
*/
- (void)_mouseDownInHeaderOfTableColumn:(int)column
{
if (_implementedDelegateMethods & CPTableViewDelegate_tableView_mouseDownInHeaderOfTableColumn_)
[_delegate tableView:self mouseDownInHeaderOfTableColumn:_tableColumns[column]];
}
/*
@ignore
Call the delegate tableViewDeleteKeyPressed
*/
- (BOOL)_deleteKeyPressed
{
if ([_delegate respondsToSelector: @selector(tableViewDeleteKeyPressed:)])
{
[_delegate tableViewDeleteKeyPressed:self];
return YES;
}
return NO;
}
/*!
@ignore
Return if the selection should change. By default return YES
*/
- (BOOL)_selectionShouldChangeInTableView
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_))
return YES;
return [_delegate selectionShouldChangeInTableView:self];
}
/*!
@ignore
Return if the given row is a group or not. By default return NO.
*/
- (BOOL)_isGroupRow:(int)anIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_isGroupRow_))
return NO;
return [_delegate tableView:self isGroupRow:anIndex];
}
/*!
@ignore
Return is we should select the given row. By Default return YES
*/
- (BOOL)_shouldSelectRow:(int)anIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectRow_))
return YES;
return [_delegate tableView:self shouldSelectRow:anIndex];
}
/*!
@ignore
Call the delegate tableView:willDisplayView:forTableColumn:row:
*/
- (void)_willDisplayView:(id)aCell forTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_))
return;
[_delegate tableView:self willDisplayView:aCell forTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Return a CPMenu for the given tableColumn and row. By default return the menu of super.
*/
- (CPMenu)_menuForTableColumn:(CPTableColumn)aTableColumn row:aRowIndex event:(CPEvent)anEvent
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableViewMenuForTableColumn_Row_))
return [super menuForEvent:anEvent]
return [_delegate tableView:self menuForTableColumn:aTableColumn row:aRowIndex];
}
/*
@ignore
Returns YES if the column at columnIndex can be reordered.
It can be possible if column reordering is allowed and if the tableview
delegate also accept the reordering
*/
- (BOOL)_shouldReorderColumn:(int)columnIndex toColumn:(int)newColumnIndex
{
if ([self allowsColumnReordering] &&
_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldReorderColumn_toColumn_)
{
return [_delegate tableView:self shouldReorderColumn:columnIndex toColumn:newColumnIndex];
}
return [self allowsColumnReordering];
}
/*!
@ignore
Return the height of the given row. By default return [self rowHeight].
*/
- (float)_heightOfRow:(int)anIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_heightOfRow_))
return [self rowHeight];
return [_delegate tableView:self heightOfRow:anIndex];
}
/*!
@ignore
Return a boolean to know if we should or not edit the given row. By default return YES.
*/
- (BOOL)_shouldEditTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldEditTableColumn_row_))
return YES;
return [_delegate tableView:self shouldEditTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Return a new CPIndexSet instead of the proposedSelection. By default return the proposedSelection.
*/
- (CPIndexSet)_selectionIndexesForProposedSelection:(CPIndexSet)anIndexSet
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_))
return anIndexSet;
return [_delegate tableView:self selectionIndexesForProposedSelection:anIndexSet];
}
/*!
@ignore
Return a view for the given tableColumn and row. By default return nil.
*/
- (CPView)_viewForTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_viewForTableColumn_row_))
return nil;
return [_delegate tableView:self viewForTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Return a view for the given tableColumn and row. By default return nil.
*/
- (CPView)_dataViewForTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_dataViewForTableColumn_row_))
return nil;
return [_delegate tableView:self dataViewForTableColumn:aTableColumn row:aRowIndex];
}
#pragma mark -
#pragma mark Delegate methods to implement
/*!
@ignore
Not yet implemented !
*/
- (BOOL)_shouldSelectTableColumn:(CPTableColumn)aTableColumn
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectTableColumn_))
return YES;
return [_delegate tableView:self shouldSelectTableColumn:aTableColumn];
}
/*!
@ignore
Not yet implemented
*/
- (CPString)_toolTipForView:(id)aView rect:(CGRect)aRect tableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex mouseLocation:(CGPoint)aPoint
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_))
return nil;
return [_delegate tableView:self toolTipForView:aView rect:aRect tableColumn:aTableColumn row:aRowIndex mouseLocation:aPoint];
}
/*!
@ignore
Not yet implemented
*/
- (BOOL)_shouldTrackView:(id)aView forTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldTrackView_forTableColumn_row_))
return YES;
return [_delegate tableView:self shouldTrackView:aView forTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Not yet implemented
*/
- (BOOL)_shouldShowViewExpansionForTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldShowViewExpansionForTableColumn_row_))
return YES;
return [_delegate tableView:self shouldShowViewExpansionForTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Not yet implemented
*/
- (BOOL)_shouldTypeSelectForEvent:(CPEvent)anEvent withCurrentSearchString:(CPString)aString
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldTypeSelectForEvent_withCurrentSearchString_))
return NO;
return [_delegate tableView:self shouldTypeSelectForEvent:anEvent withCurrentSearchString:aString];
}
/*!
@ignore
Not yet implemented
*/
- (CPString)_typeSelectStringForTableColumn:(CPTableColumn)aTableColumn row:(int)aRowIndex
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_typeSelectStringForTableColumn_row_))
return nil;
return [_delegate tableView:self typeSelectStringForTableColumn:aTableColumn row:aRowIndex];
}
/*!
@ignore
Not yet implemented !
*/
- (int)_nextTypeSelectMatchFromRow:(int)aRowIndex toRow:(int)aSecondRowIndex forString:(CPString)aString
{
if (!(_implementedDelegateMethods & CPTableViewDelegate_tableView_nextTypeSelectMatchFromRow_toRow_forString_))
return -1;
return [_delegate tableView:self nextTypeSelectMatchFromRow:aRowIndex toRow:aSecondRowIndex forString:aString];
}
@end
@implementation CPTableView (Bindings)
+ (Class)_binderClassForBinding:(CPString)aBinding
@@ -16,6 +16,7 @@
@outlet CPWindow theWindow;
@outlet CPTableView tableView;
@outlet CPTableView secondTableView;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
@@ -30,8 +31,12 @@
// You can implement this method on any object instantiated from a Cib.
// It's a useful hook for setting up current UI values, and other things.
_names = [@"Alexandre Wilhelm", @"Alexander Ljungberg", @"Antoine Mercadal", @"Aparajita Fishman"];
[tableView setAllowsMultipleSelection:YES];
[tableView reloadData];
[secondTableView setDelegate:[DelegateSecondTableView new]];
[secondTableView reloadData];
// In this case, we want the window from Cib to become our full browser window
[theWindow setFullPlatformWindow:YES];
}
@@ -74,3 +79,50 @@
}
@end
@implementation DelegateSecondTableView : CPObject
{
}
- (id)init
{
if (self = [super init])
{
}
return self;
}
- (CPIndexSet)tableView:(CPTableView)tableView selectionIndexesForProposedSelection:(CPIndexSet)proposedSelectionIndexes
{
console.log(@"selectionIndexesForProposedSelection")
return proposedSelectionIndexes;
}
- (void)tableViewSelectionDidChange:(CPNotification)aNotification
{
console.log(@"tableViewSelectionDidChange")
}
- (BOOL)selectionShouldChangeInTableView:(CPTableView)aTableView
{
console.log(@"selectionShouldChangeInTableView")
return YES;
}
- (BOOL)tableView:(CPTableView)aTableView shouldSelectRow:(int)rowIndex
{
console.log(@"shouldSelectRow");
return YES;
}
- (void)tableViewSelectionIsChanging:(CPNotification)aNotification
{
console.log(@"tableViewSelectionIsChanging");
}
- (void)tableView:(CPTableView)tableView didClickTableColumn:(CPTableColumn)tableColumn;
{
console.log(@"didClickTableColumn");
}
@end
File diff suppressed because one or more lines are too long
@@ -280,14 +280,14 @@
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="1038" height="360"/>
<rect key="contentRect" x="335" y="390" width="1038" height="739"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="1038" height="360"/>
<rect key="frame" x="0.0" y="0.0" width="1038" height="739"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="tfV-bK-kxA">
<rect key="frame" x="20" y="75" width="240" height="265"/>
<rect key="frame" x="20" y="454" width="240" height="265"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" id="UNu-EJ-Zn6">
<rect key="frame" x="1" y="17" width="238" height="247"/>
@@ -339,7 +339,7 @@
<rect key="frame" x="1" y="119" width="223" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="37" id="SQ2-u9-LNK">
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" id="SQ2-u9-LNK">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
@@ -349,7 +349,7 @@
</tableHeaderView>
</scrollView>
<customView id="qwH-kZ-Xku">
<rect key="frame" x="268" y="172" width="278" height="168"/>
<rect key="frame" x="268" y="551" width="278" height="168"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="TFJ-fL-eem">
@@ -405,7 +405,7 @@
</userDefinedRuntimeAttributes>
</customView>
<customView id="rd0-du-azh">
<rect key="frame" x="268" y="20" width="278" height="144"/>
<rect key="frame" x="268" y="399" width="278" height="144"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="dfA-pu-vHD">
@@ -452,7 +452,7 @@
</userDefinedRuntimeAttributes>
</customView>
<customView id="lc4-Pc-IO8">
<rect key="frame" x="554" y="172" width="279" height="168"/>
<rect key="frame" x="554" y="551" width="279" height="168"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="4OL-lt-9sb">
@@ -507,11 +507,241 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</customView>
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="ljo-r1-cab">
<rect key="frame" x="20" y="97" width="240" height="265"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<clipView key="contentView" id="fXk-lC-TKb">
<rect key="frame" x="1" y="17" width="238" height="247"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="NJf-3h-vF4" id="Cp7-d5-L6s">
<rect key="frame" x="0.0" y="0.0" width="238" height="247"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn width="116" minWidth="40" maxWidth="1000" id="ytL-dJ-eyw">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="DN8-Pp-nVa">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn width="116" minWidth="40" maxWidth="1000" id="vPr-yA-8eo">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="Csg-a2-gNn">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
</tableColumns>
<connections>
<outlet property="dataSource" destination="450" id="G2o-sW-V1h"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="7GR-H6-bJG">
<rect key="frame" x="1" y="119" width="223" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" id="amd-ko-44H">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" id="NJf-3h-vF4">
<rect key="frame" x="0.0" y="0.0" width="238" height="17"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
<customView id="3bq-HD-6pd">
<rect key="frame" x="268" y="194" width="278" height="168"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="fPb-1t-5Ji">
<rect key="frame" x="18" y="144" width="199" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Order when selecting a row :" id="1X4-Ed-7M2">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="AQZ-2n-q16">
<rect key="frame" x="18" y="105" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- selectionShouldChangeInTableView" id="WLp-ZR-eWL">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="qEh-1c-gjB">
<rect key="frame" x="18" y="73" width="254" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- selectionIndexesForProposedSelection" id="d2e-Sh-nK9">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Ucm-ki-tBq">
<rect key="frame" x="18" y="39" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- tableViewSelectionIsChanging" id="1fx-Os-NVf">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="0os-Oq-ce0">
<rect key="frame" x="18" y="0.0" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- tableViewSelectionDidChange" id="kwk-cx-dlX">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
<color key="value" red="0.57470937249999998" green="1" blue="0.62240970439999999" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</customView>
<customView id="2KY-1R-SXC">
<rect key="frame" x="268" y="10" width="278" height="176"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="kDU-nl-57q">
<rect key="frame" x="18" y="151" width="233" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Order when selecting in the void :" id="iCq-gT-fwg">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="qtJ-x0-85V">
<rect key="frame" x="18" y="112" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- selectionShouldChangeInTableView" id="SXd-bx-IkV">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="hQc-Dl-c3O">
<rect key="frame" x="18" y="46" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- tableViewSelectionIsChanging" id="01K-Gt-jFy">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="0OQ-9v-ie4">
<rect key="frame" x="18" y="7" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- tableViewSelectionDidChange" id="iqt-y8-mbj">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="L3U-ft-bEY">
<rect key="frame" x="18" y="80" width="254" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- selectionIndexesForProposedSelection" id="mXh-LC-xmO">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
<color key="value" red="0.4198744338" green="0.62957984479999995" blue="0.88582710600000003" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</customView>
<customView id="AAx-BI-fKq">
<rect key="frame" x="554" y="194" width="279" height="168"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Fnp-x9-QCQ">
<rect key="frame" x="10" y="144" width="258" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Order when selecting a tableColumn :" id="N2a-kL-oU7">
<font key="font" metaFont="systemBold"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="n5C-9D-one">
<rect key="frame" x="10" y="105" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- selectionShouldChangeInTableView" id="c3I-h4-gJi">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="zhh-v9-EuS">
<rect key="frame" x="10" y="73" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- tableViewSelectionIsChanging" id="wd4-bA-gyM">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="JI1-pf-1Bi">
<rect key="frame" x="10" y="34" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- tableViewSelectionDidChange" id="kew-bD-Sl7">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="62h-Q4-1fU">
<rect key="frame" x="10" y="0.0" width="237" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="- didClickTableColumn" id="3z1-nu-EYK">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
<color key="value" red="1" green="0.68653006299999997" blue="0.82239461110000001" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</customView>
</subviews>
</view>
</window>
<customObject id="450" customClass="AppController">
<connections>
<outlet property="secondTableView" destination="Cp7-d5-L6s" id="pv9-ho-11h"/>
<outlet property="tableView" destination="s0a-9u-Nc7" id="OrC-xC-L9G"/>
<outlet property="theWindow" destination="371" id="459"/>
</connections>