From 34080e5dc8394b070986800eb748c1d6ac12b8ba Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Tue, 10 May 2011 18:38:20 +0000 Subject: During a table data refresh within SPTableContent's loadTable: remember to ensure that endTask is called before bailing in the event of error occurring (e.g. corrupt table) in order to re-enable various interface controls. Fixes issue #1046. --- Source/SPTableContent.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 6422ff7e..82bdbfcc 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -223,7 +223,6 @@ */ - (void)loadTable:(NSString *)aTable { - // Abort the reload if the user is still editing a row if ( isEditingRow ) return; @@ -231,6 +230,8 @@ // If no table has been supplied, clear the table interface and return if (!aTable || [aTable isEqualToString:@""]) { [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:nil waitUntilDone:YES]; + [tableDocumentInstance performSelectorOnMainThread:@selector(endTask) withObject:nil waitUntilDone:YES]; + return; } @@ -238,6 +239,8 @@ // while retrieving table data), or if the Rows variable is null, clear and return if (![tableDataInstance tableEncoding] || [[[tableDataInstance statusValues] objectForKey:@"Rows"] isNSNull]) { [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:nil waitUntilDone:YES]; + [tableDocumentInstance performSelectorOnMainThread:@selector(endTask) withObject:nil waitUntilDone:YES]; + return; } @@ -1335,7 +1338,6 @@ */ - (IBAction)filterTable:(id)sender { - if(sender == filterTableFilterButton) activeFilter = 1; else if([sender isKindOfClass:[NSString class]] && [(NSString *)sender length]) { -- cgit v1.2.3