Formatting

This commit is contained in:
Aparajita Fishman
2013-02-21 07:39:57 -05:00
parent 109f59ab6c
commit fb01ceb2a9
2 changed files with 10 additions and 5 deletions
+6 -5
View File
@@ -2350,16 +2350,17 @@ NOT YET IMPLEMENTED
autosaveName = [self autosaveName],
tableColumns = [userDefaults objectForKey:[self _columnsKeyForAutosaveName:autosaveName]];
if([tableColumns count] != [[self tableColumns] count])
if ([tableColumns count] != [[self tableColumns] count])
return;
for (var i = 0; i < [tableColumns count]; i++)
{
var metaData = [tableColumns objectAtIndex:i],
columnIdentifier = [metaData objectForKey:@"identifier"],
column = [self columnWithIdentifier:columnIdentifier],
tableColumn = [self tableColumnWithIdentifier:columnIdentifier];
if(tableColumn && column != CPNotFound)
if (tableColumn && column != CPNotFound)
{
[self _moveColumn:column toColumn:i];
[tableColumn setWidth:[metaData objectForKey:@"width"]];
@@ -2887,7 +2888,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
[self _setObjectValueForTableColumn:tableColumn row:row forView:dataView];
[view addSubview:dataView];
[_draggingViews addObject:dataView];
row = [theDraggedRows indexGreaterThanIndex:row];
}
}
@@ -4551,7 +4552,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
{
[self _enqueueReusableDataView:dataView];
}];
[_draggingViews removeAllObjects];
}
@@ -54,6 +54,7 @@ tableTestDragType = @"CPTableViewTestDragType";
var iconView = [[CPImageView alloc] initWithFrame:CGRectMake(16, 16, 0, 0)];
[iconView setImageScaling:CPImageScaleNone];
var iconColumn = [[CPTableColumn alloc] initWithIdentifier:"icons"];
[iconColumn setWidth:32.0];
[iconColumn setMinWidth:32.0];
@@ -63,6 +64,7 @@ tableTestDragType = @"CPTableViewTestDragType";
var desc = [CPSortDescriptor sortDescriptorWithKey:@"self" ascending:YES];
for (var i = 1; i <= 5; i++)
{
var column = [[CPTableColumn alloc] initWithIdentifier:String(i)];
@@ -79,6 +81,7 @@ tableTestDragType = @"CPTableViewTestDragType";
if (i === 2)
randomColumn = column;
}
[tableView setAutosaveTableColumns:YES];
[tableView setAutosaveName:@"TableTest"];
@@ -201,6 +204,7 @@ tableTestDragType = @"CPTableViewTestDragType";
[tableView2 addTableColumn:checkBoxColumn];
var desc = [CPSortDescriptor sortDescriptorWithKey:@"self" ascending:YES];
for (var i = 1; i <= 3; i++)
{
var column = [[CPTableColumn alloc] initWithIdentifier:String(i)];