aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTablesList.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-25 23:42:27 +0100
committerMax <post@wickenrode.com>2015-10-25 23:42:27 +0100
commit2ed7473afe7bcc9ab7243f3347a5112d917b7385 (patch)
tree1971289d8acda331e1a8939cbf40715d654f9c7e /Source/SPTablesList.m
parent80272af56eb0236f4c56e60bf0661f036c6e311b (diff)
downloadsequelpro-2ed7473afe7bcc9ab7243f3347a5112d917b7385.tar.gz
sequelpro-2ed7473afe7bcc9ab7243f3347a5112d917b7385.tar.bz2
sequelpro-2ed7473afe7bcc9ab7243f3347a5112d917b7385.zip
Wrap a repeated call in a simpler method
Diffstat (limited to 'Source/SPTablesList.m')
-rw-r--r--Source/SPTablesList.m18
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index 4189d618..7449a2cf 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -357,10 +357,10 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable";
// Query the structure of all databases in the background
if (sender == self)
// Invoked by SP
- [NSThread detachNewThreadWithName:SPCtxt(@"SPNavigatorController database structure querier", tableDocumentInstance) target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:nil];
+ [[tableDocumentInstance databaseStructureRetrieval] queryDbStructureInBackgroundWithUserInfo:nil];
else
// User press refresh button ergo force update
- [NSThread detachNewThreadWithName:SPCtxt(@"SPNavigatorController database structure querier", tableDocumentInstance) target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:@{@"forceUpdate" : @YES, @"cancelQuerying" : @YES}];
+ [[tableDocumentInstance databaseStructureRetrieval] queryDbStructureInBackgroundWithUserInfo:@{@"forceUpdate" : @YES, @"cancelQuerying" : @YES}];
}
/**
@@ -1611,7 +1611,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable";
#endif
// Query the structure of all databases in the background (mainly for completion)
- [NSThread detachNewThreadWithName:SPCtxt(@"SPNavigatorController database structure querier", tableDocumentInstance) target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:@{@"forceUpdate" : @YES}];
+ [[tableDocumentInstance databaseStructureRetrieval] queryDbStructureInBackgroundWithUserInfo:@{@"forceUpdate" : @YES}];
}
#ifndef SP_CODA
@@ -2266,10 +2266,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable";
#endif
// Query the structure of all databases in the background (mainly for completion)
- [NSThread detachNewThreadWithName:SPCtxt(@"SPNavigatorController database structure querier", tableDocumentInstance)
- target:[tableDocumentInstance databaseStructureRetrieval]
- selector:@selector(queryDbStructureWithUserInfo:)
- object:@{@"forceUpdate" : @YES}];
+ [[tableDocumentInstance databaseStructureRetrieval] queryDbStructureInBackgroundWithUserInfo:@{@"forceUpdate" : @YES}];
}
#ifndef SP_CODA /* operations performed on whole tables */
@@ -2417,10 +2414,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable";
#endif
// Query the structure of all databases in the background (mainly for completion)
- [NSThread detachNewThreadWithName:SPCtxt(@"SPNavigatorController database structure querier", tableDocumentInstance)
- target:[tableDocumentInstance databaseStructureRetrieval]
- selector:@selector(queryDbStructureWithUserInfo:)
- object:@{@"forceUpdate" : @YES}];
+ [[tableDocumentInstance databaseStructureRetrieval] queryDbStructureInBackgroundWithUserInfo:@{@"forceUpdate" : @YES}];
}
else {
// Error while creating new table
@@ -2640,7 +2634,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable";
[tableDocumentInstance loadTable:selectedTableName ofType:selectedTableType];
// Query the structure of all databases in the background (mainly for completion)
- [NSThread detachNewThreadWithName:SPCtxt(@"SPNavigatorController database structure querier", tableDocumentInstance) target:[tableDocumentInstance databaseStructureRetrieval] selector:@selector(queryDbStructureWithUserInfo:) object:@{@"forceUpdate" : @YES}];
+ [[tableDocumentInstance databaseStructureRetrieval] queryDbStructureInBackgroundWithUserInfo:@{@"forceUpdate" : @YES}];
}
#endif