mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-22 22:45:52 +00:00
Merge pull request #1892 from cacaodev/CPTableView-enumerateRows
CPTableView formatting and fixes [+1]
This commit is contained in:
commit
f9ce1d17c8
24 files changed
+2526
-1112
No files matched your search
+57
-96
@@ -223,6 +223,22 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)_initSubclass
|
||||
{
|
||||
_BlockDeselectView = function(view, row, column)
|
||||
{
|
||||
[view unsetThemeState:CPThemeStateSelectedDataView];
|
||||
[_disclosureControlsForRows[row] unsetThemeState:CPThemeStateSelected];
|
||||
};
|
||||
|
||||
_BlockSelectView = function(view, row, column)
|
||||
{
|
||||
[view setThemeState:CPThemeStateSelectedDataView];
|
||||
[_disclosureControlsForRows[row] setThemeState:CPThemeStateSelected];
|
||||
};
|
||||
}
|
||||
|
||||
/*!
|
||||
In addition to standard delegation, the outline view also supports data
|
||||
source delegation. This method sets the data source object. Just like the
|
||||
@@ -679,7 +695,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
|
||||
[self _cleanPendingItem];
|
||||
|
||||
[super reloadData];
|
||||
[super _reloadDataViews];
|
||||
}
|
||||
|
||||
- (void)_reloadItem:(id)anItem
|
||||
@@ -1308,7 +1324,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
/*!
|
||||
Reloads all the data of the outlineview.
|
||||
*/
|
||||
- (void)reloadData
|
||||
- (void)_reloadDataViews
|
||||
{
|
||||
[self reloadItem:nil reloadChildren:YES];
|
||||
}
|
||||
@@ -1340,6 +1356,25 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
else
|
||||
[super removeTableColumn:aTableColumn];
|
||||
}
|
||||
|
||||
- (void)_addDraggedDataView:(CPView)aDataView toView:(CPView)aSuperview forColumn:(CPInteger)column row:(CPInteger)row offset:(CGPoint)offset
|
||||
{
|
||||
var control;
|
||||
|
||||
[super _addDraggedDataView:aDataView toView:aSuperview forColumn:column row:row offset:offset];
|
||||
|
||||
if (_tableColumns[column] === _outlineTableColumn && (control = _disclosureControlsForRows[row]))
|
||||
{
|
||||
var controlFrame = [self frameOfOutlineDisclosureControlAtRow:row];
|
||||
|
||||
controlFrame.origin.x -= offset.x;
|
||||
controlFrame.origin.y -= offset.y;
|
||||
|
||||
[control setFrame:controlFrame];
|
||||
[aSuperview addSubview:control];
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
We override this because we need a special behavior for the outline
|
||||
@@ -1355,67 +1390,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
return [super frameOfDataViewAtColumn:aColumn row:aRow];
|
||||
}
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
We need to offset the dataview and add the disclosure triangle.
|
||||
*/
|
||||
- (CPView)_dragViewForColumn:(CPInteger)theColumnIndex event:(CPEvent)theDragEvent offset:(CGPoint)theDragViewOffset
|
||||
{
|
||||
var dragView = [[_CPColumnDragView alloc] initWithLineColor:[self gridColor]],
|
||||
tableColumn = [[self tableColumns] objectAtIndex:theColumnIndex],
|
||||
defaultRowHeight = [self valueForThemeAttribute:@"default-row-height"],
|
||||
bounds = CGRectMake(0.0, 0.0, [tableColumn width], CGRectGetHeight([self exposedRect]) + defaultRowHeight),
|
||||
columnRect = [self rectOfColumn:theColumnIndex],
|
||||
headerView = [tableColumn headerView],
|
||||
row = [_exposedRows firstIndex];
|
||||
|
||||
while (row !== CPNotFound)
|
||||
{
|
||||
var dataView = [self _newDataViewForRow:row tableColumn:tableColumn],
|
||||
dataViewFrame = [self frameOfDataViewAtColumn:theColumnIndex row:row];
|
||||
|
||||
// Only one column is ever dragged so we just place the view at
|
||||
dataViewFrame.origin.x = 0.0;
|
||||
|
||||
// Offset by table header height - scroll position
|
||||
dataViewFrame.origin.y = (CGRectGetMinY(dataViewFrame) - CGRectGetMinY([self exposedRect])) + defaultRowHeight;
|
||||
[dataView setFrame:dataViewFrame];
|
||||
|
||||
[dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]];
|
||||
|
||||
|
||||
if (tableColumn === _outlineTableColumn)
|
||||
{
|
||||
// first inset the dragview
|
||||
var indentationWidth = ([self levelForRow:row] + 1) * [self indentationPerLevel];
|
||||
|
||||
dataViewFrame.origin.x += indentationWidth;
|
||||
dataViewFrame.size.width -= indentationWidth;
|
||||
|
||||
[dataView setFrame:dataViewFrame];
|
||||
}
|
||||
|
||||
[dragView addSubview:dataView];
|
||||
|
||||
row = [_exposedRows indexGreaterThanIndex:row];
|
||||
}
|
||||
|
||||
// Add the column header view
|
||||
var headerFrame = [headerView frame];
|
||||
headerFrame.origin = CGPointMakeZero();
|
||||
|
||||
var columnHeaderView = [[_CPTableColumnHeaderView alloc] initWithFrame:headerFrame];
|
||||
[columnHeaderView setStringValue:[headerView stringValue]];
|
||||
[columnHeaderView setThemeState:[headerView themeState]];
|
||||
[dragView addSubview:columnHeaderView];
|
||||
|
||||
[dragView setBackgroundColor:[CPColor whiteColor]];
|
||||
[dragView setAlphaValue:0.7];
|
||||
[dragView setFrame:bounds];
|
||||
|
||||
return dragView;
|
||||
}
|
||||
|
||||
/*!
|
||||
Retargets the drop item for the outlineview.
|
||||
|
||||
@@ -1539,43 +1513,22 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
@ignore
|
||||
We need to move the disclosure control too.
|
||||
*/
|
||||
- (void)_layoutDataViewsInRows:(CPIndexSet)rows columns:(CPIndexSet)columns
|
||||
- (void)_layoutViewsForRowIndexes:(CPIndexSet)rowIndexes columnIndexes:(CPIndexSet)columnIndexes
|
||||
{
|
||||
var rowArray = [],
|
||||
columnArray = [];
|
||||
|
||||
[rows getIndexes:rowArray maxCount:-1 inIndexRange:nil];
|
||||
[columns getIndexes:columnArray maxCount:-1 inIndexRange:nil];
|
||||
|
||||
var columnIndex = 0,
|
||||
columnsCount = columnArray.length;
|
||||
|
||||
for (; columnIndex < columnsCount; ++columnIndex)
|
||||
[self _enumerateViewsInRows:rowIndexes columns:columnIndexes usingBlock:function(view, row, column, stop)
|
||||
{
|
||||
var column = columnArray[columnIndex],
|
||||
tableColumn = _tableColumns[column],
|
||||
tableColumnUID = [tableColumn UID],
|
||||
dataViewsForTableColumn = _dataViewsForTableColumns[tableColumnUID],
|
||||
rowIndex = 0,
|
||||
rowsCount = rowArray.length;
|
||||
var control;
|
||||
|
||||
for (; rowIndex < rowsCount; ++rowIndex)
|
||||
[view setFrame:[self frameOfDataViewAtColumn:column row:row]];
|
||||
|
||||
if (_tableColumns[column] === _outlineTableColumn && (control = _disclosureControlsForRows[row]))
|
||||
{
|
||||
var row = rowArray[rowIndex],
|
||||
dataView = dataViewsForTableColumn[row],
|
||||
dataViewFrame = [self frameOfDataViewAtColumn:column row:row];
|
||||
|
||||
[dataView setFrame:dataViewFrame];
|
||||
|
||||
if (tableColumn === _outlineTableColumn)
|
||||
{
|
||||
var control = _disclosureControlsForRows[row],
|
||||
frame = [self frameOfOutlineDisclosureControlAtRow:row];
|
||||
|
||||
[control setFrame:frame];
|
||||
}
|
||||
var frame = [self frameOfOutlineDisclosureControlAtRow:row];
|
||||
[control setFrame:frame];
|
||||
}
|
||||
}
|
||||
}];
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1587,7 +1540,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
|
||||
var outlineColumn = [[self tableColumns] indexOfObjectIdenticalTo:[self outlineTableColumn]];
|
||||
|
||||
if (![columns containsIndex:outlineColumn] || [self outlineTableColumn] === _draggedColumn)
|
||||
if (![columns containsIndex:outlineColumn] || outlineColumn === _draggedColumnIndex)
|
||||
return;
|
||||
|
||||
var rowArray = [];
|
||||
@@ -1890,6 +1843,14 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0,
|
||||
return _implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_dataViewForTableColumn_item_;
|
||||
}
|
||||
|
||||
- (id)_hitTest:(CPView)aView
|
||||
{
|
||||
if ([aView isKindOfClass:[CPDisclosureButton class]])
|
||||
return aView;
|
||||
|
||||
return [super _hitTest:aView];
|
||||
}
|
||||
|
||||
- (BOOL)_delegateRespondsToShouldExpandItem
|
||||
{
|
||||
return _implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldExpandItem_;
|
||||
|
||||
@@ -180,7 +180,7 @@ CPTableColumnUserResizingMask = 1 << 1;
|
||||
columns = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(index, [tableView._exposedColumns lastIndex] - index + 1)];
|
||||
|
||||
// FIXME: Would be faster with some sort of -setNeedsDisplayInColumns: that updates a dirtyTableColumnForDisplay cache; then marked columns would relayout their data views at display time.
|
||||
[tableView _layoutDataViewsInRows:rows columns:columns];
|
||||
[tableView _layoutViewsForRowIndexes:rows columnIndexes:columns];
|
||||
[tableView tile];
|
||||
|
||||
if (!_disableResizingPosting)
|
||||
@@ -393,8 +393,8 @@ CPTableColumnUserResizingMask = 1 << 1;
|
||||
*/
|
||||
- (void)setDataView:(CPView)aView
|
||||
{
|
||||
if (_dataView)
|
||||
_dataViewData = nil;
|
||||
if (_dataView === aView)
|
||||
return;
|
||||
|
||||
[aView setThemeState:CPThemeStateTableDataView];
|
||||
|
||||
@@ -550,7 +550,9 @@ CPTableColumnUserResizingMask = 1 << 1;
|
||||
rowIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, [tableView numberOfRows])],
|
||||
columnIndexes = [CPIndexSet indexSetWithIndex:column];
|
||||
|
||||
[tableView reloadDataForRowIndexes:rowIndexes columnIndexes:columnIndexes];
|
||||
// Reloads objectValues only, not the views.
|
||||
// FIXME: reload data for all rows or just exposed rows ?
|
||||
[tableView _reloadDataForRowIndexes:rowIndexes columnIndexes:columnIndexes];
|
||||
}
|
||||
|
||||
- (CPSortDescriptor)_defaultSortDescriptorPrototype
|
||||
|
||||
+399
-362
@@ -20,19 +20,14 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
@import <Foundation/CPIndexSet.j>
|
||||
|
||||
@import "CPCursor.j"
|
||||
@import "CPPasteboard.j"
|
||||
@import "CPTableColumn.j"
|
||||
@import "CPTableView.j"
|
||||
@import "CPView.j"
|
||||
@import "CPCursor.j"
|
||||
@import "_CPImageAndTextView.j"
|
||||
|
||||
@class CPTableView
|
||||
|
||||
@global CPApp
|
||||
|
||||
|
||||
@implementation _CPTableColumnHeaderView : CPView
|
||||
{
|
||||
_CPImageAndTextView _textField;
|
||||
@@ -69,13 +64,18 @@
|
||||
|
||||
- (void)_init
|
||||
{
|
||||
_textField = [[_CPImageAndTextView alloc] initWithFrame:CGRectMakeZero()];
|
||||
_textField = [[_CPImageAndTextView alloc] initWithFrame:
|
||||
CGRectMake(5.0, 0.0, CGRectGetWidth([self bounds]) - 10.0, CGRectGetHeight([self bounds]))];
|
||||
|
||||
[_textField setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
|
||||
[_textField setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable];
|
||||
|
||||
[_textField setLineBreakMode:CPLineBreakByTruncatingTail];
|
||||
[_textField setTextColor:[CPColor colorWithRed:51.0 / 255.0 green:51.0 / 255.0 blue:51.0 / 255.0 alpha:1.0]];
|
||||
[_textField setFont:[CPFont boldSystemFontOfSize:12.0]];
|
||||
[_textField setAlignment:CPLeftTextAlignment];
|
||||
[_textField setVerticalAlignment:CPCenterVerticalTextAlignment];
|
||||
[_textField setTextShadowColor:[CPColor whiteColor]];
|
||||
[_textField setTextShadowOffset:CGSizeMake(0,1)];
|
||||
|
||||
[self addSubview:_textField];
|
||||
}
|
||||
@@ -168,26 +168,49 @@
|
||||
|
||||
- (void)_setIndicatorImage:(CPImage)anImage
|
||||
{
|
||||
if (anImage)
|
||||
{
|
||||
[_textField setImage:anImage];
|
||||
[_textField setImagePosition:CPImageRight];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_textField setImagePosition:CPNoImage];
|
||||
}
|
||||
if (anImage)
|
||||
{
|
||||
[_textField setImage:anImage];
|
||||
[_textField setImagePosition:CPImageRight];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_textField setImagePosition:CPNoImage];
|
||||
}
|
||||
}
|
||||
|
||||
- (CPImage)_indicatorImage
|
||||
{
|
||||
return [_textField imagePosition] === CPNoImage ? nil : [_textField image];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)aRect
|
||||
{
|
||||
var bounds = [self bounds];
|
||||
|
||||
if (!CGRectIntersectsRect(aRect, bounds))
|
||||
return;
|
||||
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
maxX = CGRectGetMaxX(bounds) - 0.5;
|
||||
|
||||
CGContextSetLineWidth(context, 1);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
|
||||
CGContextMoveToPoint(context, maxX, CGRectGetMinY(bounds));
|
||||
CGContextAddLineToPoint(context, maxX, CGRectGetMaxY(bounds));
|
||||
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringValueKey",
|
||||
_CPTableColumnHeaderViewFontKey = @"_CPTableColumnHeaderViewFontKey",
|
||||
_CPTableColumnHeaderViewTextColorKey = @"_CPTableColumnHeaderViewTextColorKey",
|
||||
_CPTableColumnHeaderViewTextShadowColorKey = @"_CPTableColumnHeaderViewTextShadowColorKey",
|
||||
_CPTableColumnHeaderViewAlignmentKey = @"_CPTableColumnHeaderViewAlignmentKey",
|
||||
_CPTableColumnHeaderViewLineBreakModeKey = @"_CPTableColumnHeaderViewLineBreakModeKey",
|
||||
_CPTableColumnHeaderViewImageKey = @"_CPTableColumnHeaderViewImageKey";
|
||||
_CPTableColumnHeaderViewIsDraggingKey = @"_CPTableColumnHeaderViewIsDraggingKey";
|
||||
|
||||
@implementation _CPTableColumnHeaderView (CPCoding)
|
||||
|
||||
@@ -199,10 +222,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
[self _setIndicatorImage:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewImageKey]];
|
||||
[self setStringValue:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewStringValueKey]];
|
||||
[self setFont:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewFontKey]];
|
||||
[self setTextColor:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewTextColorKey]];
|
||||
[self setTextShadowColor:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewTextShadowColorKey]];
|
||||
[self setAlignment:[aCoder decodeIntForKey:_CPTableColumnHeaderViewAlignmentKey]];
|
||||
[self setLineBreakMode:[aCoder decodeIntForKey:_CPTableColumnHeaderViewLineBreakModeKey]];
|
||||
[self setFont:[aCoder decodeObjectForKey:_CPTableColumnHeaderViewFontKey]];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -214,31 +234,37 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
|
||||
[aCoder encodeObject:[_textField text] forKey:_CPTableColumnHeaderViewStringValueKey];
|
||||
[aCoder encodeObject:[_textField image] forKey:_CPTableColumnHeaderViewImageKey];
|
||||
[aCoder encodeObject:[self font] forKey:_CPTableColumnHeaderViewFontKey];
|
||||
[aCoder encodeObject:[self textColor] forKey:_CPTableColumnHeaderViewTextColorKey];
|
||||
[aCoder encodeObject:[self textShadowColor] forKey:_CPTableColumnHeaderViewTextShadowColorKey];
|
||||
[aCoder encodeInt:[self alignment] forKey:_CPTableColumnHeaderViewAlignmentKey];
|
||||
[aCoder encodeInt:[self lineBreakMode] forKey:_CPTableColumnHeaderViewLineBreakModeKey];
|
||||
[aCoder encodeObject:[_textField font] forKey:_CPTableColumnHeaderViewFontKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
CPTableHeaderViewDragColumnHeaderTag = 1;
|
||||
|
||||
var CPTableHeaderViewResizeZone = 3.0,
|
||||
CPTableHeaderViewDragTolerance = 10.0;
|
||||
|
||||
@implementation CPTableHeaderView : CPView
|
||||
{
|
||||
CGPoint _mouseDownLocation;
|
||||
CGPoint _previousTrackingLocation;
|
||||
int _activeColumn;
|
||||
int _pressedColumn;
|
||||
int _lastDragDestinationColumnIndex;
|
||||
CGPoint _mouseDownLocation;
|
||||
CGPoint _columnMouseDownLocation;
|
||||
CGPoint _mouseEnterExitLocation;
|
||||
CGPoint _previousTrackingLocation;
|
||||
|
||||
BOOL _isResizing;
|
||||
BOOL _isDragging;
|
||||
BOOL _isTrackingColumn;
|
||||
BOOL _drawsColumnLines;
|
||||
int _activeColumn;
|
||||
int _pressedColumn;
|
||||
|
||||
float _columnOldWidth;
|
||||
BOOL _isResizing;
|
||||
BOOL _isDragging;
|
||||
BOOL _canDragColumn;
|
||||
|
||||
CPTableView _tableView @accessors(property=tableView);
|
||||
CPView _columnDragView;
|
||||
CPView _columnDragHeaderView;
|
||||
CPView _columnDragClipView;
|
||||
|
||||
float _columnOldWidth;
|
||||
|
||||
CPTableView _tableView @accessors(property=tableView);
|
||||
}
|
||||
|
||||
+ (CPString)defaultThemeClass
|
||||
@@ -258,14 +284,16 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
- (void)_init
|
||||
{
|
||||
_mouseDownLocation = CGPointMakeZero();
|
||||
_columnMouseDownLocation = CGPointMakeZero();
|
||||
_mouseEnterExitLocation = CGPointMakeZero();
|
||||
_previousTrackingLocation = CGPointMakeZero();
|
||||
|
||||
_activeColumn = -1;
|
||||
_pressedColumn = -1;
|
||||
|
||||
_isResizing = NO;
|
||||
_isDragging = NO;
|
||||
_isTrackingColumn = NO;
|
||||
_drawsColumnLines = YES;
|
||||
_canDragColumn = NO;
|
||||
|
||||
_columnOldWidth = 0.0;
|
||||
|
||||
@@ -282,14 +310,39 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
return self;
|
||||
}
|
||||
|
||||
- (int)columnAtPoint:(CGPoint)aPoint
|
||||
// Checking Altered Columns
|
||||
|
||||
- (CPInteger)draggedColumn
|
||||
{
|
||||
return [_tableView columnAtPoint:CGPointMake(aPoint.x, aPoint.y)];
|
||||
return _isDragging ? _activeColumn : -1;
|
||||
}
|
||||
|
||||
- (float)draggedDistance
|
||||
{
|
||||
if (_isDragging)
|
||||
return (CGRectGetMinX(_columnDragClipView) - _columnMouseDownLocation.x);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
- (CPInteger)resizedColumn
|
||||
{
|
||||
if (_isResizing)
|
||||
return _activeColumn;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Utility Methods
|
||||
|
||||
- (CPInteger)columnAtPoint:(CGPoint)aPoint
|
||||
{
|
||||
return [_tableView columnAtPoint:aPoint];
|
||||
}
|
||||
|
||||
- (CGRect)headerRectOfColumn:(CPInteger)aColumnIndex
|
||||
{
|
||||
var headerRect = CGRectMakeCopy([self bounds]),
|
||||
var headerRect = [self bounds],
|
||||
columnRect = [_tableView rectOfColumn:aColumnIndex];
|
||||
|
||||
headerRect.origin.x = CGRectGetMinX(columnRect);
|
||||
@@ -298,16 +351,145 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
return headerRect;
|
||||
}
|
||||
|
||||
- (void)setDrawsColumnLines:(BOOL)aFlag
|
||||
// CPView Overrides
|
||||
|
||||
- (void)viewDidMoveToWindow
|
||||
{
|
||||
_drawsColumnLines = aFlag;
|
||||
[super viewDidMoveToWindow];
|
||||
|
||||
[[self window] setAcceptsMouseMovedEvents:YES];
|
||||
}
|
||||
|
||||
- (BOOL)drawsColumnLines
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
return _drawsColumnLines;
|
||||
var tableColumns = [_tableView tableColumns],
|
||||
count = [tableColumns count];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var column = [tableColumns objectAtIndex:i],
|
||||
headerView = [column headerView],
|
||||
frame = [self headerRectOfColumn:i];
|
||||
|
||||
[headerView setFrame:frame];
|
||||
|
||||
if ([headerView superview] != self)
|
||||
[self addSubview:headerView];
|
||||
}
|
||||
}
|
||||
|
||||
// CPResponder Overrides
|
||||
|
||||
- (void)mouseDown:(CPEvent)theEvent
|
||||
{
|
||||
var currentLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil],
|
||||
adjustedLocation = CGPointMake(MAX(currentLocation.x - CPTableHeaderViewResizeZone, 0.0), currentLocation.y),
|
||||
columnIndex = [self columnAtPoint:adjustedLocation];
|
||||
|
||||
if (columnIndex === -1)
|
||||
return;
|
||||
|
||||
_mouseDownLocation = currentLocation;
|
||||
_activeColumn = columnIndex;
|
||||
_canDragColumn = YES;
|
||||
|
||||
[_tableView _sendDelegateMouseDownInHeaderOfTableColumn:columnIndex];
|
||||
|
||||
if ([self _shouldResizeTableColumn:columnIndex at:currentLocation])
|
||||
[self _startResizingTableColumn:columnIndex at:currentLocation];
|
||||
else
|
||||
[self _setPressedColumn:columnIndex];
|
||||
}
|
||||
|
||||
- (void)mouseDragged:(CPEvent)theEvent
|
||||
{
|
||||
var currentLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil],
|
||||
adjustedLocation = CGPointMake(MAX(currentLocation.x - CPTableHeaderViewResizeZone, 0.0), currentLocation.y),
|
||||
columnIndex = [self columnAtPoint:adjustedLocation];
|
||||
|
||||
if (_isResizing)
|
||||
{
|
||||
[self _autoscroll:theEvent localLocation:currentLocation];
|
||||
[self _continueResizingTableColumn:_activeColumn at:currentLocation];
|
||||
}
|
||||
else if (_isDragging)
|
||||
{
|
||||
// Disable autoscrolling until it behaves correctly.
|
||||
//[self _autoscroll:theEvent localLocation:currentLocation];
|
||||
[self _dragTableColumn:_activeColumn to:currentLocation];
|
||||
}
|
||||
else // tracking a press, could become a drag
|
||||
{
|
||||
if (CGRectContainsPoint([self headerRectOfColumn:_activeColumn], currentLocation))
|
||||
{
|
||||
if ([self _shouldDragTableColumn:columnIndex at:currentLocation])
|
||||
[self _startDraggingTableColumn:columnIndex at:currentLocation];
|
||||
else
|
||||
[self _setPressedColumn:_activeColumn];
|
||||
}
|
||||
else
|
||||
[self _setPressedColumn:-1];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)mouseUp:(CPEvent)theEvent
|
||||
{
|
||||
if (_isResizing)
|
||||
{
|
||||
[self _stopResizingTableColumn:_activeColumn];
|
||||
}
|
||||
else if (_isDragging)
|
||||
{
|
||||
[self _stopDraggingTableColumn:_activeColumn];
|
||||
}
|
||||
else if (_activeColumn != -1)
|
||||
{
|
||||
var currentLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
|
||||
if (CGRectContainsPoint([self headerRectOfColumn:_activeColumn], currentLocation))
|
||||
[_tableView _didClickTableColumn:_activeColumn modifierFlags:[theEvent modifierFlags]];
|
||||
}
|
||||
|
||||
[self _setPressedColumn:-1];
|
||||
[self _updateResizeCursor:[CPApp currentEvent]];
|
||||
|
||||
_activeColumn = -1;
|
||||
}
|
||||
|
||||
- (void)mouseEntered:(CPEvent)theEvent
|
||||
{
|
||||
var location = [theEvent globalLocation];
|
||||
|
||||
if (CGPointEqualToPoint(location, _mouseEnterExitLocation))
|
||||
return;
|
||||
|
||||
_mouseEnterExitLocation = location;
|
||||
|
||||
[self _updateResizeCursor:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseMoved:(CPEvent)theEvent
|
||||
{
|
||||
[self _updateResizeCursor:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseExited:(CPEvent)theEvent
|
||||
{
|
||||
var location = [theEvent globalLocation];
|
||||
|
||||
if (CGPointEqualToPoint(location, _mouseEnterExitLocation))
|
||||
return;
|
||||
|
||||
_mouseEnterExitLocation = location;
|
||||
|
||||
// FIXME: we should use CPCursor push/pop (if previous currentCursor != arrow).
|
||||
[[CPCursor arrowCursor] set];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPTableHeaderView (CPTableHeaderViewPrivate)
|
||||
|
||||
- (CGRect)_cursorRectForColumn:(CPInteger)column
|
||||
{
|
||||
if (column == -1 || !([_tableView._tableColumns[column] resizingMask] & CPTableColumnUserResizingMask))
|
||||
@@ -315,14 +497,17 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
|
||||
var rect = [self headerRectOfColumn:column];
|
||||
|
||||
rect.origin.x = CGRectGetMaxX(rect) - 5;
|
||||
rect.size.width = 20;
|
||||
rect.origin.x = (CGRectGetMaxX(rect) - CPTableHeaderViewResizeZone) - 1.0;
|
||||
rect.size.width = (CPTableHeaderViewResizeZone * 2.0) + 1.0; // + 1 for resize line
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
- (void)_setPressedColumn:(CPInteger)column
|
||||
{
|
||||
if (_pressedColumn === column)
|
||||
return;
|
||||
|
||||
if (_pressedColumn != -1)
|
||||
{
|
||||
var headerView = [_tableView._tableColumns[_pressedColumn] headerView];
|
||||
@@ -333,132 +518,37 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
{
|
||||
var headerView = [_tableView._tableColumns[column] headerView];
|
||||
[headerView setThemeState:CPThemeStateHighlighted];
|
||||
|
||||
if (_tableView._editingCellIndex || _tableView._editingColumn == column)
|
||||
[[self window] makeFirstResponder:_tableView];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Once the mouse leaves the pressed column, it can no longer drag
|
||||
_canDragColumn = NO;
|
||||
}
|
||||
|
||||
_pressedColumn = column;
|
||||
}
|
||||
|
||||
- (void)mouseDown:(CPEvent)theEvent
|
||||
{
|
||||
[self trackMouse:theEvent];
|
||||
}
|
||||
|
||||
- (void)trackMouse:(CPEvent)theEvent
|
||||
{
|
||||
var type = [theEvent type],
|
||||
currentLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil];
|
||||
|
||||
// Take the right columns resize tracking area into account
|
||||
currentLocation.x -= 5.0;
|
||||
|
||||
var columnIndex = [self columnAtPoint:currentLocation],
|
||||
shouldResize = [self shouldResizeTableColumn:columnIndex at:CGPointMake(currentLocation.x + 5.0, currentLocation.y)];
|
||||
|
||||
if (type === CPLeftMouseUp)
|
||||
{
|
||||
if (shouldResize)
|
||||
[self stopResizingTableColumn:_activeColumn at:currentLocation];
|
||||
else if ([self _shouldStopTrackingTableColumn:columnIndex at:currentLocation])
|
||||
{
|
||||
[_tableView _didClickTableColumn:columnIndex modifierFlags:[theEvent modifierFlags]];
|
||||
[self stopTrackingTableColumn:columnIndex at:currentLocation];
|
||||
|
||||
_isTrackingColumn = NO;
|
||||
}
|
||||
|
||||
[self _updateResizeCursor:[CPApp currentEvent]];
|
||||
|
||||
_activeColumn = CPNotFound;
|
||||
return;
|
||||
}
|
||||
|
||||
if (type === CPLeftMouseDown)
|
||||
{
|
||||
if (columnIndex === -1)
|
||||
return;
|
||||
|
||||
_mouseDownLocation = currentLocation;
|
||||
_activeColumn = columnIndex;
|
||||
|
||||
[_tableView _sendDelegateMouseDownInHeaderOfTableColumn:columnIndex];
|
||||
|
||||
if (shouldResize)
|
||||
[self startResizingTableColumn:columnIndex at:currentLocation];
|
||||
else
|
||||
{
|
||||
[self startTrackingTableColumn:columnIndex at:currentLocation];
|
||||
_isTrackingColumn = YES;
|
||||
}
|
||||
}
|
||||
else if (type === CPLeftMouseDragged)
|
||||
{
|
||||
if (shouldResize)
|
||||
[self continueResizingTableColumn:_activeColumn at:currentLocation];
|
||||
else
|
||||
{
|
||||
if (_activeColumn === columnIndex && CGRectContainsPoint([self headerRectOfColumn:columnIndex], currentLocation))
|
||||
{
|
||||
if (_isTrackingColumn && _pressedColumn !== -1)
|
||||
{
|
||||
if (![self continueTrackingTableColumn:columnIndex at:currentLocation])
|
||||
return; // Stop tracking the column, because it's being dragged
|
||||
} else
|
||||
[self startTrackingTableColumn:columnIndex at:currentLocation];
|
||||
|
||||
} else if (_isTrackingColumn && _pressedColumn !== -1)
|
||||
[self stopTrackingTableColumn:_activeColumn at:currentLocation];
|
||||
}
|
||||
}
|
||||
|
||||
_previousTrackingLocation = currentLocation;
|
||||
[CPApp setTarget:self selector:@selector(trackMouse:) forNextEventMatchingMask:CPLeftMouseDraggedMask | CPLeftMouseUpMask untilDate:nil inMode:nil dequeue:YES];
|
||||
}
|
||||
|
||||
- (void)startTrackingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
_lastDragDestinationColumnIndex = -1;
|
||||
[self _setPressedColumn:aColumnIndex];
|
||||
}
|
||||
|
||||
- (BOOL)continueTrackingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
if ([self _shouldDragTableColumn:aColumnIndex at:aPoint])
|
||||
{
|
||||
var columnRect = [self headerRectOfColumn:aColumnIndex],
|
||||
offset = CGPointMakeZero(),
|
||||
view = [_tableView _dragViewForColumn:aColumnIndex event:[CPApp currentEvent] offset:offset],
|
||||
viewLocation = CGPointMakeZero();
|
||||
|
||||
viewLocation.x = ( CGRectGetMinX(columnRect) + offset.x ) + ( aPoint.x - _mouseDownLocation.x );
|
||||
viewLocation.y = CGRectGetMinY(columnRect) + offset.y;
|
||||
|
||||
[self dragView:view at:viewLocation offset:CGSizeMakeZero() event:[CPApp currentEvent]
|
||||
pasteboard:[CPPasteboard pasteboardWithName:CPDragPboard] source:self slideBack:YES];
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)_shouldStopTrackingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
return _isTrackingColumn && _activeColumn === aColumnIndex &&
|
||||
CGRectContainsPoint([self headerRectOfColumn:aColumnIndex], aPoint);
|
||||
}
|
||||
|
||||
- (void)stopTrackingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
[self _setPressedColumn:CPNotFound];
|
||||
[self _updateResizeCursor:[CPApp currentEvent]];
|
||||
}
|
||||
|
||||
- (BOOL)_shouldDragTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
return ABS(aPoint.x - _mouseDownLocation.x) >= 10.0 && [_tableView _sendDelegateShouldReorderColumn:aColumnIndex toColumn:-1];
|
||||
return _canDragColumn && [_tableView allowsColumnReordering] && ABS(aPoint.x - _mouseDownLocation.x) >= CPTableHeaderViewDragTolerance;
|
||||
}
|
||||
|
||||
- (void)_autoscroll:(CPEvent)theEvent localLocation:(CGPoint)theLocation
|
||||
{
|
||||
// Constrain the y coordinate so we don't autoscroll vertically
|
||||
var constrainedLocation = CGPointMake(theLocation.x, CGRectGetMinY([_tableView visibleRect])),
|
||||
constrainedEvent = [CPEvent mouseEventWithType:CPLeftMouseDragged
|
||||
location:[self convertPoint:constrainedLocation toView:nil]
|
||||
modifierFlags:[theEvent modifierFlags]
|
||||
timestamp:[theEvent timestamp]
|
||||
windowNumber:[theEvent windowNumber]
|
||||
context:nil
|
||||
eventNumber:0
|
||||
clickCount:[theEvent clickCount]
|
||||
pressure:[theEvent pressure]];
|
||||
|
||||
[self autoscroll:constrainedEvent];
|
||||
[_tableView autoscroll:constrainedEvent];
|
||||
}
|
||||
|
||||
- (CGRect)_headerRectOfLastVisibleColumn
|
||||
@@ -477,155 +567,203 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)_constrainDragView:(CPView)theDragView at:(CGPoint)aPoint
|
||||
- (CGPoint)_constrainDragPoint:(CGPoint)aPoint
|
||||
{
|
||||
var tableColumns = [_tableView tableColumns],
|
||||
// This effectively clamps the value between the minimum and maximum
|
||||
var visibleRect = [_tableView visibleRect],
|
||||
lastColumnRect = [self _headerRectOfLastVisibleColumn],
|
||||
activeColumnRect = [self headerRectOfColumn:_activeColumn],
|
||||
dragWindow = [theDragView window],
|
||||
frame = [dragWindow frame];
|
||||
maxX = CGRectGetMaxX(lastColumnRect) - CGRectGetWidth(activeColumnRect) - CGRectGetMinX(visibleRect),
|
||||
point = CGPointMake(MAX(MIN(aPoint.x, maxX), -CGRectGetMinX(visibleRect)), aPoint.y);
|
||||
|
||||
// Convert the frame origin from the global coordinate system to the windows' coordinate system
|
||||
frame.origin = [[self window] convertGlobalToBase:frame.origin];
|
||||
// the from the window to the view
|
||||
frame.origin = [self convertPoint:frame.origin fromView:nil];
|
||||
|
||||
// This effectively clamps the value between the minimum and maximum
|
||||
frame.origin.x = MAX(0.0, MIN(CGRectGetMinX(frame), CGRectGetMaxX(lastColumnRect) - CGRectGetWidth(activeColumnRect)));
|
||||
|
||||
// Make sure the column cannot move vertically
|
||||
frame.origin.y = CGRectGetMinY(lastColumnRect);
|
||||
|
||||
// Convert the calculated origin back to the window coordinate system
|
||||
frame.origin = [self convertPoint:frame.origin toView:nil];
|
||||
// Then back to the global coordinate system
|
||||
frame.origin = [[self window] convertBaseToGlobal:frame.origin];
|
||||
|
||||
[dragWindow setFrame:frame];
|
||||
return point;
|
||||
}
|
||||
|
||||
- (void)_moveColumn:(CPInteger)aFromIndex toColumn:(CPInteger)aToIndex
|
||||
{
|
||||
if ([_tableView _sendDelegateShouldReorderColumn:aFromIndex toColumn:aToIndex])
|
||||
{
|
||||
[_tableView moveColumn:aFromIndex toColumn:aToIndex];
|
||||
_activeColumn = aToIndex;
|
||||
_pressedColumn = _activeColumn;
|
||||
}
|
||||
}
|
||||
[_tableView moveColumn:aFromIndex toColumn:aToIndex];
|
||||
_activeColumn = aToIndex;
|
||||
_pressedColumn = _activeColumn;
|
||||
|
||||
- (void)draggedView:(CPView)aView beganAt:(CGPoint)aPoint
|
||||
{
|
||||
_isDragging = YES;
|
||||
|
||||
var column = [[_tableView tableColumns] objectAtIndex:_activeColumn];
|
||||
|
||||
[[column headerView] setHidden:YES];
|
||||
[_tableView _setDraggedColumn:column];
|
||||
[_tableView _setDraggedColumn:_activeColumn];
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (void)draggedView:(CPView)aView movedTo:(CGPoint)aPoint
|
||||
- (BOOL)isDragging
|
||||
{
|
||||
[self _constrainDragView:aView at:aPoint];
|
||||
return _isDragging;
|
||||
}
|
||||
|
||||
var dragWindow = [aView window],
|
||||
dragWindowFrame = [dragWindow frame];
|
||||
- (void)_startDraggingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
_isDragging = YES;
|
||||
_columnDragView = [_tableView _dragViewForColumn:aColumnIndex];
|
||||
_previousTrackingLocation = aPoint;
|
||||
|
||||
var hoverPoint = CGPointCreateCopy(aPoint);
|
||||
// Create a new clip view for the drag view that clips to the header + visible content
|
||||
var headerHeight = CGRectGetHeight([self frame]),
|
||||
scrollView = [self enclosingScrollView],
|
||||
contentFrame = [[scrollView contentView] frame];
|
||||
|
||||
if (aPoint.x < _previousTrackingLocation.x)
|
||||
hoverPoint = CGPointMake(CGRectGetMinX(dragWindowFrame), CGRectGetMinY(dragWindowFrame));
|
||||
else if (aPoint.x > _previousTrackingLocation.x)
|
||||
hoverPoint = CGPointMake(CGRectGetMaxX(dragWindowFrame), CGRectGetMinY(dragWindowFrame));
|
||||
contentFrame.origin.y -= headerHeight;
|
||||
contentFrame.size.height += headerHeight;
|
||||
|
||||
// Convert the hover point from the global coordinate system to windows' coordinate system
|
||||
hoverPoint = [[self window] convertGlobalToBase:hoverPoint];
|
||||
// then to the view
|
||||
hoverPoint = [self convertPoint:hoverPoint fromView:nil];
|
||||
_columnDragClipView = [[CPView alloc] initWithFrame:contentFrame];
|
||||
|
||||
var hoveredColumn = [self columnAtPoint:hoverPoint];
|
||||
[_columnDragClipView addSubview:_columnDragView];
|
||||
|
||||
if (hoveredColumn !== _lastDragDestinationColumnIndex && hoveredColumn !== -1)
|
||||
// Insert the clip view above the table header (and content)
|
||||
[scrollView addSubview:_columnDragClipView positioned:CPWindowAbove relativeTo:self];
|
||||
|
||||
// Hide the underlying column header subviews, we just want to draw the chrome
|
||||
var headerView = [[[_tableView tableColumns] objectAtIndex:aColumnIndex] headerView];
|
||||
|
||||
[[headerView subviews] makeObjectsPerformSelector:@selector(setHidden:) withObject:YES];
|
||||
|
||||
// The underlying column header shows normal state
|
||||
[headerView unsetThemeState:CPThemeStateHighlighted | CPThemeStateSelected];
|
||||
|
||||
// Keep track of the location within the column header where the original mousedown occurred
|
||||
_columnDragHeaderView = [_columnDragView viewWithTag:CPTableHeaderViewDragColumnHeaderTag];
|
||||
|
||||
_columnMouseDownLocation = [self convertPoint:_mouseDownLocation toView:_columnDragHeaderView];
|
||||
|
||||
[_tableView _setDraggedColumn:aColumnIndex];
|
||||
|
||||
[[CPCursor closedHandCursor] set];
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (void)_dragTableColumn:(CPInteger)aColumnIndex to:(CGPoint)aPoint
|
||||
{
|
||||
var delta = aPoint.x - _previousTrackingLocation.x,
|
||||
columnPoint = [_columnDragHeaderView convertPoint:aPoint fromView:self];
|
||||
|
||||
// Only move if the mouse is past the original click point in the direction of movement
|
||||
if ((delta > 0 && columnPoint.x > _columnMouseDownLocation.x) || (delta < 0 && columnPoint.x < _columnMouseDownLocation.x))
|
||||
{
|
||||
var columnRect = [self headerRectOfColumn:hoveredColumn],
|
||||
columnCenterPoint = [self convertPoint:CGPointMake(CGRectGetMidX(columnRect), CGRectGetMidY(columnRect)) fromView:self];
|
||||
var dragFrame = [_columnDragView frame],
|
||||
newOrigin = [self _constrainDragPoint:CGPointMake(CGRectGetMinX(dragFrame) + delta, CGRectGetMinY(dragFrame))];
|
||||
|
||||
if (hoveredColumn < _activeColumn && hoverPoint.x < columnCenterPoint.x)
|
||||
[_columnDragView setFrameOrigin:newOrigin];
|
||||
|
||||
// When the edge of the dragged column passes the midpoint of an adjacent column, they swap
|
||||
var hoverPoint = CGPointMakeCopy(aPoint);
|
||||
|
||||
// The drag frame is in content view coordinates, we need it to be in our coordinates
|
||||
dragFrame = [self convertRect:dragFrame fromView:[_columnDragView superview]];
|
||||
|
||||
if (delta > 0)
|
||||
hoverPoint.x = CGRectGetMaxX(dragFrame);
|
||||
else
|
||||
hoverPoint.x = CGRectGetMinX(dragFrame);
|
||||
|
||||
var hoveredColumn = [self columnAtPoint:hoverPoint];
|
||||
|
||||
if (hoveredColumn !== -1)
|
||||
{
|
||||
[self _moveColumn:_activeColumn toColumn:hoveredColumn];
|
||||
_lastDragDestinationColumnIndex = hoveredColumn;
|
||||
}
|
||||
else if (hoveredColumn > _activeColumn && hoverPoint.x > columnCenterPoint.x)
|
||||
{
|
||||
[self _moveColumn:_activeColumn toColumn:hoveredColumn];
|
||||
_lastDragDestinationColumnIndex = hoveredColumn;
|
||||
var columnRect = [self headerRectOfColumn:hoveredColumn],
|
||||
columnCenterPoint = CGPointMake(CGRectGetMidX(columnRect), CGRectGetMidY(columnRect));
|
||||
|
||||
if (hoveredColumn < _activeColumn && hoverPoint.x < columnCenterPoint.x)
|
||||
[self _moveColumn:_activeColumn toColumn:hoveredColumn];
|
||||
else if (hoveredColumn > _activeColumn && hoverPoint.x > columnCenterPoint.x)
|
||||
[self _moveColumn:_activeColumn toColumn:hoveredColumn];
|
||||
}
|
||||
}
|
||||
|
||||
_previousTrackingLocation = aPoint;
|
||||
}
|
||||
|
||||
- (void)draggedView:(CPImage)aView endedAt:(CGPoint)aLocation operation:(CPDragOperation)anOperation
|
||||
- (void)_stopDraggingTableColumn:(CPInteger)aColumnIndex
|
||||
{
|
||||
_isDragging = NO;
|
||||
_isTrackingColumn = NO; // We need to do this explicitly because the mouse up section of trackMouse is never reached
|
||||
|
||||
[_tableView _setDraggedColumn:nil];
|
||||
[[[[_tableView tableColumns] objectAtIndex:_activeColumn] headerView] setHidden:NO];
|
||||
[self stopTrackingTableColumn:_activeColumn at:aLocation];
|
||||
[_columnDragClipView removeFromSuperview];
|
||||
[_tableView _setDraggedColumn:-1];
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
var headerView = [[[_tableView tableColumns] objectAtIndex:aColumnIndex] headerView];
|
||||
|
||||
[_tableView _enqueueDraggingViews];
|
||||
[[headerView subviews] makeObjectsPerformSelector:@selector(setHidden:) withObject:NO];
|
||||
|
||||
if (_tableView._draggedColumnIsSelected)
|
||||
[headerView setThemeState:CPThemeStateSelected];
|
||||
|
||||
var columnRect = [_tableView rectOfColumn:aColumnIndex];
|
||||
|
||||
[_tableView _reloadDataViews];
|
||||
[[_tableView headerView] setNeedsLayout];
|
||||
|
||||
[[CPCursor arrowCursor] set];
|
||||
}
|
||||
|
||||
- (BOOL)shouldResizeTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
- (BOOL)_shouldResizeTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
if (_isResizing)
|
||||
return YES;
|
||||
|
||||
if (_isTrackingColumn)
|
||||
return NO;
|
||||
|
||||
return [_tableView allowsColumnResizing] && CGRectContainsPoint([self _cursorRectForColumn:aColumnIndex], aPoint);
|
||||
}
|
||||
|
||||
- (void)startResizingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
- (void)_startResizingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
_isResizing = YES;
|
||||
_previousTrackingLocation = aPoint;
|
||||
_activeColumn = aColumnIndex;
|
||||
|
||||
var tableColumn = [[_tableView tableColumns] objectAtIndex:aColumnIndex];
|
||||
|
||||
_columnOldWidth = [tableColumn width];
|
||||
|
||||
[tableColumn setDisableResizingPosting:YES];
|
||||
[_tableView setDisableAutomaticResizing:YES];
|
||||
}
|
||||
|
||||
- (void)continueResizingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
- (void)_continueResizingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
{
|
||||
var tableColumn = [[_tableView tableColumns] objectAtIndex:aColumnIndex],
|
||||
newWidth = [tableColumn width] + aPoint.x - _previousTrackingLocation.x;
|
||||
delta = aPoint.x - _previousTrackingLocation.x,
|
||||
spacing = [_tableView intercellSpacing].width,
|
||||
newWidth = [tableColumn width] + spacing + delta,
|
||||
minWidth = [tableColumn minWidth] + spacing,
|
||||
maxWidth = [tableColumn maxWidth] + spacing;
|
||||
|
||||
if (newWidth < [tableColumn minWidth])
|
||||
if (newWidth <= minWidth)
|
||||
[[CPCursor resizeRightCursor] set];
|
||||
else if (newWidth > [tableColumn maxWidth])
|
||||
else if (newWidth >= maxWidth)
|
||||
[[CPCursor resizeLeftCursor] set];
|
||||
else
|
||||
{
|
||||
_tableView._lastColumnShouldSnap = NO;
|
||||
[tableColumn setWidth:newWidth];
|
||||
|
||||
[[CPCursor resizeLeftRightCursor] set];
|
||||
|
||||
var columnRect = [_tableView rectOfColumn:aColumnIndex],
|
||||
columnWidth = CGRectGetWidth(columnRect);
|
||||
|
||||
if ((delta > 0 && columnWidth == maxWidth) || (delta < 0 && columnWidth == minWidth))
|
||||
return;
|
||||
|
||||
var columnMinX = CGRectGetMinX(columnRect),
|
||||
columnMaxX = CGRectGetMaxX(columnRect);
|
||||
|
||||
if ((delta > 0 && aPoint.x > columnMaxX) || (delta < 0 && aPoint.x < columnMaxX))
|
||||
{
|
||||
[tableColumn setWidth:newWidth - spacing];
|
||||
|
||||
[self setNeedsLayout];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
_previousTrackingLocation = aPoint;
|
||||
}
|
||||
|
||||
- (void)stopResizingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint
|
||||
- (void)_stopResizingTableColumn:(CPInteger)aColumnIndex
|
||||
{
|
||||
var tableColumn = [[_tableView tableColumns] objectAtIndex:aColumnIndex];
|
||||
[_tableView _didResizeTableColumn:tableColumn oldWidth:_columnOldWidth];
|
||||
|
||||
if ([tableColumn width] != _columnOldWidth)
|
||||
[_tableView _didResizeTableColumn:tableColumn oldWidth:_columnOldWidth];
|
||||
|
||||
[tableColumn setDisableResizingPosting:NO];
|
||||
[_tableView setDisableAutomaticResizing:NO];
|
||||
|
||||
@@ -642,17 +780,18 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
}
|
||||
|
||||
var mouseLocation = [self convertPoint:[theEvent locationInWindow] fromView:nil],
|
||||
mouseOverLocation = CGPointMake(mouseLocation.x - 5, mouseLocation.y),
|
||||
mouseOverLocation = CGPointMake(MAX(mouseLocation.x - CPTableHeaderViewResizeZone, 0.0), mouseLocation.y),
|
||||
overColumn = [self columnAtPoint:mouseOverLocation];
|
||||
|
||||
if (overColumn >= 0 && CGRectContainsPoint([self _cursorRectForColumn:overColumn], mouseLocation))
|
||||
{
|
||||
var tableColumn = [[_tableView tableColumns] objectAtIndex:overColumn],
|
||||
spacing = [_tableView intercellSpacing].width,
|
||||
width = [tableColumn width];
|
||||
|
||||
if (width == [tableColumn minWidth])
|
||||
if (width <= [tableColumn minWidth])
|
||||
[[CPCursor resizeRightCursor] set];
|
||||
else if (width == [tableColumn maxWidth])
|
||||
else if (width >= [tableColumn maxWidth])
|
||||
[[CPCursor resizeLeftCursor] set];
|
||||
else
|
||||
[[CPCursor resizeLeftRightCursor] set];
|
||||
@@ -661,101 +800,9 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal
|
||||
[[CPCursor arrowCursor] set];
|
||||
}
|
||||
|
||||
- (void)mouseEntered:(CPEvent)theEvent
|
||||
{
|
||||
[self _updateResizeCursor:theEvent];
|
||||
}
|
||||
@end // CPTableView (CPTableViewPrivate)
|
||||
|
||||
- (void)mouseMoved:(CPEvent)theEvent
|
||||
{
|
||||
[self _updateResizeCursor:theEvent];
|
||||
}
|
||||
|
||||
- (void)mouseExited:(CPEvent)theEvent
|
||||
{
|
||||
// FIXME: we should use CPCursor push/pop (if previous currentCursor != arrow).
|
||||
[[CPCursor arrowCursor] set];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
var tableColumns = [_tableView tableColumns],
|
||||
count = [tableColumns count],
|
||||
lineThickness = [self currentValueForThemeAttribute:@"divider-thickness"];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var column = [tableColumns objectAtIndex:i],
|
||||
headerView = [column headerView],
|
||||
frame = [self headerRectOfColumn:i];
|
||||
|
||||
// Make space for the gridline on the right.
|
||||
frame.origin.x -= 0.5;
|
||||
frame.size.width -= lineThickness;
|
||||
frame.size.height -= 0.5;
|
||||
// Note: we're not adding in intercell spacing here. This setting only affects the regular
|
||||
// table cell data views, not the header. Verified in Cocoa on March 29th, 2011.
|
||||
|
||||
[headerView setFrame:frame];
|
||||
|
||||
if ([headerView superview] != self)
|
||||
[self addSubview:headerView];
|
||||
}
|
||||
|
||||
[self setBackgroundColor:[self currentValueForThemeAttribute:@"background-color"]];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)aRect
|
||||
{
|
||||
if (!_tableView || ![self drawsColumnLines])
|
||||
return;
|
||||
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
exposedColumnIndexes = [_tableView columnIndexesInRect:aRect],
|
||||
columnsArray = [],
|
||||
tableColumns = [_tableView tableColumns],
|
||||
exposedTableColumns = _tableView._exposedColumns,
|
||||
firstIndex = [exposedTableColumns firstIndex],
|
||||
exposedRange = CPMakeRange(firstIndex, [exposedTableColumns lastIndex] - firstIndex + 1),
|
||||
lineThickness = [self currentValueForThemeAttribute:@"divider-thickness"];
|
||||
|
||||
CGContextSetLineWidth(context, lineThickness);
|
||||
CGContextSetStrokeColor(context, [self currentValueForThemeAttribute:@"divider-color"]);
|
||||
|
||||
[exposedColumnIndexes getIndexes:columnsArray maxCount:-1 inIndexRange:exposedRange];
|
||||
|
||||
var columnArrayIndex = 0,
|
||||
columnArrayCount = columnsArray.length,
|
||||
columnMaxX;
|
||||
|
||||
CGContextBeginPath(context);
|
||||
|
||||
for (; columnArrayIndex < columnArrayCount; columnArrayIndex++)
|
||||
{
|
||||
// grab each column rect and add vertical lines
|
||||
var columnIndex = columnsArray[columnArrayIndex],
|
||||
columnToStroke = [self headerRectOfColumn:columnIndex];
|
||||
|
||||
columnMaxX = CGRectGetMaxX(columnToStroke);
|
||||
|
||||
CGContextMoveToPoint(context, FLOOR(columnMaxX) - 0.5 * lineThickness, ROUND(CGRectGetMinY(columnToStroke)));
|
||||
CGContextAddLineToPoint(context, FLOOR(columnMaxX) - 0.5 * lineThickness, ROUND(CGRectGetMaxY(columnToStroke)) - 1.0);
|
||||
}
|
||||
|
||||
CGContextClosePath(context);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
/*if (_isDragging)
|
||||
{
|
||||
CGContextSetFillColor(context, [CPColor grayColor]);
|
||||
CGContextFillRect(context, [self headerRectOfColumn:_activeColumn])
|
||||
}*/
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPTableHeaderViewTableViewKey = @"CPTableHeaderViewTableViewKey",
|
||||
CPTableHeaderViewDrawsColumnLines = @"CPTableHeaderViewDrawsColumnLines";
|
||||
var CPTableHeaderViewTableViewKey = @"CPTableHeaderViewTableViewKey";
|
||||
|
||||
@implementation CPTableHeaderView (CPCoding)
|
||||
|
||||
@@ -765,15 +812,6 @@ var CPTableHeaderViewTableViewKey = @"CPTableHeaderViewTableViewKey",
|
||||
{
|
||||
[self _init];
|
||||
_tableView = [aCoder decodeObjectForKey:CPTableHeaderViewTableViewKey];
|
||||
|
||||
// FIX ME: Take this out before 1.0
|
||||
if ([aCoder containsValueForKey:CPTableHeaderViewDrawsColumnLines])
|
||||
_drawsColumnLines = [aCoder decodeBoolForKey:CPTableHeaderViewDrawsColumnLines];
|
||||
else
|
||||
{
|
||||
_drawsColumnLines = YES;
|
||||
CPLog.warn("The tableview header being decoded is using an old cib. Please run Nib2Cib.");
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -783,7 +821,6 @@ var CPTableHeaderViewTableViewKey = @"CPTableHeaderViewTableViewKey",
|
||||
{
|
||||
[super encodeWithCoder:aCoder];
|
||||
[aCoder encodeObject:_tableView forKey:CPTableHeaderViewTableViewKey];
|
||||
[aCoder encodeBool:_drawsColumnLines forKey:CPTableHeaderViewDrawsColumnLines];
|
||||
}
|
||||
|
||||
@end
|
||||
+639
-589
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,63 @@
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPTableViewReloadDataTest : OJTestCase
|
||||
{
|
||||
CPWindow theWindow;
|
||||
CPTableView tableView;
|
||||
CPArray tableContent;
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
tableContent = [];
|
||||
// setup a reasonable table
|
||||
theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
styleMask:CPWindowNotSizable];
|
||||
|
||||
tableView = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||
[tableView setDataSource:self];
|
||||
|
||||
var itemIndex = 0,
|
||||
items = [@"Colonne1", @"Colonne2", @"Colonne3", @"Colonne4"];
|
||||
|
||||
for (itemIndex ; itemIndex < [items count]; itemIndex++)
|
||||
{
|
||||
var item = [items objectAtIndex:itemIndex],
|
||||
column = [[CPTableColumn alloc] initWithIdentifier:item];
|
||||
[column setEditable:YES];
|
||||
[column setMinWidth:50];
|
||||
[[column headerView] setStringValue:item];
|
||||
[tableView addTableColumn:column];
|
||||
}
|
||||
|
||||
[[theWindow contentView] addSubview:tableView];
|
||||
}
|
||||
|
||||
- (void)testReloadDataAfterModelCountChangesFromZero
|
||||
{
|
||||
tableContent = ["A", "B", "C"];
|
||||
|
||||
[tableView reloadData];
|
||||
|
||||
[tableView _enumerateViewsInRows:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 3)] columns:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 4)] usingBlock:function(view, row, column, stop)
|
||||
{
|
||||
var tableColumn = [[tableView tableColumns] objectAtIndex:column],
|
||||
expected = [tableColumn identifier] + "_" + [tableContent objectAtIndex:row];
|
||||
|
||||
[self assertTrue:([view stringValue] == expected)];
|
||||
}];
|
||||
}
|
||||
|
||||
- (int)numberOfRowsInTableView:(CPTableView)aTableView
|
||||
{
|
||||
return [tableContent count];
|
||||
}
|
||||
|
||||
- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRowIndex
|
||||
{
|
||||
return [aColumn identifier] + "_" + [tableContent objectAtIndex:aRowIndex];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,68 @@
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
[CPApplication sharedApplication];
|
||||
|
||||
@implementation CPTableViewTableColumnTest : OJTestCase
|
||||
{
|
||||
CPWindow theWindow;
|
||||
CPTableView tableView;
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
// setup a reasonable table
|
||||
theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
styleMask:CPWindowNotSizable];
|
||||
|
||||
tableView = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
|
||||
[tableView setDataSource:self];
|
||||
|
||||
var itemIndex = 0,
|
||||
items = [@"Colonne1", @"Colonne2", @"Colonne3", @"Colonne4"];
|
||||
|
||||
for (itemIndex ; itemIndex < [items count]; itemIndex++)
|
||||
{
|
||||
var item = [items objectAtIndex:itemIndex],
|
||||
column = [[CPTableColumn alloc] initWithIdentifier:item];
|
||||
[column setEditable:YES];
|
||||
[column setMinWidth:50];
|
||||
[[column headerView] setStringValue:item];
|
||||
[tableView addTableColumn:column];
|
||||
}
|
||||
|
||||
[[theWindow contentView] addSubview:tableView];
|
||||
|
||||
[tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)testRemoveTableColumn
|
||||
{
|
||||
[self assertTrue:([[tableView tableColumns] count] == 4)];
|
||||
|
||||
[tableView removeTableColumn:[[tableView tableColumns] firstObject]];
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
[self assertTrue:([[tableView tableColumns] count] == 3)];
|
||||
|
||||
[tableView removeTableColumn:[[tableView tableColumns] firstObject]];
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
[self assertTrue:([[tableView tableColumns] count] == 2)];
|
||||
|
||||
[tableView enumerateAvailableViewsUsingBlock:function(view, row, column, stop)
|
||||
{
|
||||
var tableColumn = [[tableView tableColumns] objectAtIndex:column];
|
||||
[self assert:("COLUMN_" + [tableColumn identifier] + "ROW_" + row) equals:[view objectValue]];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (int)numberOfRowsInTableView:(CPTableView)aTableView
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRowIndex
|
||||
{
|
||||
return "COLUMN_" + [aColumn identifier] + "ROW_" + aRowIndex;
|
||||
}
|
||||
|
||||
@end
|
||||
+114
-11
@@ -98,19 +98,15 @@
|
||||
[self assert:0 equals:selectionIsChangingNotificationsReceived message:"no isChanging notifications when programmatically selecting rows"];
|
||||
[self assert:1 equals:selectionDidChangeNotificationsReceived message:"didChange notifications when selecting rows"];
|
||||
|
||||
// If we remove the last row, the selection should change and we should be notified.
|
||||
[[dataSource tableEntries] removeObjectAtIndex:2];
|
||||
[tableView reloadData];
|
||||
|
||||
[self assert:0 equals:selectionIsChangingNotificationsReceived message:"no isChanging notifications when selected rows disappear"];
|
||||
[self assert:2 equals:selectionDidChangeNotificationsReceived message:"didChange notifications when selected rows disappear"];
|
||||
selectionIsChangingNotificationsReceived = 0;
|
||||
selectionDidChangeNotificationsReceived = 0;
|
||||
|
||||
[tableView selectRowIndexes:[CPIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
|
||||
[self assert:selectionDidChangeNotificationsReceived equals:3 message:"CPTableViewSelectionDidChangeNotification expected when selecting rows"];
|
||||
[self assert:selectionDidChangeNotificationsReceived equals:1 message:"CPTableViewSelectionDidChangeNotification expected when selecting rows"];
|
||||
[[dataSource tableEntries] removeObjectAtIndex:1];
|
||||
[tableView reloadData];
|
||||
|
||||
[self assert:selectionDidChangeNotificationsReceived equals:3 message:"no CPTableViewSelectionDidChangeNotification expected when removing a row which does not change the selection"];
|
||||
[self assert:selectionDidChangeNotificationsReceived equals:1 message:"no CPTableViewSelectionDidChangeNotification expected when removing a row which does not change the selection"];
|
||||
|
||||
// Reset everything.
|
||||
[dataSource setTableEntries:["A", "B", "C"]];
|
||||
@@ -125,7 +121,18 @@
|
||||
selectionIsChangingNotificationsReceived = 0;
|
||||
selectionDidChangeNotificationsReceived = 0;
|
||||
[tableView deselectAll];
|
||||
[self assert:selectionDidChangeNotificationsReceived equals:2 message:"notification for deselect all"];
|
||||
[self assert:1 equals:selectionDidChangeNotificationsReceived message:"notification for deselect all"];
|
||||
|
||||
|
||||
[tableView selectRowIndexes:[CPIndexSet indexSetWithIndex:2] byExtendingSelection:NO];
|
||||
selectionIsChangingNotificationsReceived = 0;
|
||||
selectionDidChangeNotificationsReceived = 0;
|
||||
// If we remove the last row, the selection should change and we should be notified.
|
||||
[[dataSource tableEntries] removeObjectAtIndex:2];
|
||||
[tableView reloadData];
|
||||
|
||||
[self assert:0 equals:selectionIsChangingNotificationsReceived message:"no isChanging notifications when selected rows disappear"];
|
||||
[self assert:1 equals:selectionDidChangeNotificationsReceived message:"didChange notifications when selected rows disappear"];
|
||||
}
|
||||
|
||||
- (void)selectionIsChanging:(CPNotification)aNotification
|
||||
@@ -158,10 +165,10 @@
|
||||
|
||||
// Now some text field should be the first responder.
|
||||
var fieldEditor = [theWindow firstResponder];
|
||||
[self assert:[fieldEditor class] equals:CPTextField message:"table cell editor should be a text field"];
|
||||
[self assert:CPTextField equals:[fieldEditor class] message:"table cell editor should be a text field"];
|
||||
|
||||
[fieldEditor setStringValue:"edited text"];
|
||||
[fieldEditor performClick:nil];
|
||||
[theWindow makeFirstResponder:tableView];
|
||||
|
||||
[self assert:"edited text" equals:[dataSource tableEntries][1] message:"table cell edit should propagate to model"]
|
||||
|
||||
@@ -200,6 +207,7 @@
|
||||
[tableColumn setDataView:[CustomTextView0 new]];
|
||||
[tableColumn1 setDataView:[CustomTextView1 new]];
|
||||
|
||||
// Process all events immediately to make sure table data views are reloaded.
|
||||
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
|
||||
|
||||
[self assert:50 equals:[tableView numberOfRows] message:"tableView numberOfRows should reflect content array length"];
|
||||
@@ -305,6 +313,101 @@
|
||||
[self assertTrue:[table bounds].size.width >= 200];
|
||||
}
|
||||
|
||||
// Test internal method - (void)getColumn:(Function)columnRef row:(Function)rowRef forView:(CPView)aView
|
||||
- (void)testGetColumnAndRow
|
||||
{
|
||||
var table = [[CPTableView alloc] initWithFrame:CGRectMake(0, 0, 400, 400)],
|
||||
tableColumn1 = [[CPTableColumn alloc] initWithIdentifier:@"A"],
|
||||
tableColumn2 = [[CPTableColumn alloc] initWithIdentifier:@"B"],
|
||||
delegate = [ContentBindingTableDelegate new];
|
||||
|
||||
[delegate setTester:self];
|
||||
[table setDelegate:delegate];
|
||||
|
||||
[delegate setTableEntries:[[@"A1", @"B1"], [@"A2", @"B2"], [@"A3", @"B3"]]];
|
||||
[table bind:@"content" toObject:delegate withKeyPath:@"tableEntries" options:nil];
|
||||
|
||||
[[theWindow contentView] addSubview:table];
|
||||
|
||||
[tableColumn1 setWidth:50.0];
|
||||
[tableColumn2 setWidth:100.0];
|
||||
|
||||
[table addTableColumn:tableColumn1];
|
||||
[table addTableColumn:tableColumn2];
|
||||
|
||||
var table2 = [[CPTableView alloc] initWithFrame:CGRectMake(400, 0, 400, 400)],
|
||||
table2Column1 = [[CPTableColumn alloc] initWithIdentifier:@"A"],
|
||||
table2Column2 = [[CPTableColumn alloc] initWithIdentifier:@"B"],
|
||||
delegate = [ContentBindingTableDelegate new];
|
||||
|
||||
[delegate setTester:self];
|
||||
[table2 setDelegate:delegate];
|
||||
|
||||
[delegate setTableEntries:[[@"A1", @"B1"], [@"A2", @"B2"], [@"A3", @"B3"]]];
|
||||
[table2 bind:@"content" toObject:delegate withKeyPath:@"tableEntries" options:nil];
|
||||
|
||||
[[theWindow contentView] addSubview:table2];
|
||||
|
||||
[table2Column1 setWidth:50.0];
|
||||
[table2Column2 setWidth:100.0];
|
||||
|
||||
[table2 addTableColumn:tableColumn1];
|
||||
[table2 addTableColumn:tableColumn2];
|
||||
|
||||
var row,
|
||||
column;
|
||||
|
||||
// get row and column for a nil view
|
||||
[table getColumn:@ref(column) row:@ref(row) forView:nil];
|
||||
|
||||
[self assert:CPNotFound equals:column];
|
||||
[self assert:CPNotFound equals:row];
|
||||
|
||||
// get row and column for a random view
|
||||
var v = [[CPView alloc] initWithFrame:CGRectMake(0,0,100,100)];
|
||||
|
||||
[table getColumn:@ref(column) row:@ref(row) forView:v];
|
||||
|
||||
[self assert:CPNotFound equals:column];
|
||||
[self assert:CPNotFound equals:row];
|
||||
|
||||
// get row and column for the table view
|
||||
[table getColumn:@ref(column) row:@ref(row) forView:table];
|
||||
|
||||
[self assert:CPNotFound equals:column];
|
||||
[self assert:CPNotFound equals:row];
|
||||
|
||||
// get row and column for a view outside a table column
|
||||
[table getColumn:@ref(column) row:@ref(row) forView:[theWindow contentView]];
|
||||
|
||||
[self assert:CPNotFound equals:column];
|
||||
[self assert:CPNotFound equals:row];
|
||||
|
||||
// Enumerate views inside the table view and check that rows and columns are correct
|
||||
[table enumerateAvailableViewsUsingBlock:function(dataView, aRow, aColumn, stop)
|
||||
{
|
||||
var getRow,
|
||||
getColumn;
|
||||
|
||||
[table getColumn:@ref(getColumn) row:@ref(getRow) forView:dataView];
|
||||
|
||||
[self assert:aColumn equals:getColumn];
|
||||
[self assert:aRow equals:getRow];
|
||||
}];
|
||||
|
||||
// Enumerate views inside a different table view and check that rows and columns are not found
|
||||
[table2 enumerateAvailableViewsUsingBlock:function(dataView, aRow, aColumn, stop)
|
||||
{
|
||||
var getRow,
|
||||
getColumn;
|
||||
|
||||
[table getColumn:@ref(getColumn) row:@ref(getRow) forView:dataView];
|
||||
|
||||
[self assert:CPNotFound equals:getRow];
|
||||
[self assert:CPNotFound equals:getColumn];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)testNotificationsRegistered
|
||||
{
|
||||
[self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:[@"_CPWindowDidChangeFirstResponderNotification"] message:@"Notications registered for the tableView in the notification center are wrong"];
|
||||
|
||||
+22
-2
@@ -66,7 +66,7 @@ var objj_message = function(receiver, selector, args)
|
||||
rdesc = receiver ? [receiver description] : "<null>";
|
||||
|
||||
while (c--)
|
||||
sel.splice(c + 1, 0, ":" + [args[c] description] + " ");
|
||||
sel.splice(c + 1, 0, ":" + Description(args[c], c) + " ");
|
||||
|
||||
var joined = sel.join("");
|
||||
|
||||
@@ -76,6 +76,26 @@ var objj_message = function(receiver, selector, args)
|
||||
return ("[" + rdesc + " " + joined + "]");
|
||||
};
|
||||
|
||||
function Description(object, argn)
|
||||
{
|
||||
if (object.isa)
|
||||
return [object description];
|
||||
|
||||
var type = typeof(object);
|
||||
|
||||
if (type === "function")
|
||||
return "Function";
|
||||
else if (type !== "object")
|
||||
return "Arg" + argn;
|
||||
|
||||
var desc = [];
|
||||
|
||||
for(var p in object)
|
||||
desc.push(p + ":" + object[p]);
|
||||
|
||||
return ("{" + desc.join(",") + "}");
|
||||
}
|
||||
|
||||
function CPTrace(aClassName, aSelector, displayFunction)
|
||||
{
|
||||
var aclass = CPClassFromString(aClassName);
|
||||
@@ -220,7 +240,7 @@ var getMethodNoSuper = function(cls, sel)
|
||||
/*
|
||||
Utility for moving average
|
||||
*/
|
||||
var moving_averager = function(period)
|
||||
function moving_averager(period)
|
||||
{
|
||||
var nums = [];
|
||||
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
@import <AppKit/CPTableColumn.j>
|
||||
@import <AppKit/CPTableView.j>
|
||||
|
||||
CPLogRegister(CPLogConsole);
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPArray rowData;
|
||||
CPArray rowEdits;
|
||||
Int numberOfRows;
|
||||
Int numberOfEditsKept;
|
||||
CPInteger numberOfRows;
|
||||
CPInteger numberOfEditsKept;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
@@ -26,7 +28,7 @@
|
||||
|
||||
// Initialize data structures.
|
||||
|
||||
numberOfRows = 10;
|
||||
numberOfRows = 100;
|
||||
numberOfEditsKept = 6;
|
||||
|
||||
var i = numberOfRows;
|
||||
@@ -104,6 +106,7 @@
|
||||
|
||||
- (void)tableView:(CPTableView)tableView setObjectValue:(id)aValue forTableColumn:(CPTableColumn)tableColumn row:(CPInteger)aRow
|
||||
{
|
||||
CPLog.debug(_cmd + tableColumn + aRow + aValue);
|
||||
var name = [tableColumn identifier];
|
||||
|
||||
switch (name)
|
||||
@@ -113,6 +116,7 @@
|
||||
rowEdits[aRow].unshift(rowData[aRow]);
|
||||
rowEdits[aRow].pop;
|
||||
rowData[aRow] = aValue;
|
||||
[tableView reloadData];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
@import "../../CPTrace.j"
|
||||
|
||||
CPLogRegister(CPLogConsole);
|
||||
|
||||
@@ -20,6 +21,16 @@ CPLogRegister(CPLogConsole);
|
||||
{
|
||||
// This is called when the application is done loading.
|
||||
iconImage = [[CPImage alloc] initWithContentsOfFile:"http://cappuccino-project.org/img/favicon.ico" size:CGSizeMake(16,16)];
|
||||
|
||||
var averager = moving_averager(50);
|
||||
|
||||
CPTrace("CPTableView", "load", function(receiver, selector, args, duration)
|
||||
{
|
||||
if (duration)
|
||||
console.log(receiver + " " + selector + " in " + averager(duration));
|
||||
});
|
||||
|
||||
CPTrace("CPTableHeaderView", "_startDraggingTableColumn:at:");
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* TestTableColumn
|
||||
*
|
||||
* Created by You on April 16, 2013.
|
||||
* Copyright 2013, Your Company All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
//@import "../../CPTrace.j"
|
||||
CPLogRegister(CPLogConsole);
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
@outlet CPWindow theWindow;
|
||||
@outlet CPTableView tableView;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
{
|
||||
// This is called when the application is done loading.
|
||||
//CPTrace("CPTableView", "_unloadDataViewsInRows:columns:");
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
// This is called when the cib is done loading.
|
||||
// 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.
|
||||
|
||||
// In this case, we want the window from Cib to become our full browser window
|
||||
[theWindow setFullPlatformWindow:YES];
|
||||
|
||||
[self _initializeSpreadSheetColumns];
|
||||
}
|
||||
|
||||
- (void)_initializeSpreadSheetColumns
|
||||
{
|
||||
var itemIndex = 0,
|
||||
items = [@"Colonne1", @"Colonne2", @"Colonne3", @"Colonne4"];
|
||||
|
||||
for (itemIndex ; itemIndex < [items count]; itemIndex++)
|
||||
{
|
||||
var item = [items objectAtIndex:itemIndex],
|
||||
column = [[CPTableColumn alloc] initWithIdentifier:item];
|
||||
[column setEditable:YES];
|
||||
[column setMinWidth:50];
|
||||
[[column headerView] setStringValue:item];
|
||||
[tableView addTableColumn:column];
|
||||
}
|
||||
}
|
||||
|
||||
- (@action)click:(id)sender
|
||||
{
|
||||
console.log("Before NumberOfColumns : " + [[tableView tableColumns] count]);
|
||||
|
||||
var selectedColumn = [tableView selectedColumn];
|
||||
if (selectedColumn !== CPNotFound)
|
||||
[tableView removeTableColumn:[[tableView tableColumns] objectAtIndex:selectedColumn]];
|
||||
|
||||
console.log("After NumberOfColumns : " + [[tableView tableColumns] count]);
|
||||
|
||||
var tableColunms = [tableView tableColumns],
|
||||
fails = NO;
|
||||
|
||||
[tableView enumerateAvailableViewsUsingBlock:function(view,row,column,stop)
|
||||
{
|
||||
if (([tableColunms[column] identifier] + " " + row ) != [view objectValue])
|
||||
{
|
||||
fails = YES;
|
||||
stop(YES);
|
||||
}
|
||||
}];
|
||||
|
||||
CPLog.debug("Test that data views are in the right place : " + (fails ? "FAILS":"SUCCESS"));
|
||||
}
|
||||
|
||||
- (int)numberOfRowsInTableView:(CPTableView)aTableView
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRowIndex
|
||||
{
|
||||
return [aColumn identifier] + " " + aRowIndex;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Main cib file base name</key>
|
||||
<string>MainMenu.cib</string>
|
||||
<key>CPBundleName</key>
|
||||
<string>TestTableColumn</string>
|
||||
<key>CPBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CPHumanReadableCopyright</key>
|
||||
<string>Copyright © 2013, Your Company All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Jakefile
|
||||
* TestTableColumn
|
||||
*
|
||||
* Created by You on April 16, 2013.
|
||||
* Copyright 2013, Your Company All rights reserved.
|
||||
*/
|
||||
|
||||
var ENV = require("system").env,
|
||||
FILE = require("file"),
|
||||
JAKE = require("jake"),
|
||||
task = JAKE.task,
|
||||
FileList = JAKE.FileList,
|
||||
app = require("cappuccino/jake").app,
|
||||
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
|
||||
OS = require("os");
|
||||
|
||||
app ("TestTableColumn", function(task)
|
||||
{
|
||||
task.setBuildIntermediatesPath(FILE.join("Build", "TestTableColumn.build", configuration));
|
||||
task.setBuildPath(FILE.join("Build", configuration));
|
||||
|
||||
task.setProductName("TestTableColumn");
|
||||
task.setIdentifier("com.yourcompany.TestTableColumn");
|
||||
task.setVersion("1.0");
|
||||
task.setAuthor("Your Company");
|
||||
task.setEmail("feedback @nospam@ yourcompany.com");
|
||||
task.setSummary("TestTableColumn");
|
||||
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
|
||||
task.setResources(new FileList("Resources/**"));
|
||||
task.setIndexFilePath("index.html");
|
||||
task.setInfoPlistPath("Info.plist");
|
||||
|
||||
if (configuration === "Debug")
|
||||
task.setCompilerFlags("-DDEBUG -g");
|
||||
else
|
||||
task.setCompilerFlags("-O");
|
||||
});
|
||||
|
||||
task ("default", ["TestTableColumn"], function()
|
||||
{
|
||||
printResults(configuration);
|
||||
});
|
||||
|
||||
task ("build", ["default"]);
|
||||
|
||||
task ("debug", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Debug";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("release", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Release";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("run", ["debug"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Debug", "TestTableColumn", "index.html")]);
|
||||
});
|
||||
|
||||
task ("run-release", ["release"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Release", "TestTableColumn", "index.html")]);
|
||||
});
|
||||
|
||||
task ("deploy", ["release"], function()
|
||||
{
|
||||
FILE.mkdirs(FILE.join("Build", "Deployment", "TestTableColumn"));
|
||||
OS.system(["press", "-f", FILE.join("Build", "Release", "TestTableColumn"), FILE.join("Build", "Deployment", "TestTableColumn")]);
|
||||
printResults("Deployment")
|
||||
});
|
||||
|
||||
task ("desktop", ["release"], function()
|
||||
{
|
||||
FILE.mkdirs(FILE.join("Build", "Desktop", "TestTableColumn"));
|
||||
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "TestTableColumn"), FILE.join("Build", "Desktop", "TestTableColumn", "TestTableColumn.app"));
|
||||
printResults("Desktop")
|
||||
});
|
||||
|
||||
task ("run-desktop", ["desktop"], function()
|
||||
{
|
||||
OS.system([FILE.join("Build", "Desktop", "TestTableColumn", "TestTableColumn.app", "Contents", "MacOS", "NativeHost"), "-i"]);
|
||||
});
|
||||
|
||||
function printResults(configuration)
|
||||
{
|
||||
print("----------------------------");
|
||||
print(configuration+" app built at path: "+FILE.join("Build", configuration, "TestTableColumn"));
|
||||
print("----------------------------");
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;11E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;41E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;42E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;40E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;43E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;40E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;44E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;40E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;24E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;45E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;40E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;46E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;40E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;43E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;39E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;40E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;47E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;41E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;48E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;49E;K;30;_CPCibWindowTemplateWTFlagsKeyD;K;6;CP$UIDd;2;50E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;51E;K;33;_CPCibWindowTemplateScreenRectKeyD;K;6;CP$UIDd;2;52E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;53E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;54E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;26E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;55E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;56E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;56E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewScaleKeyD;K;6;CP$UIDd;2;59E;K;18;CPViewSizeScaleKeyD;K;6;CP$UIDd;2;59E;K;17;CPViewIsScaledKeyD;K;6;CP$UIDd;2;60E;E;D;K;10;$classnameS;12;CPScrollViewK;8;$classesA;S;12;CPScrollViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPRespLine truncated
|
||||
- Resize any column.
|
||||
The column should be removed. You should not see any bold text
|
||||
in the data views. The data views should not disappear when you resize a column.D;K;6;$classD;K;6;CP$UIDd;2;74E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;132E;E;S;23;{{360, 449}, {187, 25}}S;19;{{0, 0}, {187, 25}}S;6;buttonS;27;bordered+controlSizeRegularS;22;Remove Selected ColumnS;0;d;2;14S;13;AppControllerS;20;{{1, 1}, {525, 304}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;30E;E;E;d;2;18D;K;6;$classD;K;6;CP$UIDd;2;74E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;133E;E;S;6;_NS:11S;21;{{1, 305}, {525, 17}}S;19;{{0, 0}, {525, 17}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;34E;E;E;S;6;_NS:15S;16;{{0, 0}, {0, 0}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;134E;E;E;S;20;{{224, 0}, {14, 25}}S;18;{{0, 0}, {14, 25}}S;10;cornerviewS;6;_NS:19S;17;.Lucida Grande UId;2;13D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;134E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;E;E;d;1;1f;3;0.8f;18;0.6862745098039216E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E;
|
||||
@@ -0,0 +1,515 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">13F34</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">6246</string>
|
||||
<string key="IBDocument.AppKitVersion">1265.21</string>
|
||||
<string key="IBDocument.HIToolboxVersion">698.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">6246</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>NSButton</string>
|
||||
<string>NSButtonCell</string>
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSScrollView</string>
|
||||
<string>NSScroller</string>
|
||||
<string>NSTableHeaderView</string>
|
||||
<string>NSTableView</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextFieldCell</string>
|
||||
<string>NSView</string>
|
||||
<string>NSWindowTemplate</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
|
||||
<object class="NSCustomObject" id="1021">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1014">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1050">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="972006081">
|
||||
<int key="NSWindowStyleMask">7</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{335, 390}, {576, 490}}</string>
|
||||
<int key="NSWTFlags">1946157056</int>
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<nil key="NSUserInterfaceItemIdentifier"/>
|
||||
<object class="NSView" key="NSWindowView" id="439893737">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="NSScrollView" id="937357377">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="NSClipView" id="1049983858">
|
||||
<reference key="NSNextResponder" ref="937357377"/>
|
||||
<int key="NSvFlags">2322</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="NSTableView" id="221694406">
|
||||
<reference key="NSNextResponder" ref="1049983858"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{525, 304}</string>
|
||||
<reference key="NSSuperview" ref="1049983858"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="809719892"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:13</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<bool key="NSControlAllowsExpansionToolTips">YES</bool>
|
||||
<object class="NSTableHeaderView" key="NSHeaderView" id="353947893">
|
||||
<reference key="NSNextResponder" ref="386377955"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{525, 17}</string>
|
||||
<reference key="NSSuperview" ref="386377955"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1049983858"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:16</string>
|
||||
<reference key="NSTableView" ref="221694406"/>
|
||||
</object>
|
||||
<object class="_NSCornerView" key="NSCornerView">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{224, 0}, {16, 17}}</string>
|
||||
<reference key="NSNextKeyView" ref="1049983858"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:19</string>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="NSTableColumns"/>
|
||||
<double key="NSIntercellSpacingWidth">3</double>
|
||||
<double key="NSIntercellSpacingHeight">2</double>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="NSGridColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">gridColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<double key="NSRowHeight">17</double>
|
||||
<int key="NSTvFlags">-698351616</int>
|
||||
<reference key="NSDelegate"/>
|
||||
<reference key="NSDataSource"/>
|
||||
<int key="NSColumnAutoresizingStyle">4</int>
|
||||
<int key="NSDraggingSourceMaskForLocal">15</int>
|
||||
<int key="NSDraggingSourceMaskForNonLocal">0</int>
|
||||
<bool key="NSAllowsTypeSelect">YES</bool>
|
||||
<int key="NSTableViewDraggingDestinationStyle">0</int>
|
||||
<int key="NSTableViewGroupRowStyle">1</int>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{1, 17}, {525, 304}}</string>
|
||||
<reference key="NSSuperview" ref="937357377"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="221694406"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:11</string>
|
||||
<reference key="NSDocView" ref="221694406"/>
|
||||
<object class="NSColor" key="NSBGColor" id="50405468">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlBackgroundColor</string>
|
||||
<object class="NSColor" key="NSColor" id="866913092">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<int key="NScvFlags">4</int>
|
||||
</object>
|
||||
<object class="NSScroller" id="809719892">
|
||||
<reference key="NSNextResponder" ref="937357377"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{224, 17}, {15, 102}}</string>
|
||||
<reference key="NSSuperview" ref="937357377"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="1007762720"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:58</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<reference key="NSTarget" ref="937357377"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.95065789473684215</double>
|
||||
</object>
|
||||
<object class="NSScroller" id="1007762720">
|
||||
<reference key="NSNextResponder" ref="937357377"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{1, 305}, {433, 16}}</string>
|
||||
<reference key="NSSuperview" ref="937357377"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="756226510"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:60</string>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSsFlags">1</int>
|
||||
<reference key="NSTarget" ref="937357377"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.9622222222222222</double>
|
||||
</object>
|
||||
<object class="NSClipView" id="386377955">
|
||||
<reference key="NSNextResponder" ref="937357377"/>
|
||||
<int key="NSvFlags">2338</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<reference ref="353947893"/>
|
||||
</array>
|
||||
<string key="NSFrame">{{1, 0}, {525, 17}}</string>
|
||||
<reference key="NSSuperview" ref="937357377"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="353947893"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:15</string>
|
||||
<reference key="NSDocView" ref="353947893"/>
|
||||
<reference key="NSBGColor" ref="50405468"/>
|
||||
<int key="NScvFlags">4</int>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{20, 55}, {527, 322}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="386377955"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<int key="NSsFlags">133682</int>
|
||||
<reference key="NSVScroller" ref="809719892"/>
|
||||
<reference key="NSHScroller" ref="1007762720"/>
|
||||
<reference key="NSContentView" ref="1049983858"/>
|
||||
<reference key="NSHeaderClipView" ref="386377955"/>
|
||||
<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
|
||||
<double key="NSMinMagnification">0.25</double>
|
||||
<double key="NSMaxMagnification">4</double>
|
||||
<double key="NSMagnification">1</double>
|
||||
</object>
|
||||
<object class="NSButton" id="756226510">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{354, 13}, {199, 32}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSButtonCell" key="NSCell" id="323872087">
|
||||
<int key="NSCellFlags">67108864</int>
|
||||
<int key="NSCellFlags2">134217728</int>
|
||||
<string key="NSContents">Remove Selected Column</string>
|
||||
<object class="NSFont" key="NSSupport" id="1038338288">
|
||||
<bool key="IBIsSystemFont">YES</bool>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
<reference key="NSControlView" ref="756226510"/>
|
||||
<int key="NSButtonFlags">-2038284288</int>
|
||||
<int key="NSButtonFlags2">129</int>
|
||||
<string key="NSAlternateContents"/>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
<int key="NSPeriodicDelay">200</int>
|
||||
<int key="NSPeriodicInterval">25</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
<object class="NSTextField" id="429678766">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{18, 409}, {531, 68}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="937357377"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:526</string>
|
||||
<string key="NSHuggingPriority">{251, 750}</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="660287246">
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">272630784</int>
|
||||
<string type="base64-UTF8" key="NSContents">LSBTZWxlY3QgYSB0YWJsZSBjb2x1bW4gYW5kIHJlbW92ZSBpdC4KLSBSZXNpemUgYW55IGNvbHVtbi4K
|
||||
VGhlIGNvbHVtbiBzaG91bGQgYmUgcmVtb3ZlZC4gWW91IHNob3VsZCBub3Qgc2VlIGFueSBib2xkIHRl
|
||||
eHQgCmluIHRoZSBkYXRhIHZpZXdzLiBUaGUgZGF0YSB2aWV3cyBzaG91bGQgbm90IGRpc2FwcGVhciB3
|
||||
aGVuIHlvdSByZXNpemUgYSBjb2x1bW4uA</string>
|
||||
<reference key="NSSupport" ref="1038338288"/>
|
||||
<string key="NSCellIdentifier">_NS:526</string>
|
||||
<reference key="NSControlView" ref="429678766"/>
|
||||
<object class="NSColor" key="NSBackgroundColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlColor</string>
|
||||
<reference key="NSColor" ref="866913092"/>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlTextColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{576, 490}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="429678766"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="635946545">
|
||||
<string key="NSClassName">AppController</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="1021"/>
|
||||
<reference key="destination" ref="635946545"/>
|
||||
</object>
|
||||
<int key="connectionID">451</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">theWindow</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="972006081"/>
|
||||
</object>
|
||||
<int key="connectionID">459</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">tableView</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="221694406"/>
|
||||
</object>
|
||||
<int key="connectionID">469</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">click:</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="756226510"/>
|
||||
</object>
|
||||
<int key="connectionID">472</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="221694406"/>
|
||||
<reference key="destination" ref="635946545"/>
|
||||
</object>
|
||||
<int key="connectionID">483</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="221694406"/>
|
||||
<reference key="destination" ref="635946545"/>
|
||||
</object>
|
||||
<int key="connectionID">484</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1048"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1021"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1014"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1050"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">371</int>
|
||||
<reference key="object" ref="972006081"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="439893737"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">372</int>
|
||||
<reference key="object" ref="439893737"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="937357377"/>
|
||||
<reference ref="429678766"/>
|
||||
<reference ref="756226510"/>
|
||||
</array>
|
||||
<reference key="parent" ref="972006081"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">450</int>
|
||||
<reference key="object" ref="635946545"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">460</int>
|
||||
<reference key="object" ref="937357377"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="221694406"/>
|
||||
<reference ref="1007762720"/>
|
||||
<reference ref="353947893"/>
|
||||
<reference ref="809719892"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">461</int>
|
||||
<reference key="object" ref="221694406"/>
|
||||
<array class="NSMutableArray" key="children"/>
|
||||
<reference key="parent" ref="937357377"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">462</int>
|
||||
<reference key="object" ref="1007762720"/>
|
||||
<reference key="parent" ref="937357377"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">463</int>
|
||||
<reference key="object" ref="353947893"/>
|
||||
<reference key="parent" ref="937357377"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">464</int>
|
||||
<reference key="object" ref="809719892"/>
|
||||
<reference key="parent" ref="937357377"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">470</int>
|
||||
<reference key="object" ref="756226510"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="323872087"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">471</int>
|
||||
<reference key="object" ref="323872087"/>
|
||||
<reference key="parent" ref="756226510"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">485</int>
|
||||
<reference key="object" ref="429678766"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="660287246"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">486</int>
|
||||
<reference key="object" ref="660287246"/>
|
||||
<reference key="parent" ref="429678766"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="371.IBPersistedLastKnownCanvasPosition">{343, 405}</string>
|
||||
<string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="371.IBWindowTemplateEditedContentRect">{{303, 221}, {480, 360}}</string>
|
||||
<integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/>
|
||||
<reference key="372.IBNSViewMetadataGestureRecognizers" ref="0"/>
|
||||
<string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="461.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="463.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="464.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="470.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="471.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="486.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">486</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">AppController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="actions">
|
||||
<string key="NS.key.0">click:</string>
|
||||
<string key="NS.object.0">id</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
<string key="NS.key.0">click:</string>
|
||||
<object class="IBActionInfo" key="NS.object.0">
|
||||
<string key="name">click:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="tableView">NSTableView</string>
|
||||
<string key="theWindow">NSWindow</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="tableView">
|
||||
<string key="name">tableView</string>
|
||||
<string key="candidateClassName">NSTableView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="theWindow">
|
||||
<string key="name">theWindow</string>
|
||||
<string key="candidateClassName">NSWindow</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">../.XcodeSupport/AppController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
|
||||
<integer value="1050" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="4600" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,96 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0A344A2F9A031BB2EC0B6F6B /* AppController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = .XcodeSupport/AppController.h; sourceTree = SOURCE_ROOT; };
|
||||
0FEC49B3806EE9F6A56FFF38 /* xcc_general_include.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = xcc_general_include.h; path = .XcodeSupport/xcc_general_include.h; sourceTree = SOURCE_ROOT; };
|
||||
3BDA43079FA11781DF405343 /* AppController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppController.m; path = .XcodeSupport/AppController.m; sourceTree = SOURCE_ROOT; };
|
||||
5BC541719E8140DC69A0E287 /* AppController.j */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppController.j; path = AppController.j; sourceTree = SOURCE_ROOT; };
|
||||
E164FE29172185F500263CE3 /* Resources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Resources; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
275E4AA7BE4D47921975CAED /* Cocoa Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0A344A2F9A031BB2EC0B6F6B /* AppController.h */,
|
||||
3BDA43079FA11781DF405343 /* AppController.m */,
|
||||
0FEC49B3806EE9F6A56FFF38 /* xcc_general_include.h */,
|
||||
);
|
||||
name = "Cocoa Classes";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
BB9D478D9A6A373A957A2B6D /* Cappuccino Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5BC541719E8140DC69A0E287 /* AppController.j */,
|
||||
);
|
||||
name = "Cappuccino Source";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E164FE221721857400263CE3 /* */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E164FE29172185F500263CE3 /* Resources */,
|
||||
275E4AA7BE4D47921975CAED /* Cocoa Classes */,
|
||||
BB9D478D9A6A373A957A2B6D /* Cappuccino Source */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
E164FE231721857400263CE3 /* Project Object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0460;
|
||||
};
|
||||
buildConfigurationList = E164FE261721857400263CE3 /* Build configuration list for PBXProject "Unity-iPhone" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = E164FE221721857400263CE3 /* */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
E164FE271721857400263CE3 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
E164FE281721857400263CE3 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
E164FE261721857400263CE3 /* Build configuration list for PBXProject "Unity-iPhone" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
E164FE271721857400263CE3 /* Debug */,
|
||||
E164FE281721857400263CE3 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = E164FE231721857400263CE3 /* Project Object */;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:TestTableColumn.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!--
|
||||
index-debug.html
|
||||
TestTableColumn
|
||||
|
||||
Created by You on April 16, 2013.
|
||||
Copyright 2013, Your Company All rights reserved.
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<![endif]-->
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="apple-touch-icon" href="Resources/icon.png">
|
||||
<link rel="apple-touch-startup-image" href="Resources/default.png">
|
||||
|
||||
<title>TestTableColumn</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
OBJJ_MAIN_FILE = "main.j";
|
||||
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"];
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
objj_msgSend_reset();
|
||||
|
||||
// DEBUG OPTIONS:
|
||||
|
||||
// Uncomment to enable printing of backtraces on exceptions:
|
||||
objj_msgSend_decorate(objj_backtrace_decorator);
|
||||
|
||||
// Uncomment to supress exceptions that take place inside a message
|
||||
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
|
||||
|
||||
// Uncomment to enable runtime type checking:
|
||||
//objj_msgSend_decorate(objj_typecheck_decorator);
|
||||
|
||||
// Uncomment (along with both above) to print backtraces on type check errors:
|
||||
//objj_typecheck_prints_backtrace = true;
|
||||
|
||||
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
|
||||
//CPLogUnregister(CPLogDefault);
|
||||
|
||||
// Uncomment to enable a specific logger:
|
||||
//CPLogRegister(CPLogConsole);
|
||||
//CPLogRegister(CPLogPopup);
|
||||
|
||||
// Tag view DOM elements with a "data-cappuccino-view" attribute that contains
|
||||
// the class name of the view that created them. Comment this or set to false to disable.
|
||||
appkit_tag_dom_elements = true;
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
body{margin:0; padding:0;}
|
||||
#container {position: absolute; top:50%; left:50%;}
|
||||
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
|
||||
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
|
||||
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
|
||||
</style>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<STYLE type="text/css">
|
||||
#container { position: relative; top: 50%; }
|
||||
#content { position: relative;}
|
||||
</STYLE>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body style="">
|
||||
<div id="cappuccino-body">
|
||||
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
|
||||
<script type="text/javascript">
|
||||
document.write("<div id='container'><p id='content'>" +
|
||||
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
|
||||
"Loading TestTableColumn...</p></div>");
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<div id="container">
|
||||
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
|
||||
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
|
||||
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino-project.org/noscript">Show me how to enable JavaScript</a></p>
|
||||
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
|
||||
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
|
||||
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
|
||||
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
|
||||
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
|
||||
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
|
||||
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!--
|
||||
index.html
|
||||
TestTableColumn
|
||||
|
||||
Created by You on April 16, 2013.
|
||||
Copyright 2013, Your Company All rights reserved.
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<![endif]-->
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="apple-touch-icon" href="Resources/icon.png">
|
||||
<link rel="apple-touch-startup-image" href="Resources/default.png">
|
||||
|
||||
<title>TestTableColumn</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
OBJJ_MAIN_FILE = "main.j";
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
body{margin:0; padding:0;}
|
||||
#container {position: absolute; top:50%; left:50%;}
|
||||
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
|
||||
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
|
||||
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
|
||||
</style>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<STYLE type="text/css">
|
||||
#container { position: relative; top: 50%; }
|
||||
#content { position: relative;}
|
||||
</STYLE>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body style="">
|
||||
<div id="cappuccino-body">
|
||||
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
|
||||
<script type="text/javascript">
|
||||
document.write("<div id='container'><p id='content'>" +
|
||||
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
|
||||
"Loading TestTableColumn...</p></div>");
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<div id="container">
|
||||
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
|
||||
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
|
||||
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino-project.org/noscript">Show me how to enable JavaScript</a></p>
|
||||
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
|
||||
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
|
||||
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
|
||||
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
|
||||
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
|
||||
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
|
||||
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* TestTableColumn
|
||||
*
|
||||
* Created by You on April 16, 2013.
|
||||
* Copyright 2013, Your Company All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
@import "AppController.j"
|
||||
|
||||
|
||||
function main(args, namedArgs)
|
||||
{
|
||||
CPApplicationMain(args, namedArgs);
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
@import <AppKit/CPGraphicsContext.j>
|
||||
@import "../../CPTrace.j"
|
||||
|
||||
var TABLE_DRAG_TYPE = @"TABLE_DRAG_TYPE";
|
||||
|
||||
@@ -35,6 +36,16 @@ CPLogRegister(CPLogConsole)
|
||||
connection = [CPURLConnection connectionWithRequest:request delegate:self];
|
||||
|
||||
[tableView registerForDraggedTypes:[CPArray arrayWithObject:TABLE_DRAG_TYPE]];
|
||||
|
||||
var averager = moving_averager(50);
|
||||
|
||||
CPTrace("CPTableView", "load", function(receiver, selector, args, duration)
|
||||
{
|
||||
if (duration)
|
||||
console.log(receiver + " " + selector + " in " + averager(duration));
|
||||
});
|
||||
|
||||
CPTrace("CPTableHeaderView", "_startDraggingTableColumn:at:");
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
@@ -87,6 +98,20 @@ CPLogRegister(CPLogConsole)
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
// self is the owner parameter specified in -makeViewWithIdentifier:owner:
|
||||
// This method is called each time a cib containing a CPTableCellView is instantiated.
|
||||
// Outlets are now connected and available.
|
||||
// If the view has its own xib, only the view will be instantiated and connected to the owner.
|
||||
if (externalView)
|
||||
{
|
||||
CPLog.debug(_cmd + " loaded externalView : " + externalView);
|
||||
[[externalView textField] setTextColor:[CPColor greenColor]];
|
||||
[imageView bind:CPValueURLBinding toObject:externalView withKeyPath:"objectValue.image.path" options:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (CPView)makeOrangeView
|
||||
{
|
||||
var orangeView = [[CustomView alloc] initWithFrame:CGRectMakeZero()];
|
||||
@@ -178,19 +203,6 @@ CPLogRegister(CPLogConsole)
|
||||
return [height intValue];
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
// self is the owner parameter specified in -makeViewWithIdentifier:owner:
|
||||
// This method is called each time a cib containing a CPTableCellView is instantiated.
|
||||
// Outlets are now connected and available.
|
||||
// If the view has its own xib, only the view will be instantiated and connected to the owner.
|
||||
if (externalView)
|
||||
{
|
||||
CPLog.debug(_cmd + " loaded externalView : " + externalView);
|
||||
[[externalView textField] setTextColor:[CPColor greenColor]];
|
||||
}
|
||||
}
|
||||
|
||||
// CELL VIEWS ACTIONS
|
||||
- (IBAction)_sliderAction:(id)sender
|
||||
{
|
||||
@@ -200,13 +212,18 @@ CPLogRegister(CPLogConsole)
|
||||
row = [table rowForView:sender];
|
||||
|
||||
[table noteHeightOfRowsWithIndexesChanged:[CPIndexSet indexSetWithIndex:row]];
|
||||
[table reloadData];
|
||||
}
|
||||
|
||||
// Action sent from a cellView subview to its target.
|
||||
CPLog.debug(_cmd + " value=" + [sender intValue]);
|
||||
}
|
||||
|
||||
- (void)setVariableRowHeight:(BOOL)flag
|
||||
{
|
||||
variableRowHeight = flag;
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)_textFieldNotBezeledAction:(id)sender
|
||||
{
|
||||
CPLog.debug(_cmd + " value=" + [sender stringValue]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;37E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;46E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;47E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;33E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;50E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;51E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;33E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;50E;E;D;K;10;$classnameS;21;CPCibBindingConnectorK;8;$classesA;S;21;CPCibBindingConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;43E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;11E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;52E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;53E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;54E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;56E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;37E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;59E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;60E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;37E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;61E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;62E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;59E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;63E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;37E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;64E;K;31;CPCibBindingConnectorBLine truncated
|
||||
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;44E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;36E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;45E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;46E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;47E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;32E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;50E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;32E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;10;$classnameS;21;CPCibBindingConnectorK;8;$classesA;S;21;CPCibBindingConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;42E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;11E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;51E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;52E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;53E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;55E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;42E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;42E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;60E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;61E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;62E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;42E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;63E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UILine truncated
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1070</int>
|
||||
<string key="IBDocument.SystemVersion">11G63</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2844</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.51</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<int key="IBDocument.SystemTarget">101000</int>
|
||||
<string key="IBDocument.SystemVersion">13F34</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">6250</string>
|
||||
<string key="IBDocument.AppKitVersion">1265.21</string>
|
||||
<string key="IBDocument.HIToolboxVersion">698.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">2844</string>
|
||||
<string key="NS.object.0">6250</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>NSArrayController</string>
|
||||
@@ -74,6 +74,7 @@
|
||||
<int key="NSStyle">0</int>
|
||||
<bool key="NSAnimates">NO</bool>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<bool key="NSEditable">YES</bool>
|
||||
</object>
|
||||
<object class="NSTextField" id="230105450">
|
||||
@@ -91,7 +92,7 @@
|
||||
<int key="NSCellFlags2">272631808</int>
|
||||
<string key="NSContents">Loaded From External Cib</string>
|
||||
<object class="NSFont" key="NSSupport" id="783725094">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<bool key="IBIsSystemFont">YES</bool>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
@@ -116,6 +117,8 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSPopUpButton" id="474789846">
|
||||
<reference key="NSNextResponder" ref="867617809"/>
|
||||
@@ -127,7 +130,7 @@
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSPopUpButtonCell" key="NSCell" id="412537776">
|
||||
<int key="NSCellFlags">-2076049856</int>
|
||||
<int key="NSCellFlags">-2076180416</int>
|
||||
<int key="NSCellFlags2">2048</int>
|
||||
<reference key="NSSupport" ref="783725094"/>
|
||||
<string key="NSCellIdentifier">_NS:9</string>
|
||||
@@ -191,6 +194,7 @@
|
||||
<bool key="NSAltersState">YES</bool>
|
||||
<int key="NSArrowPosition">2</int>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{375, 108}</string>
|
||||
@@ -209,7 +213,7 @@
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<array key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">textField</string>
|
||||
@@ -258,26 +262,6 @@
|
||||
</object>
|
||||
<int key="connectionID">7</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">valueURL: objectValue.image.path</string>
|
||||
<reference key="source" ref="624486786"/>
|
||||
<reference key="destination" ref="867617809"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="624486786"/>
|
||||
<reference key="NSDestination" ref="867617809"/>
|
||||
<string key="NSLabel">valueURL: objectValue.image.path</string>
|
||||
<string key="NSBinding">valueURL</string>
|
||||
<string key="NSKeyPath">objectValue.image.path</string>
|
||||
<object class="NSDictionary" key="NSOptions">
|
||||
<string key="NS.key.0">NSValidatesImmediately</string>
|
||||
<boolean value="YES" key="NS.object.0"/>
|
||||
</object>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">163</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">hidden: objectValue.image</string>
|
||||
@@ -528,15 +512,78 @@
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">TableViewDelegate</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="_sliderAction:">id</string>
|
||||
<string key="_textFieldBezeledAction:">id</string>
|
||||
<string key="_textFieldNotBezeledAction:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="_sliderAction:">
|
||||
<string key="name">_sliderAction:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="_textFieldBezeledAction:">
|
||||
<string key="name">_textFieldBezeledAction:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="_textFieldNotBezeledAction:">
|
||||
<string key="name">_textFieldNotBezeledAction:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="contentController">NSArrayController</string>
|
||||
<string key="externalView">NSView</string>
|
||||
<string key="imageView">NSImageView</string>
|
||||
<string key="personView">NSView</string>
|
||||
<string key="placeView">NSView</string>
|
||||
<string key="textField">NSTextField</string>
|
||||
<string key="view">NSTableCellView</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="contentController">
|
||||
<string key="name">contentController</string>
|
||||
<string key="candidateClassName">NSArrayController</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="externalView">
|
||||
<string key="name">externalView</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="imageView">
|
||||
<string key="name">imageView</string>
|
||||
<string key="candidateClassName">NSImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="personView">
|
||||
<string key="name">personView</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="placeView">
|
||||
<string key="name">placeView</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="textField">
|
||||
<string key="name">textField</string>
|
||||
<string key="candidateClassName">NSTextField</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="view">
|
||||
<string key="name">view</string>
|
||||
<string key="candidateClassName">NSTableCellView</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/TableViewDelegate.h</string>
|
||||
<string key="minorKey">../.XcodeSupport/AppController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="4600" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
|
||||
Reference in new issue
Block a user