aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-07-22 16:44:09 +0000
committerstuconnolly <stuart02@gmail.com>2009-07-22 16:44:09 +0000
commit4b40211b434928dd88a99142a813b46a2dacc95a (patch)
tree4ab0b73d866c465adef4b300e72304fddf9f79a8 /Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
parent48ca39af327bbba4a0fc565c37d3e165758cf731 (diff)
downloadsequelpro-4b40211b434928dd88a99142a813b46a2dacc95a.tar.gz
sequelpro-4b40211b434928dd88a99142a813b46a2dacc95a.tar.bz2
sequelpro-4b40211b434928dd88a99142a813b46a2dacc95a.zip
Remove delegate calls asking for SP specific TableDocument ivars, replacing them with more generic delegate methods.
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m14
1 files changed, 7 insertions, 7 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 55fbca84..2871070f 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -371,13 +371,13 @@ static BOOL sTruncateLongFieldInLogs = YES;
BOOL currentEncodingUsesLatin1Transport = NO;
NSString *currentDatabase = nil;
- // Store the current database and encoding so they can be re-set if reconnection was successful
- if (delegate && [delegate valueForKey:@"selectedDatabase"]) {
- currentDatabase = [NSString stringWithString:[delegate valueForKey:@"selectedDatabase"]];
+ // Store the currently selected database and encoding so they can be re-set if reconnection was successful
+ if (delegate && [delegate respondsToSelector:@selector(onReconnectShouldSelectDatabase:)]) {
+ currentDatabase = [NSString stringWithString:[delegate onReconnectShouldSelectDatabase:self]];
}
- if (delegate && [delegate valueForKey:@"_encoding"]) {
- currentEncoding = [NSString stringWithString:[delegate valueForKey:@"_encoding"]];
+ if (delegate && [delegate respondsToSelector:@selector(onReconnectShouldUseEncoding:)]) {
+ currentEncoding = [NSString stringWithString:[delegate onReconnectShouldUseEncoding:self]];
}
if (delegate && [delegate respondsToSelector:@selector(connectionEncodingViaLatin1:)]) {
@@ -681,8 +681,8 @@ static void forcePingTimeout(int signalNumber)
connectionStartTime = mach_absolute_time();
[self fetchMaxAllowedPacket];
- if (delegate && [delegate valueForKey:@"_encoding"]) {
- [self queryString:[NSString stringWithFormat:@"/*!40101 SET NAMES '%@' */", [NSString stringWithString:[delegate valueForKey:@"_encoding"]]]];
+ if (delegate && [delegate respondsToSelector:@selector(onReconnectShouldUseEncoding:)]) {
+ [self queryString:[NSString stringWithFormat:@"/*!40101 SET NAMES '%@' */", [NSString stringWithString:[delegate onReconnectShouldUseEncoding:self]]]];
if (delegate && [delegate respondsToSelector:@selector(connectionEncodingViaLatin1:)]) {
if ([delegate connectionEncodingViaLatin1:self]) [self queryString:@"/*!40101 SET CHARACTER_SET_RESULTS=latin1 */"];
}