aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-06-05 15:41:52 +0000
committerrowanbeentje <rowan@beent.je>2010-06-05 15:41:52 +0000
commit9131b074138b00e354064410b89b5d14a6ee0c40 (patch)
tree4f5407022b0a0561cc1d46e2f912a6b3b2202c42 /Source/SPTableContent.m
parent3adafb4e0bb38776f71302fd241be3bc677730d7 (diff)
downloadsequelpro-9131b074138b00e354064410b89b5d14a6ee0c40.tar.gz
sequelpro-9131b074138b00e354064410b89b5d14a6ee0c40.tar.bz2
sequelpro-9131b074138b00e354064410b89b5d14a6ee0c40.zip
- Ensure SPTableInfo reloads occur on the main thread, fixing a number of logged exceptions for beyond-bound index accesses
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index a03e17a7..de827982 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -2667,8 +2667,8 @@
maxNumRowsIsEstimate = NO;
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%ld", (long)maxNumRows] forKey:@"Rows"];
[tableDataInstance setStatusValue:@"y" forKey:@"RowsCountAccurate"];
- [tableInfoInstance tableChanged:nil];
- [[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] performSelectorOnMainThread:@selector(loadTable:) withObject:selectedTable waitUntilDone:YES];
+ [[tableInfoInstance onMainThread] tableChanged:nil];
+ [[[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] onMainThread] loadTable:selectedTable];
// Otherwise, if the table status value is accurate, use it
} else if ([[tableDataInstance statusValueForKey:@"RowsCountAccurate"] boolValue]) {
@@ -2686,8 +2686,8 @@
maxNumRowsIsEstimate = NO;
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%ld", (long)maxNumRows] forKey:@"Rows"];
[tableDataInstance setStatusValue:@"y" forKey:@"RowsCountAccurate"];
- [tableInfoInstance tableChanged:nil];
- [[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] performSelectorOnMainThread:@selector(loadTable:) withObject:selectedTable waitUntilDone:YES];
+ [[tableInfoInstance onMainThread] tableChanged:nil];
+ [[[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] onMainThread] loadTable:selectedTable];
// Use the estimate count
} else {
@@ -2719,7 +2719,7 @@
}
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%ld", (long)maxNumRows] forKey:@"Rows"];
[tableDataInstance setStatusValue:maxNumRowsIsEstimate?@"n":@"y" forKey:@"RowsCountAccurate"];
- [tableInfoInstance tableChanged:nil];
+ [[tableInfoInstance onMainThread] tableChanged:nil];
}
}