From 4cad6f0e6e4fb497b480256c2abe3de34ebf225c Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 16 Apr 2012 20:16:52 +0000 Subject: Bring outline view branch up to date with trunk. --- .../Versions/A/FeedbackReporter | Bin 268516 -> 268516 bytes Frameworks/PSMTabBar/PSMRolloverButton.m | 4 + Frameworks/PSMTabBar/PSMTabBarControl.h | 2 + Frameworks/PSMTabBar/PSMTabBarControl.m | 103 +- Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m | 21 +- .../QueryKit/QueryKit.xcodeproj/project.pbxproj | 64 +- Frameworks/QueryKit/Source/QKQuery.h | 16 +- Frameworks/QueryKit/Source/QKQuery.m | 129 +- Frameworks/QueryKit/Source/QKQueryOperators.h | 4 +- Frameworks/QueryKit/Source/QKQueryParameter.h | 4 +- Frameworks/QueryKit/Source/QKQueryParameter.m | 4 +- Frameworks/QueryKit/Source/QKQueryTypes.h | 4 +- .../QueryKit/Source/QKQueryUpdateParameter.h | 59 + .../QueryKit/Source/QKQueryUpdateParameter.m | 81 + Frameworks/QueryKit/Source/QKQueryUtilities.h | 4 +- Frameworks/QueryKit/Source/QKQueryUtilities.m | 4 +- Frameworks/QueryKit/Source/QueryKit.h | 4 +- .../QueryKit/Tests/QKSelectQueryGroupByTests.h | 4 +- .../QueryKit/Tests/QKSelectQueryGroupByTests.m | 4 +- .../QueryKit/Tests/QKSelectQueryOrderByTests.h | 4 +- .../QueryKit/Tests/QKSelectQueryOrderByTests.m | 4 +- Frameworks/QueryKit/Tests/QKSelectQueryTests.h | 4 +- Frameworks/QueryKit/Tests/QKSelectQueryTests.m | 4 +- Frameworks/QueryKit/Tests/QKUpdateQueryTests.h | 39 + Frameworks/QueryKit/Tests/QKUpdateQueryTests.m | 82 + .../MySQL Client Libraries/include/my_alloc.h | 13 +- .../MySQL Client Libraries/include/my_list.h | 6 +- .../MySQL Client Libraries/include/mysql.h | 213 +- .../MySQL Client Libraries/include/mysql_com.h | 82 +- .../MySQL Client Libraries/include/mysql_embed.h | 31 - .../MySQL Client Libraries/include/mysql_version.h | 8 +- .../MySQL Client Libraries/include/typelib.h | 19 +- .../MySQL Client Libraries/lib/libmysqlclient.a | Bin 4477284 -> 12882756 bytes Frameworks/SPMySQLFramework/Resources/Info.plist | 10 +- .../SPMySQLFramework.xcodeproj/project.pbxproj | 7 +- Frameworks/SPMySQLFramework/Source/SPMySQL.h | 4 + .../Databases & Tables.m | 1 + .../Delegate & Proxy.h | 8 + .../Delegate & Proxy.m | 28 +- .../Source/SPMySQLConnection Categories/Encoding.m | 1 + .../Querying & Preparation.m | 12 + .../SPMySQLFramework/Source/SPMySQLConnection.h | 3 - .../SPMySQLFramework/Source/SPMySQLConnection.m | 12 +- .../Source/SPMySQLFastStreamingResult.m | 5 + .../SPMySQLResult Categories/Convenience Methods.m | 2 +- .../Source/SPMySQLStreamingResult.m | 6 + Frameworks/SPMySQLFramework/build-mysql-client.sh | 175 +- Interfaces/English.lproj/QueryFavoriteManager.xib | 13953 +++++++++-------- Interfaces/English.lproj/UserManagerView.xib | 15248 ++++++++++--------- Resources/English.lproj/InfoPlist.strings | 4 +- Resources/English.lproj/Localizable.strings | Bin 227904 -> 230192 bytes Resources/Plists/Info.plist | 2 +- Resources/ru.lproj/Credits.rtf | 30 +- Source/DMLocalizedNibBundle.m | 2 + Source/DeepMutableCopy.h | 10 - Source/MGTemplateEngine.m | 3 +- Source/SPAppController.h | 3 + Source/SPAppController.m | 15 +- Source/SPBundleHTMLOutputController.m | 4 +- Source/SPCSVExporter.m | 2 +- Source/SPCSVParser.m | 2 +- Source/SPConnectionController.h | 3 +- Source/SPConnectionController.m | 4 +- Source/SPConnectionDelegate.h | 2 +- Source/SPConnectionDelegate.m | 10 +- Source/SPConnectionHandler.m | 3 +- Source/SPConstants.h | 2 + Source/SPConstants.m | 2 + Source/SPContentFilterManager.m | 8 + Source/SPCopyTable.m | 67 +- Source/SPCustomQuery.h | 2 +- Source/SPCustomQuery.m | 38 +- Source/SPDataAdditions.h | 6 +- Source/SPDataAdditions.m | 40 +- Source/SPDataImport.m | 14 +- Source/SPDatabaseCopy.m | 2 +- Source/SPDatabaseData.m | 14 +- Source/SPDatabaseDocument.h | 15 +- Source/SPDatabaseDocument.m | 222 +- Source/SPDatabaseInfo.m | 2 +- Source/SPDatabaseRename.m | 2 +- Source/SPDatabaseStructure.h | 5 +- Source/SPDatabaseStructure.m | 2 +- Source/SPDatabaseViewController.m | 4 +- Source/SPEditorPreferencePane.m | 1 - Source/SPExportController.h | 23 +- Source/SPExportController.m | 130 +- Source/SPExportControllerDelegate.m | 28 +- Source/SPExportFile.m | 3 +- Source/SPExportFileUtilities.m | 2 +- Source/SPExportFilenameUtilities.m | 89 +- Source/SPExportInitializer.m | 12 +- Source/SPExportInterfaceController.h | 44 + Source/SPExportInterfaceController.m | 152 + Source/SPExtendedTableInfo.m | 21 +- Source/SPFieldEditorController.m | 24 +- Source/SPFieldMapperController.h | 2 +- Source/SPFieldMapperController.m | 22 +- Source/SPFileHandle.m | 4 +- Source/SPFontPreviewTextField.h | 6 - Source/SPFontPreviewTextField.m | 53 +- Source/SPHistoryController.m | 12 +- Source/SPIndexesController.m | 19 +- Source/SPLogger.m | 3 +- Source/SPNarrowDownCompletion.m | 5 +- Source/SPNavigatorController.m | 12 +- Source/SPPrintController.m | 2 +- Source/SPProcessListController.m | 6 +- Source/SPQueryController.m | 2 + Source/SPQueryFavoriteManager.m | 81 +- Source/SPSQLExporter.m | 147 +- Source/SPSSHTunnel.h | 4 +- Source/SPSSHTunnel.m | 2 +- Source/SPServerSupport.h | 6 + Source/SPServerSupport.m | 5 + Source/SPServerVariablesController.m | 2 +- Source/SPTableContent.h | 138 +- Source/SPTableContent.m | 1300 +- Source/SPTableContentDataSource.h | 37 + Source/SPTableContentDataSource.m | 182 + Source/SPTableContentDelegate.h | 37 + Source/SPTableContentDelegate.m | 782 + Source/SPTableCopy.m | 2 +- Source/SPTableData.h | 1 + Source/SPTableData.m | 106 +- Source/SPTableRelations.m | 2 +- Source/SPTableStructure.m | 18 +- Source/SPTableStructureDelegate.m | 4 +- Source/SPTableTriggers.m | 2 +- Source/SPTableView.m | 28 + Source/SPTablesList.h | 19 +- Source/SPTablesList.m | 356 +- Source/SPTablesPreferencePane.m | 1 - Source/SPTextView.h | 7 + Source/SPTextView.m | 13 +- Source/SPTextViewAdditions.m | 10 +- Source/SPUserManager.h | 7 +- Source/SPUserManager.m | 568 +- Source/SPUserManagerDelegate.h | 29 + Source/SPUserManagerDelegate.m | 316 + Source/SPWindowController.m | 379 +- Source/SPWindowControllerDelegate.h | 37 + Source/SPWindowControllerDelegate.m | 433 + Source/SPXMLExporter.m | 6 +- Source/SPXMLExporterDelegate.m | 2 +- UnitTests/MCPKitTest.h | 46 - UnitTests/MCPKitTest.m | 123 - sequel-pro.xcodeproj/project.pbxproj | 123 +- 148 files changed, 19846 insertions(+), 17237 deletions(-) create mode 100644 Frameworks/QueryKit/Source/QKQueryUpdateParameter.h create mode 100644 Frameworks/QueryKit/Source/QKQueryUpdateParameter.m create mode 100644 Frameworks/QueryKit/Tests/QKUpdateQueryTests.h create mode 100644 Frameworks/QueryKit/Tests/QKUpdateQueryTests.m delete mode 100644 Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_embed.h delete mode 100644 Source/DeepMutableCopy.h create mode 100644 Source/SPExportInterfaceController.h create mode 100644 Source/SPExportInterfaceController.m create mode 100644 Source/SPTableContentDataSource.h create mode 100644 Source/SPTableContentDataSource.m create mode 100644 Source/SPTableContentDelegate.h create mode 100644 Source/SPTableContentDelegate.m create mode 100644 Source/SPUserManagerDelegate.h create mode 100644 Source/SPUserManagerDelegate.m create mode 100644 Source/SPWindowControllerDelegate.h create mode 100644 Source/SPWindowControllerDelegate.m delete mode 100644 UnitTests/MCPKitTest.h delete mode 100644 UnitTests/MCPKitTest.m diff --git a/Frameworks/FeedbackReporter.framework/Versions/A/FeedbackReporter b/Frameworks/FeedbackReporter.framework/Versions/A/FeedbackReporter index 6b9802a9..67f472ab 100755 Binary files a/Frameworks/FeedbackReporter.framework/Versions/A/FeedbackReporter and b/Frameworks/FeedbackReporter.framework/Versions/A/FeedbackReporter differ diff --git a/Frameworks/PSMTabBar/PSMRolloverButton.m b/Frameworks/PSMTabBar/PSMRolloverButton.m index 988abbb2..eebbd68e 100644 --- a/Frameworks/PSMTabBar/PSMRolloverButton.m +++ b/Frameworks/PSMTabBar/PSMRolloverButton.m @@ -24,6 +24,8 @@ [self resetCursorRects]; _myTrackingRectTag = -1; + _rolloverImage = nil; + _usualImage = nil; } - (void)dealloc @@ -31,6 +33,8 @@ [[NSNotificationCenter defaultCenter] removeObserver:self]; [self removeTrackingRect]; + [_rolloverImage release]; + [_usualImage release]; [super dealloc]; } diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.h b/Frameworks/PSMTabBar/PSMTabBarControl.h index 481bb3b8..d2cbc534 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.h +++ b/Frameworks/PSMTabBar/PSMTabBarControl.h @@ -16,6 +16,7 @@ #define PSMTabDragDidBeginNotification @"PSMTabDragDidBeginNotification" #define kPSMTabBarControlHeight 22 +#define kPSMTabBarControlHeightCollapsed 1 // internal cell border #define MARGIN_X 6 #define MARGIN_Y 3 @@ -205,6 +206,7 @@ enum { - (void)hideTabBar:(BOOL)hide animate:(BOOL)animate; - (BOOL)isTabBarHidden; - (BOOL)isAnimating; +- (void)destroyAnimations; // internal bindings methods also used by the tab drag assistant - (void)bindPropertiesForCell:(PSMTabBarCell *)cell andTabViewItem:(NSTabViewItem *)item; diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index a38c50b0..2a92a2b1 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -202,17 +202,8 @@ - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - - //stop any animations that may be running - [_animationTimer invalidate]; - [_animationTimer release]; _animationTimer = nil; - - [_showHideAnimationTimer invalidate]; - [_showHideAnimationTimer release]; _showHideAnimationTimer = nil; - //Also unwind the spring, if it's wound. - [_springTimer invalidate]; - [_springTimer release]; _springTimer = nil; + [self destroyAnimations]; //unbind all the items to prevent crashing //not sure if this is necessary or not @@ -796,7 +787,7 @@ - (void)hideTabBar:(BOOL)hide animate:(BOOL)animate { - if (!_awakenedFromNib || (_isHidden && hide) || (!_isHidden && !hide) || (_currentStep != kPSMIsNotBeingResized)) { + if (!_awakenedFromNib || (_isHidden && hide) || (!_isHidden && !hide)) { return; } @@ -830,55 +821,35 @@ partnerOriginalSize = [[self window] frame].size.height; partnerOriginalOrigin = [[self window] frame].origin.y; } - + + // Determine the target sizes + if (_isHidden) { + myTargetSize = kPSMTabBarControlHeightCollapsed; + } else { + myTargetSize = kPSMTabBarControlHeight; + } + if (partnerView) { + partnerTargetSize = partnerOriginalSize + myOriginalSize - myTargetSize; + // above or below me? - if ((myOriginalOrigin - 22) > partnerOriginalOrigin) { - // partner is below me - if (_isHidden) { - // I'm shrinking - myTargetOrigin = myOriginalOrigin + 21; - myTargetSize = myOriginalSize - 21; - partnerTargetOrigin = partnerOriginalOrigin; - partnerTargetSize = partnerOriginalSize + 21; - } else { - // I'm growing - myTargetOrigin = myOriginalOrigin - 21; - myTargetSize = myOriginalSize + 21; - partnerTargetOrigin = partnerOriginalOrigin; - partnerTargetSize = partnerOriginalSize - 21; - } + if ((myOriginalOrigin - kPSMTabBarControlHeight) > partnerOriginalOrigin) { + + // partner is below me, keeps its origin + partnerTargetOrigin = partnerOriginalOrigin; + myTargetOrigin = myOriginalOrigin + myOriginalSize - myTargetSize; } else { - // partner is above me - if (_isHidden) { - // I'm shrinking - myTargetOrigin = myOriginalOrigin; - myTargetSize = myOriginalSize - 21; - partnerTargetOrigin = partnerOriginalOrigin - 21; - partnerTargetSize = partnerOriginalSize + 21; - } else { - // I'm growing - myTargetOrigin = myOriginalOrigin; - myTargetSize = myOriginalSize + 21; - partnerTargetOrigin = partnerOriginalOrigin + 21; - partnerTargetSize = partnerOriginalSize - 21; - } + + // partner is above me, I keep my origin + myTargetOrigin = myOriginalOrigin; + partnerTargetOrigin = partnerOriginalOrigin + myOriginalSize - myTargetSize; } } else { + // for window movement - if (_isHidden) { - // I'm shrinking - myTargetOrigin = myOriginalOrigin; - myTargetSize = myOriginalSize - 21; - partnerTargetOrigin = partnerOriginalOrigin + 21; - partnerTargetSize = partnerOriginalSize - 21; - } else { - // I'm growing - myTargetOrigin = myOriginalOrigin; - myTargetSize = myOriginalSize + 21; - partnerTargetOrigin = partnerOriginalOrigin - 21; - partnerTargetSize = partnerOriginalSize + 21; - } + myTargetOrigin = myOriginalOrigin; + partnerTargetOrigin = partnerOriginalOrigin + myOriginalSize - myTargetSize; + partnerTargetSize = partnerOriginalSize - myOriginalSize + myTargetSize; } } else /* vertical */ { // current (original) values @@ -1046,6 +1017,21 @@ partnerView = view; } +- (void)destroyAnimations +{ + // Stop any animations that may be running + + [_animationTimer invalidate]; + [_animationTimer release]; _animationTimer = nil; + + [_showHideAnimationTimer invalidate]; + [_showHideAnimationTimer release]; _showHideAnimationTimer = nil; + + // Also unwind the spring, if it's wound. + [_springTimer invalidate]; + [_springTimer release]; _springTimer = nil; +} + #pragma mark - #pragma mark Drawing @@ -1368,7 +1354,7 @@ - (void)mouseDragged:(NSEvent *)theEvent { - if ([self lastMouseDownEvent] == nil) { + if (![self lastMouseDownEvent]) { return; } @@ -1426,6 +1412,10 @@ - (void)mouseUp:(NSEvent *)theEvent { + if (![self lastMouseDownEvent]) { + return; + } + if (_resizing) { _resizing = NO; [[NSCursor arrowCursor] set]; @@ -1474,6 +1464,9 @@ _closeClicked = NO; } + + // Clear the last mouse down event to prevent drag issues + [self setLastMouseDownEvent:nil]; } - (NSMenu *)menuForEvent:(NSEvent *)event diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m index 05c4ada2..b0a96ccd 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m @@ -364,7 +364,7 @@ } [self drawBackgroundInRect:rect]; - + // no tab view == not connected if (![bar tabView]) { NSRect labelRect = rect; @@ -530,7 +530,7 @@ NSRect aRect = NSMakeRect(cellFrame.origin.x, cellFrame.origin.y, cellFrame.size.width, cellFrame.size.height); // If the tab bar is hidden, don't draw the top pixel - if ([tabBar isTabBarHidden]) { + if ([tabBar isTabBarHidden] && [tabBar frame].size.height == kPSMTabBarControlHeightCollapsed) { aRect.origin.y++; aRect.size.height--; } @@ -655,21 +655,10 @@ { NSRect cellFrame = [cell frame]; CGFloat insetLabelWidth = 0; - BOOL tabBarIsRightOfSelectedTab = NO; - - // Determine if the selected tab is right of this tab - for (PSMTabBarCell *aCell in [tabBar cells]) { - if (aCell == cell) break; - if ([aCell state] == NSOnState) { - tabBarIsRightOfSelectedTab = YES; - break; - } - } - + // close button if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed] && [cell isHighlighted]) { - NSSize closeButtonSize = NSZeroSize; NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame]; NSImage * closeButton = nil; @@ -677,9 +666,7 @@ if ([cell closeButtonOver]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonOver : sequelProCloseButtonOver; if ([cell closeButtonPressed]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonDown : sequelProCloseButtonDown; - - closeButtonSize = [closeButton size]; - + if ([controlView isFlipped]) { closeButtonRect.origin.y += closeButtonRect.size.height; } diff --git a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj index 89c50725..8b5221ae 100644 --- a/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj +++ b/Frameworks/QueryKit/QueryKit.xcodeproj/project.pbxproj @@ -9,6 +9,9 @@ /* Begin PBXBuildFile section */ 1713ECB014F96A5C0013C4F0 /* QKSelectQueryOrderByTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1713ECAF14F96A5C0013C4F0 /* QKSelectQueryOrderByTests.m */; }; 1713ECD814F970BB0013C4F0 /* QKSelectQueryGroupByTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1713ECD714F970BB0013C4F0 /* QKSelectQueryGroupByTests.m */; }; + 1719E47D151E8CA7003F98C5 /* QKQueryUpdateParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1719E47B151E8CA7003F98C5 /* QKQueryUpdateParameter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1719E47E151E8CA7003F98C5 /* QKQueryUpdateParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1719E47C151E8CA7003F98C5 /* QKQueryUpdateParameter.m */; }; + 1719E4BD151F51F1003F98C5 /* QKUpdateQueryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1719E4BA151F51EA003F98C5 /* QKUpdateQueryTests.m */; }; 17E5951F14F301DF0054EE08 /* QKQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 17E5951614F301DF0054EE08 /* QKQuery.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17E5952014F301DF0054EE08 /* QKQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E5951714F301DF0054EE08 /* QKQuery.m */; }; 17E5952114F301DF0054EE08 /* QKQueryOperators.h in Headers */ = {isa = PBXBuildFile; fileRef = 17E5951814F301DF0054EE08 /* QKQueryOperators.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -39,6 +42,10 @@ 1713ECAF14F96A5C0013C4F0 /* QKSelectQueryOrderByTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKSelectQueryOrderByTests.m; sourceTree = ""; }; 1713ECD614F970BB0013C4F0 /* QKSelectQueryGroupByTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKSelectQueryGroupByTests.h; sourceTree = ""; }; 1713ECD714F970BB0013C4F0 /* QKSelectQueryGroupByTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKSelectQueryGroupByTests.m; sourceTree = ""; }; + 1719E47B151E8CA7003F98C5 /* QKQueryUpdateParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryUpdateParameter.h; sourceTree = ""; }; + 1719E47C151E8CA7003F98C5 /* QKQueryUpdateParameter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKQueryUpdateParameter.m; sourceTree = ""; }; + 1719E4B9151F51EA003F98C5 /* QKUpdateQueryTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKUpdateQueryTests.h; sourceTree = ""; }; + 1719E4BA151F51EA003F98C5 /* QKUpdateQueryTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKUpdateQueryTests.m; sourceTree = ""; }; 17E5951614F301DF0054EE08 /* QKQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQuery.h; sourceTree = ""; }; 17E5951714F301DF0054EE08 /* QKQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QKQuery.m; sourceTree = ""; }; 17E5951814F301DF0054EE08 /* QKQueryOperators.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QKQueryOperators.h; sourceTree = ""; }; @@ -124,15 +131,25 @@ 17E5951E14F301DF0054EE08 /* QueryKit.h */, 17E5951614F301DF0054EE08 /* QKQuery.h */, 17E5951714F301DF0054EE08 /* QKQuery.m */, - 17E5951914F301DF0054EE08 /* QKQueryParameter.h */, - 17E5951A14F301DF0054EE08 /* QKQueryParameter.m */, 17E5951C14F301DF0054EE08 /* QKQueryUtilities.h */, 17E5951D14F301DF0054EE08 /* QKQueryUtilities.m */, + 1719E47A151E8C87003F98C5 /* Model */, 17E5952814F301F40054EE08 /* Constants */, ); path = Source; sourceTree = ""; }; + 1719E47A151E8C87003F98C5 /* Model */ = { + isa = PBXGroup; + children = ( + 17E5951914F301DF0054EE08 /* QKQueryParameter.h */, + 17E5951A14F301DF0054EE08 /* QKQueryParameter.m */, + 1719E47B151E8CA7003F98C5 /* QKQueryUpdateParameter.h */, + 1719E47C151E8CA7003F98C5 /* QKQueryUpdateParameter.m */, + ); + name = Model; + sourceTree = ""; + }; 17322A7214FA645300F0CF9B /* SELECT Tests */ = { isa = PBXGroup; children = ( @@ -149,6 +166,8 @@ 17322A7414FA646000F0CF9B /* UPDATE Tests */ = { isa = PBXGroup; children = ( + 1719E4B9151F51EA003F98C5 /* QKUpdateQueryTests.h */, + 1719E4BA151F51EA003F98C5 /* QKUpdateQueryTests.m */, ); name = "UPDATE Tests"; sourceTree = ""; @@ -200,6 +219,7 @@ 17E5952414F301DF0054EE08 /* QKQueryTypes.h in Headers */, 17E5952514F301DF0054EE08 /* QKQueryUtilities.h in Headers */, 17E5952714F301DF0054EE08 /* QueryKit.h in Headers */, + 1719E47D151E8CA7003F98C5 /* QKQueryUpdateParameter.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -311,6 +331,7 @@ 17E596A814F308160054EE08 /* QKSelectQueryTests.m in Sources */, 1713ECB014F96A5C0013C4F0 /* QKSelectQueryOrderByTests.m in Sources */, 1713ECD814F970BB0013C4F0 /* QKSelectQueryGroupByTests.m in Sources */, + 1719E4BD151F51F1003F98C5 /* QKUpdateQueryTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -321,6 +342,7 @@ 17E5952014F301DF0054EE08 /* QKQuery.m in Sources */, 17E5952314F301DF0054EE08 /* QKQueryParameter.m in Sources */, 17E5952614F301DF0054EE08 /* QKQueryUtilities.m in Sources */, + 1719E47E151E8CA7003F98C5 /* QKQueryUpdateParameter.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -338,7 +360,11 @@ 17E5952D14F302740054EE08 /* Distribution */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ARCHS = ( + i386, + ppc, + x86_64, + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/QueryKit-Prefix.pch"; @@ -348,8 +374,8 @@ INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = ""; PREBINDING = NO; - SDKROOT = macosx10.6; - VALID_ARCHS = "i386 x86_64"; + SDKROOT = macosx10.5; + VALID_ARCHS = "i386 ppc x86_64"; }; name = Distribution; }; @@ -518,18 +544,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = ( - i386, - x86_64, - ppc, - ); DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/QueryKit-Prefix.pch"; - GCC_SYMBOLS_PRIVATE_EXTERN = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES; @@ -554,8 +574,6 @@ INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; PRODUCT_NAME = QueryKit; - SDKROOT = macosx10.5; - VALID_ARCHS = "ppc i386 x86_64"; WRAPPER_EXTENSION = framework; }; name = Release; @@ -563,7 +581,11 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ARCHS = ( + i386, + ppc, + x86_64, + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -575,15 +597,19 @@ INFOPLIST_PREFIX_HEADER = ""; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; - SDKROOT = macosx10.6; - VALID_ARCHS = "i386 x86_64"; + SDKROOT = macosx10.5; + VALID_ARCHS = "i386 ppc x86_64"; }; name = Debug; }; 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + ARCHS = ( + i386, + ppc, + x86_64, + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/QueryKit-Prefix.pch"; @@ -593,8 +619,8 @@ INFOPLIST_FILE = Resources/Info.plist; INFOPLIST_PREFIX_HEADER = ""; PREBINDING = NO; - SDKROOT = macosx10.6; - VALID_ARCHS = "i386 x86_64"; + SDKROOT = macosx10.5; + VALID_ARCHS = "i386 ppc x86_64"; }; name = Release; }; diff --git a/Frameworks/QueryKit/Source/QKQuery.h b/Frameworks/QueryKit/Source/QKQuery.h index b45dc556..c0f925bb 100644 --- a/Frameworks/QueryKit/Source/QKQuery.h +++ b/Frameworks/QueryKit/Source/QKQuery.h @@ -2,7 +2,7 @@ // $Id: QKQuery.h 3421 2011-09-10 22:58:45Z stuart02 $ // // QKQuery.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,12 +27,11 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKQueryTypes.h" #import "QKQueryOperators.h" #import "QKQueryParameter.h" +#import "QKQueryUpdateParameter.h" /** * @class QKQuery QKQuery.h @@ -47,8 +46,10 @@ NSString *_table; NSMutableString *_query; + NSMutableArray *_parameters; NSMutableArray *_fields; + NSMutableArray *_updateParameters; NSMutableArray *_groupByFields; NSMutableArray *_orderByFields; @@ -78,6 +79,11 @@ */ @property (readwrite, retain, getter=fields, setter=setFields:) NSMutableArray *_fields; +/** + * @property _updateFields The fields of an UPDATE query. + */ +@property (readwrite, retain, getter=updateParameters, setter=setUpdateParameters:) NSMutableArray *_updateParameters; + /** * @property _queryType The type of query to be built. */ @@ -94,6 +100,7 @@ - (id)initWithTable:(NSString *)table; - (NSString *)query; +- (void)clear; - (void)addField:(NSString *)field; - (void)addFields:(NSArray *)fields; @@ -101,6 +108,9 @@ - (void)addParameter:(QKQueryParameter *)parameter; - (void)addParameter:(NSString *)field operator:(QKQueryOperator)operator value:(id)value; +- (void)addFieldToUpdate:(QKQueryUpdateParameter *)parameter; +- (void)addFieldToUpdate:(NSString *)field toValue:(id)value; + - (void)groupByField:(NSString *)field; - (void)groupByFields:(NSArray *)fields; diff --git a/Frameworks/QueryKit/Source/QKQuery.m b/Frameworks/QueryKit/Source/QKQuery.m index 21053203..4be29ae2 100644 --- a/Frameworks/QueryKit/Source/QKQuery.m +++ b/Frameworks/QueryKit/Source/QKQuery.m @@ -2,7 +2,7 @@ // $Id: QKQuery.m 3432 2011-09-27 00:21:35Z stuart02 $ // // QKQuery.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKQuery.h" @@ -44,6 +42,8 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; - (NSString *)_buildConstraints; - (NSString *)_buildGroupByClause; - (NSString *)_buildOrderByClause; +- (NSString *)_buildUpdateClause; +- (NSString *)_buildSelectOptions; - (BOOL)_addString:(NSString *)string toArray:(NSMutableArray *)array; @@ -56,6 +56,7 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; @synthesize _parameters; @synthesize _queryType; @synthesize _fields; +@synthesize _updateParameters; @synthesize _quoteFields; #pragma mark - @@ -80,6 +81,7 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; if ((self = [super init])) { [self setTable:table]; [self setFields:[[NSMutableArray alloc] init]]; + [self setUpdateParameters:[[NSMutableArray alloc] init]]; [self setParameters:[[NSMutableArray alloc] init]]; [self setQueryType:(QKQueryType)-1]; [self setQuoteFields:NO]; @@ -98,11 +100,32 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; #pragma mark - #pragma mark Public API +/** + * Requests that the query be built. + * + * @return The generated query. + */ - (NSString *)query { return _query ? [self _buildQuery] : @""; } +/** + * Clears anything this instance should know about the query it's building. + */ +- (void)clear +{ + [self setTable:nil]; + [self setDatabase:nil]; + [self setQueryType:(QKQueryType)-1]; + + [_fields removeAllObjects]; + [_parameters removeAllObjects]; + [_updateParameters removeAllObjects]; + [_groupByFields removeAllObjects]; + [_orderByFields removeAllObjects]; +} + #pragma mark - #pragma mark Fields @@ -150,6 +173,29 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; [self addParameter:[QKQueryParameter queryParamWithField:field operator:operator value:value]]; } +#pragma mark - +#pragma mark Update Parameters + +/** + * Adds the supplied update parameter. + * + * @param parameter The parameter to add. + */ +- (void)addFieldToUpdate:(QKQueryUpdateParameter *)parameter +{ + if ([parameter field] && ([[parameter field] length] > 0) && [parameter value]) { + [_updateParameters addObject:parameter]; + } +} + +/** + * Convenience method for adding a new update parameter. + */ +- (void)addFieldToUpdate:(NSString *)field toValue:(id)value +{ + [self addFieldToUpdate:[QKQueryUpdateParameter queryUpdateParamWithField:field value:value]]; +} + #pragma mark - #pragma mark Grouping @@ -220,10 +266,10 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; { [self _validateRequiements]; - BOOL isSelect = (_queryType == QKSelectQuery); - BOOL isInsert = (_queryType == QKInsertQuery); - BOOL isUpdate = (_queryType == QKUpdateQuery); - BOOL isDelete = (_queryType == QKDeleteQuery); + BOOL isSelect = _queryType == QKSelectQuery; + BOOL isInsert = _queryType == QKInsertQuery; + BOOL isUpdate = _queryType == QKUpdateQuery; + BOOL isDelete = _queryType == QKDeleteQuery; NSString *fields = [self _buildFieldList]; @@ -246,22 +292,16 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; [_query appendString:_table]; + if (isUpdate) { + [_query appendFormat:@" %@", [self _buildUpdateClause]]; + } + if ([_parameters count] > 0) { - [_query appendString:@" WHERE "]; - [_query appendString:[self _buildConstraints]]; + [_query appendFormat:@" WHERE %@", [self _buildConstraints]]; } if (isSelect) { - NSString *groupBy = [self _buildGroupByClause]; - NSString *orderBy = [self _buildOrderByClause]; - - if ([groupBy length] > 0) { - [_query appendFormat:@" %@", groupBy]; - } - - if ([orderBy length] > 0) { - [_query appendFormat:@" %@", orderBy]; - } + [_query appendString:[self _buildSelectOptions]]; } return _query; @@ -317,7 +357,7 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; for (QKQueryParameter *param in _parameters) { - [constraints appendFormat:@"%@ ", param]; + [constraints appendFormat:@"%@", param]; [constraints appendString:@" AND "]; } @@ -383,6 +423,54 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; return orderBy; } +/** + * Builds the string representation of the query's UPDATE parameters. + * + * @return The fields to be updated + */ +- (NSString *)_buildUpdateClause +{ + NSMutableString *update = [NSMutableString string]; + + if ([_updateParameters count] == 0) return update; + + [update appendString:@"SET "]; + + for (QKQueryUpdateParameter *param in _updateParameters) + { + [update appendFormat:@"%@, ", param]; + } + + if ([update hasSuffix:@", "]) { + [update setString:[update substringToIndex:([update length] - 2)]]; + } + + return update; +} + +/** + * Builds any SELECT specific query constraints, namely ORDER BY or GROUP BY clauses. + * + * @return The query clauses (if any). + */ +- (NSString *)_buildSelectOptions +{ + NSMutableString *string = [NSMutableString string]; + + NSString *groupBy = [self _buildGroupByClause]; + NSString *orderBy = [self _buildOrderByClause]; + + if ([groupBy length] > 0) { + [string appendFormat:@" %@", groupBy]; + } + + if ([orderBy length] > 0) { + [string appendFormat:@" %@", orderBy]; + } + + return string; +} + /** * Adds the supplied string to the supplied array, but only if the length is greater than zero. * @@ -427,6 +515,7 @@ static NSString *QKNoQueryTableException = @"QKNoQueryTable"; if (_query) [_query release], _query = nil; if (_parameters) [_parameters release], _parameters = nil; if (_fields) [_fields release], _fields = nil; + if (_updateParameters) [_updateParameters release], _updateParameters = nil; if (_groupByFields) [_groupByFields release], _groupByFields = nil; if (_orderByFields) [_orderByFields release], _orderByFields = nil; diff --git a/Frameworks/QueryKit/Source/QKQueryOperators.h b/Frameworks/QueryKit/Source/QKQueryOperators.h index 32e64563..0c7565e0 100644 --- a/Frameworks/QueryKit/Source/QKQueryOperators.h +++ b/Frameworks/QueryKit/Source/QKQueryOperators.h @@ -2,7 +2,7 @@ // $Id: QKQueryOperators.h 3423 2011-09-12 16:50:15Z stuart02 $ // // QKQueryOperators.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at /** * @enum QKQueryOperator diff --git a/Frameworks/QueryKit/Source/QKQueryParameter.h b/Frameworks/QueryKit/Source/QKQueryParameter.h index 78c5739f..18f87929 100644 --- a/Frameworks/QueryKit/Source/QKQueryParameter.h +++ b/Frameworks/QueryKit/Source/QKQueryParameter.h @@ -2,7 +2,7 @@ // $Id: QKQueryParameter.h 3421 2011-09-10 22:58:45Z stuart02 $ // // QKQueryParameter.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKQueryOperators.h" diff --git a/Frameworks/QueryKit/Source/QKQueryParameter.m b/Frameworks/QueryKit/Source/QKQueryParameter.m index 7f6064e6..c95bf585 100644 --- a/Frameworks/QueryKit/Source/QKQueryParameter.m +++ b/Frameworks/QueryKit/Source/QKQueryParameter.m @@ -2,7 +2,7 @@ // $Id: QKQueryParameter.m 3432 2011-09-27 00:21:35Z stuart02 $ // // QKQueryParameter.m -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKQueryParameter.h" #import "QKQueryUtilities.h" diff --git a/Frameworks/QueryKit/Source/QKQueryTypes.h b/Frameworks/QueryKit/Source/QKQueryTypes.h index 4ab338ec..96978ce2 100644 --- a/Frameworks/QueryKit/Source/QKQueryTypes.h +++ b/Frameworks/QueryKit/Source/QKQueryTypes.h @@ -2,7 +2,7 @@ // $Id: QKQueryTypes.h 3423 2011-09-12 16:50:15Z stuart02 $ // // QKQueryTypes.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at /** * @enum QKQueryType diff --git a/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h new file mode 100644 index 00000000..5231d272 --- /dev/null +++ b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.h @@ -0,0 +1,59 @@ +// +// $Id$ +// +// QKQueryUpdateParameter.h +// QueryKit +// +// Created by Stuart Connolly (stuconnolly.com) on March 24, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +/** + * @class QKQueryUpdateParameter QKQueryUpdateParameter.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * QueryKit update query parameter class. + */ +@interface QKQueryUpdateParameter : NSObject +{ + NSString *_field; + + id _value; +} + +/** + * @property _field The field component of the parameter. + */ +@property (readwrite, retain, getter=field, setter=setField:) NSString *_field; + +/** + *@property _value The value component of the parameter. + */ +@property (readwrite, retain, getter=value, setter=setValue:) id _value; + ++ (QKQueryUpdateParameter *)queryUpdateParamWithField:(NSString *)field value:(id)value; + +- (id)initUpdateParamWithField:(NSString *)field value:(id)value; + +@end diff --git a/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m new file mode 100644 index 00000000..febbfa44 --- /dev/null +++ b/Frameworks/QueryKit/Source/QKQueryUpdateParameter.m @@ -0,0 +1,81 @@ +// +// $Id$ +// +// QKQueryUpdateParameter.m +// QueryKit +// +// Created by Stuart Connolly (stuconnolly.com) on March 24, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +#import "QKQueryUpdateParameter.h" + +@implementation QKQueryUpdateParameter + +@synthesize _field; +@synthesize _value; + +#pragma mark - +#pragma mark Initialisation + ++ (QKQueryUpdateParameter *)queryUpdateParamWithField:(NSString *)field value:(id)value +{ + return [[[QKQueryUpdateParameter alloc] initUpdateParamWithField:field value:value] autorelease]; +} + +- (id)initUpdateParamWithField:(NSString *)field value:(id)value +{ + if ((self = [super init])) { + [self setField:field]; + [self setValue:value]; + } + + return self; +} + +#pragma mark - + +- (NSString *)description +{ + NSMutableString *string = [NSMutableString string]; + + NSString *field = [_field stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; + + [string appendString:field]; + [string appendString:@" = "]; + [string appendFormat:(![_value isKindOfClass:[NSNumber class]]) ? @"'%@'" : @"%@", [_value description]]; + + return string; +} + +#pragma mark - + +- (void)dealloc +{ + if (_field) [_field release], _field = nil; + if (_value) [_value release], _value = nil; + + [super dealloc]; +} + +@end diff --git a/Frameworks/QueryKit/Source/QKQueryUtilities.h b/Frameworks/QueryKit/Source/QKQueryUtilities.h index 9049b191..228385f8 100644 --- a/Frameworks/QueryKit/Source/QKQueryUtilities.h +++ b/Frameworks/QueryKit/Source/QKQueryUtilities.h @@ -2,7 +2,7 @@ // $Id: QKQueryUtilities.h 3421 2011-09-10 22:58:45Z stuart02 $ // // QKQueryUtilities.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKQueryOperators.h" diff --git a/Frameworks/QueryKit/Source/QKQueryUtilities.m b/Frameworks/QueryKit/Source/QKQueryUtilities.m index dde1bd77..8519eb20 100644 --- a/Frameworks/QueryKit/Source/QKQueryUtilities.m +++ b/Frameworks/QueryKit/Source/QKQueryUtilities.m @@ -2,7 +2,7 @@ // $Id: QKQueryUtilities.m 3421 2011-09-10 22:58:45Z stuart02 $ // // QKQueryUtilities.m -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKQueryUtilities.h" diff --git a/Frameworks/QueryKit/Source/QueryKit.h b/Frameworks/QueryKit/Source/QueryKit.h index f8570025..2b62a7b5 100644 --- a/Frameworks/QueryKit/Source/QueryKit.h +++ b/Frameworks/QueryKit/Source/QueryKit.h @@ -2,7 +2,7 @@ // $Id: QueryKit.h 3431 2011-09-26 22:26:24Z stuart02 $ // // QueryKit.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import #import diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h index 56907b36..1be5345b 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h +++ b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.h @@ -2,7 +2,7 @@ // $Id$ // // QKSelectQueryGroupByTests.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on February 25, 2012 // Copyright (c) 2012 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import #import diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m index 9bbe75a2..0a8277e0 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m +++ b/Frameworks/QueryKit/Tests/QKSelectQueryGroupByTests.m @@ -2,7 +2,7 @@ // $Id$ // // QKSelectQueryGroupByTests.m -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on February 25, 2012 // Copyright (c) 2012 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKSelectQueryGroupByTests.h" diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h index c457491a..1ced6503 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h +++ b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.h @@ -2,7 +2,7 @@ // $Id$ // // QKSelectQueryOrderByTests.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on February 25, 2012 // Copyright (c) 2012 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import #import diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m index 84bd5ddb..ac70f0fe 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m +++ b/Frameworks/QueryKit/Tests/QKSelectQueryOrderByTests.m @@ -2,7 +2,7 @@ // $Id$ // // QKSelectQueryOrderByTests.m -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on February 25, 2012 // Copyright (c) 2012 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKSelectQueryOrderByTests.h" diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryTests.h b/Frameworks/QueryKit/Tests/QKSelectQueryTests.h index df9e3272..80ea92e2 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryTests.h +++ b/Frameworks/QueryKit/Tests/QKSelectQueryTests.h @@ -2,7 +2,7 @@ // $Id$ // // QKSelectQueryTests.h -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import #import diff --git a/Frameworks/QueryKit/Tests/QKSelectQueryTests.m b/Frameworks/QueryKit/Tests/QKSelectQueryTests.m index 620dbadd..cb2d3599 100644 --- a/Frameworks/QueryKit/Tests/QKSelectQueryTests.m +++ b/Frameworks/QueryKit/Tests/QKSelectQueryTests.m @@ -2,7 +2,7 @@ // $Id$ // // QKSelectQueryTests.m -// sequel-pro +// QueryKit // // Created by Stuart Connolly (stuconnolly.com) on September 4, 2011 // Copyright (c) 2011 Stuart Connolly. All rights reserved. @@ -27,8 +27,6 @@ // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR // OTHER DEALINGS IN THE SOFTWARE. -// -// More info at #import "QKSelectQueryTests.h" diff --git a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h new file mode 100644 index 00000000..b4230c1f --- /dev/null +++ b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.h @@ -0,0 +1,39 @@ +// +// $Id$ +// +// QKUpdateQueryTests.h +// QueryKit +// +// Created by Stuart Connolly (stuconnolly.com) on March 25, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +#import +#import + +@interface QKUpdateQueryTests : SenTestCase +{ + QKQuery *_query; +} + +@end diff --git a/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m new file mode 100644 index 00000000..fa3bb766 --- /dev/null +++ b/Frameworks/QueryKit/Tests/QKUpdateQueryTests.m @@ -0,0 +1,82 @@ +// +// $Id$ +// +// QKUpdateQueryTests.m +// QueryKit +// +// Created by Stuart Connolly (stuconnolly.com) on March 25, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +#import "QKUpdateQueryTests.h" + +static NSString *QKTestTableName = @"test_table"; + +static NSString *QKTestFieldOne = @"test_field1"; +static NSString *QKTestFieldTwo = @"test_field2"; + +static NSString *QKTestUpdateValueOne = @"update_one"; +static NSString *QKTestUpdateValueTwo = @"update_two"; + +static NSUInteger QKTestParameterOne = 10; + +@implementation QKUpdateQueryTests + +#pragma mark - +#pragma mark Setup & tear down + +- (void)setUp +{ + _query = [QKQuery queryTable:QKTestTableName]; + + [_query setQueryType:QKUpdateQuery]; + + [_query addFieldToUpdate:QKTestFieldOne toValue:QKTestUpdateValueOne]; + [_query addFieldToUpdate:QKTestFieldTwo toValue:QKTestUpdateValueTwo]; + + [_query addParameter:QKTestFieldOne operator:QKEqualityOperator value:[NSNumber numberWithUnsignedInteger:QKTestParameterOne]]; +} + +#pragma mark - +#pragma mark Tests + +- (void)testUpdateQueryTypeIsCorrect +{ + STAssertTrue([[_query query] hasPrefix:@"UPDATE"], @"query type"); +} + +- (void)testUpdateQueryFieldsAreCorrect +{ + NSString *query = [NSString stringWithFormat:@"UPDATE %@ SET %@ = '%@', %@ = '%@'", QKTestTableName, QKTestFieldOne, QKTestUpdateValueOne, QKTestFieldTwo, QKTestUpdateValueTwo]; + + STAssertTrue([[_query query] hasPrefix:query], @"query fields"); +} + +- (void)testUpdateQueryConstraintsAreCorrect +{ + NSString *query = [NSString stringWithFormat:@"WHERE %@ %@ %@", QKTestFieldOne, [QKQueryUtilities operatorRepresentationForType:QKEqualityOperator], [NSNumber numberWithUnsignedInteger:QKTestParameterOne]]; + + STAssertTrue(([[_query query] rangeOfString:query].location != NSNotFound), @"query constraints"); +} + +@end diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h index 93b7438a..9e2ef541 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_alloc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Data structures for mysys/my_alloc.c (root memory allocator) @@ -23,6 +23,10 @@ #define ALLOC_MAX_BLOCK_TO_DROP 4096 #define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 +#ifdef __cplusplus +extern "C" { +#endif + typedef struct st_used_mem { /* struct for once_alloc (block) */ struct st_used_mem *next; /* Next block in use */ @@ -48,4 +52,9 @@ typedef struct st_mem_root void (*error_handler)(void); } MEM_ROOT; + +#ifdef __cplusplus +} +#endif + #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h index 775b5658..294be663 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/my_list.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef _list_h_ #define _list_h_ @@ -37,7 +37,7 @@ extern int list_walk(LIST *,list_walk_action action,unsigned char * argument); #define list_rest(a) ((a)->next) #define list_push(a,b) (a)=list_cons((b),(a)) -#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((unsigned char *) old,MYF(MY_FAE)); } +#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); } #ifdef __cplusplus } diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h index da477278..cff8c647 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql.h @@ -1,5 +1,4 @@ -/* - Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,18 +11,16 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient. - The ABI should never be changed in a released product of MySQL + The ABI should never be changed in a released product of MySQL, thus you need to take great care when changing the file. In case - the file is changed so the ABI is broken, you must also - update the SHAREDLIB_MAJOR_VERSION in configure.in . - + the file is changed so the ABI is broken, you must also update + the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake */ #ifndef _mysql_h @@ -83,16 +80,14 @@ extern char *mysql_unix_port; #define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */ #define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */ -#ifdef __NETWARE__ -#pragma pack(push, 8) /* 8 byte alignment */ -#endif - #define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG) #define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG) #define IS_BLOB(n) ((n) & BLOB_FLAG) -#define IS_NUM(t) ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) -#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG) -#define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_INT24 && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == MYSQL_TYPE_YEAR) +/** + Returns true if the value is a number which does not need quotes for + the sql_lex.cc parser to parse correctly. +*/ +#define IS_NUM(t) (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL) #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING) @@ -171,9 +166,15 @@ enum mysql_option MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH, MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT, - MYSQL_OPT_SSL_VERIFY_SERVER_CERT + MYSQL_OPT_SSL_VERIFY_SERVER_CERT, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH }; +/** + @todo remove the "extension", move st_mysql_options completely + out of mysql.h +*/ +struct st_mysql_options_extention; + struct st_mysql_options { unsigned int connect_timeout, read_timeout, write_timeout; unsigned int port, protocol; @@ -190,24 +191,10 @@ struct st_mysql_options { unsigned long max_allowed_packet; my_bool use_ssl; /* if to use SSL or not */ my_bool compress,named_pipe; - /* - On connect, find out the replication role of the server, and - establish connections to all the peers - */ - my_bool rpl_probe; - /* - Each call to mysql_real_query() will parse it to tell if it is a read - or a write, and direct it to the slave or the master - */ - my_bool rpl_parse; - /* - If set, never read from a master, only from slave, when doing - a read that is replication-aware - */ - my_bool no_master_reads; -#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY) - my_bool separate_thread; -#endif + my_bool unused1; + my_bool unused2; + my_bool unused3; + my_bool unused4; enum mysql_option methods_to_use; char *client_ip; /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */ @@ -221,7 +208,7 @@ struct st_mysql_options { void (*local_infile_end)(void *); int (*local_infile_error)(void *, char *, unsigned int); void *local_infile_userdata; - void *extension; + struct st_mysql_options_extention *extension; }; enum mysql_status @@ -235,15 +222,6 @@ enum mysql_protocol_type MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY }; -/* - There are three types of queries - the ones that have to go to - the master, the ones that go to a slave, and the adminstrative - type which must happen on the pivot connectioin -*/ -enum mysql_rpl_type -{ - MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN -}; typedef struct character_set { @@ -288,21 +266,8 @@ typedef struct st_mysql /* session-wide random string */ char scramble[SCRAMBLE_LENGTH+1]; - - /* - Set if this is the original connection, not a master or a slave we have - added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave() - */ - my_bool rpl_pivot; - /* - Pointers to the master, and the next slave connections, points to - itself if lone connection. - */ - struct st_mysql* master, *next_slave; - - struct st_mysql* last_used_slave; /* needed for round-robin slave pick */ - /* needed for send/read/store/use result to work correctly with replication */ - struct st_mysql* last_used_con; + my_bool unused1; + void *unused2, *unused3, *unused4, *unused5; LIST *stmts; /* list of all statements */ const struct st_mysql_methods *methods; @@ -336,35 +301,12 @@ typedef struct st_mysql_res { void *extension; } MYSQL_RES; -#define MAX_MYSQL_MANAGER_ERR 256 -#define MAX_MYSQL_MANAGER_MSG 256 - -#define MANAGER_OK 200 -#define MANAGER_INFO 250 -#define MANAGER_ACCESS 401 -#define MANAGER_CLIENT_ERR 450 -#define MANAGER_INTERNAL_ERR 500 #if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT) #define MYSQL_CLIENT #endif -typedef struct st_mysql_manager -{ - NET net; - char *host, *user, *passwd; - char *net_buf, *net_buf_pos, *net_data_end; - unsigned int port; - int cmd_status; - int last_errno; - int net_buf_size; - my_bool free_me; - my_bool eof; - char last_error[MAX_MYSQL_MANAGER_ERR]; - void *extension; -} MYSQL_MANAGER; - typedef struct st_mysql_parameters { unsigned long *p_max_allowed_packet; @@ -457,16 +399,6 @@ int STDCALL mysql_real_query(MYSQL *mysql, const char *q, MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); -/* perform query on master */ -my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q, - unsigned long length); -my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q, - unsigned long length); -/* perform query on slave */ -my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q, - unsigned long length); -my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q, - unsigned long length); void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *charset); @@ -488,37 +420,6 @@ mysql_set_local_infile_handler(MYSQL *mysql, void mysql_set_local_infile_default(MYSQL *mysql); - -/* - enable/disable parsing of all queries to decide if they go on master or - slave -*/ -void STDCALL mysql_enable_rpl_parse(MYSQL* mysql); -void STDCALL mysql_disable_rpl_parse(MYSQL* mysql); -/* get the value of the parse flag */ -int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql); - -/* enable/disable reads from master */ -void STDCALL mysql_enable_reads_from_master(MYSQL* mysql); -void STDCALL mysql_disable_reads_from_master(MYSQL* mysql); -/* get the value of the master read flag */ -my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql); - -enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len); - -/* discover the master and its slaves */ -my_bool STDCALL mysql_rpl_probe(MYSQL* mysql); - -/* set the master, close/free the old one, if it is not a pivot */ -int STDCALL mysql_set_master(MYSQL* mysql, const char* host, - unsigned int port, - const char* user, - const char* passwd); -int STDCALL mysql_add_slave(MYSQL* mysql, const char* host, - unsigned int port, - const char* user, - const char* passwd); - int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level); @@ -565,18 +466,6 @@ void STDCALL mysql_debug(const char *debug); void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name); unsigned int STDCALL mysql_thread_safe(void); my_bool STDCALL mysql_embedded(void); -MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con); -MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con, - const char* host, - const char* user, - const char* passwd, - unsigned int port); -void STDCALL mysql_manager_close(MYSQL_MANAGER* con); -int STDCALL mysql_manager_command(MYSQL_MANAGER* con, - const char* cmd, int cmd_len); -int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, - char* res_buf, - int res_buf_size); my_bool STDCALL mysql_read_query_result(MYSQL *mysql); @@ -684,6 +573,8 @@ typedef struct st_mysql_bind } MYSQL_BIND; +struct st_mysql_stmt_extension; + /* statement handler */ typedef struct st_mysql_stmt { @@ -729,7 +620,7 @@ typedef struct st_mysql_stmt metadata fields when doing mysql_stmt_store_result. */ my_bool update_max_length; - void *extension; + struct st_mysql_stmt_extension *extension; } MYSQL_STMT; enum enum_stmt_attr_type @@ -755,38 +646,6 @@ enum enum_stmt_attr_type }; -typedef struct st_mysql_methods -{ - my_bool (*read_query_result)(MYSQL *mysql); - my_bool (*advanced_command)(MYSQL *mysql, - enum enum_server_command command, - const unsigned char *header, - unsigned long header_length, - const unsigned char *arg, - unsigned long arg_length, - my_bool skip_check, - MYSQL_STMT *stmt); - MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, - unsigned int fields); - MYSQL_RES * (*use_result)(MYSQL *mysql); - void (*fetch_lengths)(unsigned long *to, - MYSQL_ROW column, unsigned int field_count); - void (*flush_use_result)(MYSQL *mysql); -#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY) - MYSQL_FIELD * (*list_fields)(MYSQL *mysql); - my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt); - int (*stmt_execute)(MYSQL_STMT *stmt); - int (*read_binary_rows)(MYSQL_STMT *stmt); - int (*unbuffered_fetch)(MYSQL *mysql, char **row); - void (*free_embedded_thd)(MYSQL *mysql); - const char *(*read_statistics)(MYSQL *mysql); - my_bool (*next_result)(MYSQL *mysql); - int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd); - int (*read_rows_from_cursor)(MYSQL_STMT *stmt); -#endif -} MYSQL_METHODS; - - MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql); int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length); @@ -831,6 +690,7 @@ my_bool STDCALL mysql_rollback(MYSQL * mysql); my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode); my_bool STDCALL mysql_more_results(MYSQL *mysql); int STDCALL mysql_next_result(MYSQL *mysql); +int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt); void STDCALL mysql_close(MYSQL *sock); @@ -845,26 +705,9 @@ MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd); int STDCALL mysql_create_db(MYSQL *mysql, const char *DB); int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB); -#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) #endif #define HAVE_MYSQL_REAL_CONNECT -/* - The following functions are mainly exported because of mysqlbinlog; - They are not for general usage -*/ - -#define simple_command(mysql, command, arg, length, skip_check) \ - (*(mysql)->methods->advanced_command)(mysql, command, 0, \ - 0, arg, length, skip_check, NULL) -#define stmt_command(mysql, command, arg, length, stmt) \ - (*(mysql)->methods->advanced_command)(mysql, command, 0, \ - 0, arg, length, 1, stmt) - -#ifdef __NETWARE__ -#pragma pack(pop) /* restore alignment */ -#endif - #ifdef __cplusplus } #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h index 357519d5..f2345be6 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_com.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,7 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* ** Common definition between mysql server & client @@ -27,9 +27,19 @@ #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) +#define MYSQL_AUTODETECT_CHARSET_NAME "auto" + #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 +/* + Maximum length of comments +*/ +#define TABLE_COMMENT_INLINE_MAXLEN 180 /* pre 6.0: 60 characters */ +#define TABLE_COMMENT_MAXLEN 2048 +#define COLUMN_COMMENT_MAXLEN 1024 +#define INDEX_COMMENT_MAXLEN 1024 + /* USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain username and hostname parts of the user identifier with trailing zero in @@ -104,6 +114,10 @@ enum enum_server_command #define FIELD_IN_PART_FUNC_FLAG (1 << 19)/* Field part of partition func */ #define FIELD_IN_ADD_INDEX (1<< 20) /* Intern: Field used in ADD INDEX */ #define FIELD_IS_RENAMED (1<< 21) /* Intern: Field is being renamed */ +#define FIELD_FLAGS_STORAGE_MEDIA 22 /* Field storage media, bit 22-23, + reserved by MySQL Cluster */ +#define FIELD_FLAGS_COLUMN_FORMAT 24 /* Field column format, bit 24-25, + reserved by MySQL Cluster */ #define REFRESH_GRANT 1 /* Refresh grant tables */ #define REFRESH_LOG 2 /* Start on new log file */ @@ -115,6 +129,12 @@ enum enum_server_command thread */ #define REFRESH_MASTER 128 /* Remove all bin logs in the index and truncate the index */ +#define REFRESH_ERROR_LOG 256 /* Rotate only the erorr log */ +#define REFRESH_ENGINE_LOG 512 /* Flush all storage engine logs */ +#define REFRESH_BINARY_LOG 1024 /* Flush the binary log */ +#define REFRESH_RELAY_LOG 2048 /* Flush the relay log */ +#define REFRESH_GENERAL_LOG 4096 /* Flush the general log */ +#define REFRESH_SLOW_LOG 8192 /* Flush the slow query log */ /* The following can't be set with mysql_refresh() */ #define REFRESH_READ_LOCK 16384 /* Lock tables for read */ @@ -144,10 +164,19 @@ enum enum_server_command #define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ #define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */ #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */ +#define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */ + +#define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */ #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) #define CLIENT_REMEMBER_OPTIONS (1UL << 31) +#ifdef HAVE_COMPRESS +#define CAN_CLIENT_COMPRESS CLIENT_COMPRESS +#else +#define CAN_CLIENT_COMPRESS 0 +#endif + /* Gather all possible capabilites (flags) supported by the server */ #define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \ CLIENT_FOUND_ROWS | \ @@ -167,8 +196,10 @@ enum enum_server_command CLIENT_SECURE_CONNECTION | \ CLIENT_MULTI_STATEMENTS | \ CLIENT_MULTI_RESULTS | \ + CLIENT_PS_MULTI_RESULTS | \ CLIENT_SSL_VERIFY_SERVER_CERT | \ - CLIENT_REMEMBER_OPTIONS) + CLIENT_REMEMBER_OPTIONS | \ + CLIENT_PLUGIN_AUTH) /* Switch off the flags that are optional and depending on build flags @@ -179,7 +210,14 @@ enum enum_server_command & ~CLIENT_COMPRESS) \ & ~CLIENT_SSL_VERIFY_SERVER_CERT) -#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ +/** + Is raised when a multi-statement transaction + has been started, either explicitly, by means + of BEGIN or COMMIT AND CHAIN, or + implicitly, by the first transactional + statement, when autocommit=off. +*/ +#define SERVER_STATUS_IN_TRANS 1 #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ #define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ #define SERVER_QUERY_NO_GOOD_INDEX_USED 16 @@ -203,6 +241,12 @@ enum enum_server_command number of result set columns. */ #define SERVER_STATUS_METADATA_CHANGED 1024 +#define SERVER_QUERY_WAS_SLOW 2048 + +/** + To mark ResultSet containing output parameter values. +*/ +#define SERVER_PS_OUT_PARAMS 4096 /** Server status flags that must be cleared when starting @@ -215,7 +259,11 @@ enum enum_server_command #define SERVER_STATUS_CLEAR_SET (SERVER_QUERY_NO_GOOD_INDEX_USED| \ SERVER_QUERY_NO_INDEX_USED|\ SERVER_MORE_RESULTS_EXISTS|\ - SERVER_STATUS_METADATA_CHANGED) + SERVER_STATUS_METADATA_CHANGED |\ + SERVER_QUERY_WAS_SLOW |\ + SERVER_STATUS_DB_DROPPED |\ + SERVER_STATUS_CURSOR_EXISTS|\ + SERVER_STATUS_LAST_ROW_SENT) #define MYSQL_ERRMSG_SIZE 512 #define NET_READ_TIMEOUT 30 /* Timeout on read */ @@ -254,24 +302,23 @@ typedef struct st_net { unsigned int *return_status; unsigned char reading_or_writing; char save_char; - my_bool unused0; /* Please remove with the next incompatible ABI change. */ - my_bool unused; /* Please remove with the next incompatible ABI change */ - my_bool compress; my_bool unused1; /* Please remove with the next incompatible ABI change. */ + my_bool unused2; /* Please remove with the next incompatible ABI change */ + my_bool compress; + my_bool unused3; /* Please remove with the next incompatible ABI change. */ /* Pointer to query object in query cache, do not equal NULL (0) for queries in cache that have not stored its results yet */ #endif /* - 'query_cache_query' should be accessed only via query cache - functions and methods to maintain proper locking. + Unused, please remove with the next incompatible ABI change. */ - unsigned char *query_cache_query; + unsigned char *unused; unsigned int last_errno; unsigned char error; - my_bool unused2; /* Please remove with the next incompatible ABI change. */ - my_bool return_errno; + my_bool unused4; /* Please remove with the next incompatible ABI change. */ + my_bool unused5; /* Please remove with the next incompatible ABI change. */ /** Client library error message buffer. Actually belongs to struct MYSQL. */ char last_error[MYSQL_ERRMSG_SIZE]; /** Client library sqlstate buffer. Set along with the error message. */ @@ -419,10 +466,6 @@ void my_net_set_write_timeout(NET *net, uint timeout); void my_net_set_read_timeout(NET *net, uint timeout); #endif -/* - The following function is not meant for normal usage - Currently it's used internally by manager.c -*/ struct sockaddr; int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, unsigned int timeout); @@ -492,14 +535,14 @@ void create_random_string(char *to, unsigned int length, struct rand_struct *ran void hash_password(unsigned long *to, const char *password, unsigned int password_len); void make_scrambled_password_323(char *to, const char *password); void scramble_323(char *to, const char *message, const char *password); -my_bool check_scramble_323(const char *, const char *message, +my_bool check_scramble_323(const unsigned char *reply, const char *message, unsigned long *salt); void get_salt_from_password_323(unsigned long *res, const char *password); void make_password_from_salt_323(char *to, const unsigned long *salt); void make_scrambled_password(char *to, const char *password); void scramble(char *to, const char *message, const char *password); -my_bool check_scramble(const char *reply, const char *message, +my_bool check_scramble(const unsigned char *reply, const char *message, const unsigned char *hash_stage2); void get_salt_from_password(unsigned char *res, const char *password); void make_password_from_salt(char *to, const unsigned char *hash_stage2); @@ -529,4 +572,5 @@ uchar *net_store_length(uchar *pkg, ulonglong length); #define MYSQL_STMT_HEADER 4 #define MYSQL_LONG_DATA_HEADER 6 +#define NOT_FIXED_DEC 31 #endif diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_embed.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_embed.h deleted file mode 100644 index e3318864..00000000 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_embed.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -/* Defines that are unique to the embedded version of MySQL */ - -#ifdef EMBEDDED_LIBRARY - -/* Things we don't need in the embedded version of MySQL */ -/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ - -#undef HAVE_OPENSSL -#undef HAVE_SMEM /* No shared memory */ -#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */ - -#define DONT_USE_RAID - -#endif /* EMBEDDED_LIBRARY */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h index dc8c5b3f..2822e22d 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/mysql_version.h @@ -9,16 +9,16 @@ #include #else #define PROTOCOL_VERSION 10 -#define MYSQL_SERVER_VERSION "5.1.61" -#define MYSQL_BASE_VERSION "mysqld-5.1" +#define MYSQL_SERVER_VERSION "5.5.22" +#define MYSQL_BASE_VERSION "mysqld-5.5" #define MYSQL_SERVER_SUFFIX_DEF "" #define FRM_VER 6 -#define MYSQL_VERSION_ID 50161 +#define MYSQL_VERSION_ID 50522 #define MYSQL_PORT 3306 #define MYSQL_PORT_DEFAULT 0 #define MYSQL_UNIX_ADDR "/tmp/mysql.sock" #define MYSQL_CONFIG_NAME "my" -#define MYSQL_COMPILATION_COMMENT "Source distribution" +#define MYSQL_COMPILATION_COMMENT "MySQL Community Server (GPL)" /* mysqld compile time options */ #endif /* _CUSTOMCONFIG_ */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h index 46106d1b..00dbafea 100644 --- a/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h +++ b/Frameworks/SPMySQLFramework/MySQL Client Libraries/include/typelib.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,11 +29,26 @@ typedef struct st_typelib { /* Different types saved here */ extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position); extern int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option); -extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name); +#define FIND_TYPE_BASIC 0 +/** makes @c find_type() require the whole name, no prefix */ +#define FIND_TYPE_NO_PREFIX (1 << 0) +/** always implicitely on, so unused, but old code may pass it */ +#define FIND_TYPE_NO_OVERWRITE (1 << 1) +/** makes @c find_type() accept a number */ +#define FIND_TYPE_ALLOW_NUMBER (1 << 2) +/** makes @c find_type() treat ',' as terminator */ +#define FIND_TYPE_COMMA_TERM (1 << 3) + +extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); extern TYPELIB sql_protocol_typelib; +my_ulonglong find_set_from_flags(const TYPELIB *lib, unsigned int default_name, + my_ulonglong cur_set, my_ulonglong default_set, + const char *str, unsigned int length, + char **err_pos, unsigned int *err_len); + #endif /* _typelib_h */ diff --git a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a index 5b7d405a..ab6be1a6 100644 Binary files a/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a and b/Frameworks/SPMySQLFramework/MySQL Client Libraries/lib/libmysqlclient.a differ diff --git a/Frameworks/SPMySQLFramework/Resources/Info.plist b/Frameworks/SPMySQLFramework/Resources/Info.plist index 392b428f..84b64d04 100644 --- a/Frameworks/SPMySQLFramework/Resources/Info.plist +++ b/Frameworks/SPMySQLFramework/Resources/Info.plist @@ -5,15 +5,11 @@ CFBundleDevelopmentRegion English CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - + SPMySQL CFBundleIdentifier - com.yourcompany.${PRODUCT_NAME:rfc1034Identifier} + com.sequelpro.spmysql CFBundleInfoDictionaryVersion 6.0 - CFBundleName - ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString @@ -22,7 +18,5 @@ SPDT CFBundleVersion 1 - NSPrincipalClass - diff --git a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj index 2f8d300c..076e112a 100644 --- a/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj +++ b/Frameworks/SPMySQLFramework/SPMySQLFramework.xcodeproj/project.pbxproj @@ -15,7 +15,6 @@ 584292A014C34B36000F8438 /* my_list.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929514C34B36000F8438 /* my_list.h */; settings = {ATTRIBUTES = (); }; }; 584292A114C34B36000F8438 /* mysql.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929614C34B36000F8438 /* mysql.h */; }; 584292A214C34B36000F8438 /* mysql_com.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929714C34B36000F8438 /* mysql_com.h */; }; - 584292A314C34B36000F8438 /* mysql_embed.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929814C34B36000F8438 /* mysql_embed.h */; }; 584292A414C34B36000F8438 /* mysql_time.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929914C34B36000F8438 /* mysql_time.h */; }; 584292A514C34B36000F8438 /* mysql_version.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929A14C34B36000F8438 /* mysql_version.h */; }; 584292A614C34B36000F8438 /* typelib.h in Headers */ = {isa = PBXBuildFile; fileRef = 5842929B14C34B36000F8438 /* typelib.h */; }; @@ -49,7 +48,7 @@ 5884165614D2306A0078027F /* SPMySQLResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 5884165414D2306A0078027F /* SPMySQLResult.m */; }; 58C006C814E0B18A00AC489A /* SPMySQLUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 58C006C714E0B18A00AC489A /* SPMySQLUtilities.h */; }; 58C008CD14E2AC7D00AC489A /* SPMySQLConnectionProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 58C008CC14E2AC7D00AC489A /* SPMySQLConnectionProxy.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 58C009D514E31D3800AC489A /* SPMySQLStringAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 58C009D314E31D3800AC489A /* SPMySQLStringAdditions.h */; }; + 58C009D514E31D3800AC489A /* SPMySQLStringAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 58C009D314E31D3800AC489A /* SPMySQLStringAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 58C009D614E31D3800AC489A /* SPMySQLStringAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 58C009D414E31D3800AC489A /* SPMySQLStringAdditions.m */; }; 58C00AA914E4869C00AC489A /* Max Packet Size.h in Headers */ = {isa = PBXBuildFile; fileRef = 58C00AA714E4869C00AC489A /* Max Packet Size.h */; settings = {ATTRIBUTES = (Public, ); }; }; 58C00AAA14E4869C00AC489A /* Max Packet Size.m in Sources */ = {isa = PBXBuildFile; fileRef = 58C00AA814E4869C00AC489A /* Max Packet Size.m */; }; @@ -82,7 +81,6 @@ 5842929514C34B36000F8438 /* my_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = my_list.h; sourceTree = ""; }; 5842929614C34B36000F8438 /* mysql.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql.h; sourceTree = ""; }; 5842929714C34B36000F8438 /* mysql_com.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_com.h; sourceTree = ""; }; - 5842929814C34B36000F8438 /* mysql_embed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_embed.h; sourceTree = ""; }; 5842929914C34B36000F8438 /* mysql_time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_time.h; sourceTree = ""; }; 5842929A14C34B36000F8438 /* mysql_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mysql_version.h; sourceTree = ""; }; 5842929B14C34B36000F8438 /* typelib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = typelib.h; sourceTree = ""; }; @@ -279,7 +277,6 @@ 5842929514C34B36000F8438 /* my_list.h */, 5842929614C34B36000F8438 /* mysql.h */, 5842929714C34B36000F8438 /* mysql_com.h */, - 5842929814C34B36000F8438 /* mysql_embed.h */, 5842929914C34B36000F8438 /* mysql_time.h */, 5842929A14C34B36000F8438 /* mysql_version.h */, 5842929B14C34B36000F8438 /* typelib.h */, @@ -377,7 +374,6 @@ 584292A014C34B36000F8438 /* my_list.h in Headers */, 584292A114C34B36000F8438 /* mysql.h in Headers */, 584292A214C34B36000F8438 /* mysql_com.h in Headers */, - 584292A314C34B36000F8438 /* mysql_embed.h in Headers */, 584292A414C34B36000F8438 /* mysql_time.h in Headers */, 584292A514C34B36000F8438 /* mysql_version.h in Headers */, 584292A614C34B36000F8438 /* typelib.h in Headers */, @@ -516,6 +512,7 @@ GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = Source/SPMySQLFramework_Prefix.pch; + GENERATE_PKGINFO_FILE = YES; INFOPLIST_FILE = Resources/Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQL.h b/Frameworks/SPMySQLFramework/Source/SPMySQL.h index 3c4c78f8..bfdacf3e 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQL.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQL.h @@ -37,7 +37,11 @@ #import "SPMySQLConstants.h" // Required category additions +#ifndef SP_REFACTOR #import "SPMySQLStringAdditions.h" +#else +#import +#endif // MySQL Connection Delegate and Proxy protocols #import "SPMySQLConnectionDelegate.h" diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m index a95e060e..2065c998 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Databases & Tables.m @@ -32,6 +32,7 @@ #import "Databases & Tables.h" #import "SPMySQL Private APIs.h" +#import "SPMySQLStringAdditions.h" @implementation SPMySQLConnection (Databases_and_Tables) diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h index cf132fcf..9fa930c5 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.h @@ -33,4 +33,12 @@ @interface SPMySQLConnection (Delegate_and_Proxy) +// Connection delegage +- (void)setDelegate:(NSObject *)aDelegate; +- (NSObject *)delegate; + +// Connection proxy +- (void)setProxy:(NSObject *)aProxy; +- (NSObject *)proxy; + @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m index 3ac013cc..59e78c35 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Delegate & Proxy.m @@ -39,8 +39,8 @@ #pragma mark Connection delegate /** - * Override the synthesized delegate setter, to allow optimisations to oft-made - * checks by precacheing availability. + * Set the delegate of the connection object, precaching availability of + * oft-called methods to allow optimisation. */ - (void)setDelegate:(NSObject *)aDelegate { @@ -51,12 +51,22 @@ delegateSupportsConnectionLost = [delegate respondsToSelector:@selector(connectionLost:)]; } +/** + * Return the current instance delegate. + */ +- (NSObject *)delegate +{ + return delegate; +} + #pragma mark - #pragma mark Connection proxy /** - * Override the synthesized proxy setter, to record the initial state and to - * set the state change selector. + * Set the connection proxy, used by the class to set up a connection pre-requisite, and + * monitored for state changes. This allows the MySQL connection to be routed over + * another helper class providing a port or socket. This method also records the initial + * state and sets the state change selector. */ - (void)setProxy:(NSObject *)aProxy { @@ -64,7 +74,15 @@ previousProxyState = [aProxy state]; [proxy setConnectionStateChangeSelector:@selector(_proxyStateChange:) delegate:self]; -} +} + +/** + * Return the current instance proxy. + */ +- (NSObject *)proxy +{ + return proxy; +} @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m index 8f684f29..d11c75b2 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Encoding.m @@ -32,6 +32,7 @@ #import "Encoding.h" +#import "SPMySQLStringAdditions.h" @implementation SPMySQLConnection (Encoding) diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m index 9b54029c..5df71e96 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m @@ -330,10 +330,22 @@ NSString *theErrorMessage = [self _stringForCString:mysql_error(mySQLConnection)]; NSUInteger theErrorID = mysql_errno(mySQLConnection); + // Update the connection's stored insert ID if available + if (mySQLConnection->insert_id) { + lastQueryInsertID = mySQLConnection->insert_id; + } + // If the query was cancelled, override the error state if (lastQueryWasCancelled) { theErrorMessage = NSLocalizedString(@"Query cancelled.", @"Query cancelled error"); theErrorID = 1317; + + // If the query was cancelled on a MySQL <5 server, check the connection to allow reconnects + // after query kills. This is also handled within the class for internal cancellations, but + // as other external classes may also cancel the query. + if (![self serverVersionIsGreaterThanOrEqualTo:5 minorVersion:0 releaseVersion:0]) { + [self checkConnection]; + } } // Unlock the connection if appropriate - if not a streaming result type. diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h index 8f3b7f9f..8ed01ec6 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.h @@ -131,9 +131,6 @@ #pragma mark - #pragma mark Synthesized properties -@property (readwrite, assign, nonatomic) NSObject *delegate; -@property (readwrite, assign, nonatomic) NSObject *proxy; - @property (readwrite, retain) NSString *host; @property (readwrite, retain) NSString *username; @property (readwrite, retain) NSString *password; diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m index 6308a3f5..800157ca 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m @@ -54,8 +54,6 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS #pragma mark - #pragma mark Synthesized properties -@synthesize delegate; -@synthesize proxy; @synthesize host; @synthesize username; @synthesize password; @@ -124,6 +122,7 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS previousEncodingUsesLatin1Transport = NO; // Initialise default delegate settings + delegate = nil; delegateSupportsWillQueryString = NO; delegateSupportsConnectionLost = NO; delegateQueryLogging = YES; @@ -435,10 +434,15 @@ const char *SPMySQLSSLPermissibleCiphers = "DHE-RSA-AES256-SHA:AES256-SHA:DHE-RS isReconnecting = NO; [reconnectionPool release]; return NO; + + // By default attempt a reconnect, returning if it fails. If it succeeds, continue + // on to the end of the function to restore details if appropriate. default: isReconnecting = NO; - [reconnectionPool release]; - return [self reconnect]; + if (![self reconnect]) { + [reconnectionPool release]; + return NO; + } } } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m index 8ba55134..1fa4b829 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLFastStreamingResult.m @@ -398,6 +398,11 @@ typedef struct st_spmysqlstreamingrowdata { [parentConnection _unlockConnection]; connectionUnlocked = YES; + // If the connection query may have been cancelled with a query kill, double-check connection + if ([parentConnection lastQueryWasCancelled] && [parentConnection serverMajorVersion] < 5) { + [parentConnection checkConnection]; + } + dataDownloaded = YES; [downloadPool drain]; } diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m index 2b049264..4d18db18 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult Categories/Convenience Methods.m @@ -65,7 +65,7 @@ // Instead of empty arrays, return nil if there are no rows. if (![rowsToReturn count]) return nil; - return rowsToReturn; + return [rowsToReturn autorelease]; } @end diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m index b19e5356..51a17611 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResult.m @@ -170,6 +170,12 @@ dataDownloaded = YES; [parentConnection _unlockConnection]; connectionUnlocked = YES; + + // If the connection query may have been cancelled with a query kill, double-check connection + if ([parentConnection lastQueryWasCancelled] && [parentConnection serverMajorVersion] < 5) { + [parentConnection checkConnection]; + } + return nil; } diff --git a/Frameworks/SPMySQLFramework/build-mysql-client.sh b/Frameworks/SPMySQLFramework/build-mysql-client.sh index 45e3c465..158d9393 100755 --- a/Frameworks/SPMySQLFramework/build-mysql-client.sh +++ b/Frameworks/SPMySQLFramework/build-mysql-client.sh @@ -27,10 +27,10 @@ # Builds the MySQL client libraries for distrubution in Sequel Pro's MySQL framework. # -# Paramters: -s -- The path to the MySQL source directory. -# -q -- Quiet. Don't output any compiler messages. -# -c -- Clean the source after build completes. -# -d -- Debug. Output the build statements. +# Parameters: -s -- The path to the MySQL source directory. +# -q -- Quiet. Don't output any compiler messages. +# -c -- Clean the source instead of building it. +# -d -- Debug. Output the build statements. QUIET='NO' DEBUG='NO' @@ -40,8 +40,11 @@ CLEAN='NO' export CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch x86_64 -O3 -fno-omit-frame-pointer -fno-exceptions -mmacosx-version-min=10.5' export CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386 -arch x86_64 -O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mmacosx-version-min=10.5' -CONFIGURE_OPTIONS='--without-server --enable-thread-safe-client --disable-dependency-tracking --enable-local-infile --with-ssl --enable-assembler --with-mysqld-ldflags=-all-static' -BINARY_DISTRIBUTION_SCRIPT='scripts/make_binary_distribution' +CONFIGURE_OPTIONS='-DBUILD_CONFIG=mysql_release -DENABLED_LOCAL_INFILE=1 -DWITH_SSL=bundled -DWITH_MYSQLD_LDFLAGS="-all-static --disable-shared"' +OUTPUT_DIR='SPMySQLFiles.build' + +set -A INCLUDE_HEADERS 'my_alloc.h' 'my_list.h' 'mysql_com.h' 'mysql_time.h' 'mysql_version.h' 'mysql.h' 'typelib.h' +ESC=`printf '\033'` usage() { @@ -50,32 +53,28 @@ Usage: $(basename $0): -s [-q -c -d] Where: -s -- Path to the MySQL source directory -q -- Be quiet during the build. Suppress all compiler messages - -c -- Clean the source directory after the build completes + -c -- Clean the source directory instead of building -d -- Debug. Output all the build commands !EOF } +# Test for cmake +cmake --version > /dev/null 2>&1 +if [ ! $? -eq 0 ] +then + echo "$ESC[1;31mIn addition to the standard OS X build tools, '$ESC[0;1mcmake$ESC[1;31m' is required to compile the MySQL source. $ESC[0;1mcmake$ESC[1;31m is found at $ESC[0mcmake.org$ESC[1;31m, and a binary distribution is available from $ESC[0mhttp://www.cmake.org/cmake/resources/software.mhtml$ESC[1;31m ." + echo "Exiting...$ESC[0m" + exit 1 +fi + if [ $# -eq 0 ] then - echo "Invalid number of arguments. I need the path to the MySQL source directory." + echo "$ESC[1;31mInvalid number of arguments. I need the path to the MySQL source directory.$ESC[0m" echo '' usage exit 1 fi -echo '' -echo "This script builds the MySQL client libraries for distribution in Sequel Pro's MySQL framework." -echo 'They are all built as 3-way binaries (32 bit PPC, 32/64 bit i386).' -echo '' -echo -n 'This may take a while, are you sure you want to continue [y | n]: ' - -read CONTINUE - -if [ "x${CONTINUE}" == 'xn' ] -then - echo 'Aborting...' - exit 0 -fi while getopts ':s:qcd' OPTION do @@ -84,88 +83,156 @@ do q) QUIET='YES';; c) CLEAN='YES';; d) DEBUG='YES';; - *) echo 'Unrecognised option'; usage; exit 1;; + *) echo "$ESC[1;31mUnrecognised option$ESC[0m"; usage; exit 1;; esac done if [ ! -d "$MYSQL_SOURCE_DIR" ] then - echo "MySQL source directory does not exist at path '${MYSQL_SOURCE_DIR}'." - echo 'Exiting...' + echo "$ESC[1;31mMySQL source directory does not exist at path '${MYSQL_SOURCE_DIR}'.$ESC[0m" + echo "$ESC[1;31mExiting...$ESC[0m" exit 1 fi # Change to source directory +if [ "x${DEBUG}" == 'xYES' ] +then + echo "cd ${MYSQL_SOURCE_DIR}" +fi cd "$MYSQL_SOURCE_DIR" -echo 'Configuring MySQL source...' +# Perform a clean if requested +if [ "x${CLEAN}" == 'xYES' ] +then + echo "$ESC[1mCleaning MySQL source and builds...$ESC[0m" + + if [ "x${QUIET}" == 'xYES' ] + then + make clean > /dev/null + if [ -f 'CMakeCache.txt' ]; then rm 'CMakeCache.txt' > /dev/null; fi + if [ -d "$OUTPUT_DIR" ]; then rm -rf "$OUTPUT_DIR" > /dev/null; fi + else + make clean + if [ -f 'CMakeCache.txt' ]; then rm 'CMakeCache.txt'; fi + if [ -d "$OUTPUT_DIR" ]; then rm -rf "$OUTPUT_DIR" > /dev/null; fi + fi + + echo "$ESC[1mCleaning MySQL completed.$ESC[0m" + + exit 0 +fi + +echo '' +echo "This script builds the MySQL client libraries for distribution in Sequel Pro's MySQL framework." +echo 'They are all built as 3-way binaries (32 bit PPC, 32/64 bit i386).' +echo '' +echo -n "$ESC[1mThis may take a while, are you sure you want to continue [y | n]: $ESC[0m" + +read CONTINUE + +if [ "x${CONTINUE}" == 'xn' ] +then + echo "$ESC[31mAborting...$ESC[0m" + exit 0 +fi + + +echo "$ESC[1mConfiguring MySQL source...$ESC[0m" if [ "x${DEBUG}" == 'xYES' ] then - echo "${MYSQL_SOURCE_DIR}/configure" "$CONFIGURE_OPTIONS" + echo "cmake ${CONFIGURE_OPTIONS} ." fi if [ "x${QUIET}" == 'xYES' ] then - ./configure $CONFIGURE_OPTIONS > /dev/null + cmake $CONFIGURE_OPTIONS . > /dev/null else - ./configure $CONFIGURE_OPTIONS + cmake $CONFIGURE_OPTIONS . fi if [ $? -eq 0 ] then - echo 'Configure successfully completed' + echo "$ESC[1mConfigure successfully completed$ESC[0m" else - echo 'Configure failed. Exiting...' + echo "$ESC[1;31mConfigure failed. Exiting...$ESC[0m" exit 1 fi -echo 'Building client libraries...' +if [ "x${DEBUG}" == 'xYES' ] +then + echo "make mysqlclient" +fi + +echo "$ESC[1mBuilding client libraries...$ESC[0m" if [ "x${QUIET}" == 'xYES' ] then - make > /dev/null + make mysqlclient > /dev/null else - make + make mysqlclient fi if [ $? -eq 0 ] then - echo 'Building libraries successfully completed' + echo "$ESC[1mBuilding libraries successfully completed$ESC[0m" else - echo 'Building libraries failed. Exiting...' + echo "$ESC[1;31mBuilding libraries failed. Exiting...$ESC[0m" exit 1 fi -echo 'Building binary distribution...' +echo "$ESC[1mPutting together files for distribution...$ESC[0m" -if [ "x${QUIET}" == 'xYES' ] +# Create the appropriate directories +if [ ! -d "$OUTPUT_DIR" ] then - $BINARY_DISTRIBUTION_SCRIPT > /dev/null -else - $BINARY_DISTRIBUTION_SCRIPT + mkdir "$OUTPUT_DIR" + if [ ! $? -eq 0 ] + then + echo "$ESC[1;31mCould not create $OUTPUT_DIR output directory!$ESC[0m" + exit 1 + fi +fi +if [ ! -d "${OUTPUT_DIR}/lib" ] +then + mkdir "${OUTPUT_DIR}/lib" + if [ ! $? -eq 0 ] + then + echo "$ESC[1;31mCould not create ${OUTPUT_DIR}/lib output directory!$ESC[0m" + exit 1 + fi +fi +if [ ! -d "${OUTPUT_DIR}/include" ] +then + mkdir "${OUTPUT_DIR}/include" + if [ ! $? -eq 0 ] + then + echo "$ESC[1;31mCould not create ${OUTPUT_DIR}/include output directory!$ESC[0m" + exit 1 + fi fi -if [ $? -eq 0 ] +# Copy the library +cp 'libmysql/libmysqlclient.a' "${OUTPUT_DIR}/lib/" +if [ ! $? -eq 0 ] then - echo 'Building binary distribution successfully completed' -else - echo 'Building binary distribution failed. Exiting...' + echo "$ESC[1;31mCould not copy libmysqlclient.a to output directory! (${MYSQL_SOURCE_DIR}/${OUTPUT_DIR}/lib)$ESC[0m" exit 1 fi -if [ "x${CLEAN}" == 'xYES' ] -then - echo 'Cleaning build...' - - if [ "x${QUIET}" == 'xYES' ] +# Copy in the required headers +for eachheader in ${INCLUDE_HEADERS[@]} +do + cp "include/${eachheader}" "${OUTPUT_DIR}/include/" + if [ ! $? -eq 0 ] then - make clean > /dev/null - else - make clean + echo "$ESC[1;31mCould not copy ${eachheader} to output directory! (${MYSQL_SOURCE_DIR}/${OUTPUT_DIR}/include)$ESC[0m" + exit 1 fi -fi +done + -echo 'Building MySQL client libraries successfully completed.' +echo "$ESC[1mBuilding MySQL client libraries successfully completed.$ESC[0m" +echo "$ESC[1mSee ${MYSQL_SOURCE_DIR}/${OUTPUT_DIR}/ for the product.$ESC[0m" exit 0 diff --git a/Interfaces/English.lproj/QueryFavoriteManager.xib b/Interfaces/English.lproj/QueryFavoriteManager.xib index c8f467bd..2df71286 100644 --- a/Interfaces/English.lproj/QueryFavoriteManager.xib +++ b/Interfaces/English.lproj/QueryFavoriteManager.xib @@ -1,6384 +1,7641 @@ - - 1050 - 10J567 - 804 - 1038.35 - 462.00 - - YES - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit - - - YES - 804 - 1.2.2 - - - - YES - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit - - - PluginDependencyRecalculationVersion - - - - YES - - SPQueryFavoriteManager - - - FirstResponder - - - NSApplication - - - 15 - 2 - {{593, 358}, {563, 369}} - 813171712 - Query Favorite Manager - NSWindow - - {1.79769e+308, 1.79769e+308} - {529, 371} - - - 256 - - YES - - - 4106 - {{0, 356}, {563, 5}} - {{0, 10}, {563, 5}} - - {0, 0} - - 67239424 - 0 - Box - - LucidaGrande - 13 - 1044 - - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - 3 - 2 - 0 - NO - - - - 4370 - - YES - - - 272 - - YES - - - 290 - - YES - - - 292 - {{-1, -1}, {32, 25}} - - YES - - 67239424 - 134217728 - - - - -2041822977 - 402653219 - - NSImage - button_add - - - a - 400 - 75 - - - - - 292 - {{30, -1}, {32, 25}} - - YES - - 67239424 - 134217728 - - - - -2042347265 - 35 - - NSImage - button_remove - - -  - 400 - 75 - - - - - 292 - {{61, -1}, {32, 24}} - - YES - - 71433792 - 134219776 - - - -2038284033 - 134217891 - - Gw - 400 - 75 - - - YES - - - 1048576 - 2147483647 - - NSImage - NSActionTemplate - - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - OtherViews - - YES - - - - Duplicate - d - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - YES - YES - - - 2147483647 - - - _popUpItemAction: - - - - - Export Selected Favorites… - - 2147483647 - - - _popUpItemAction: - - - - - YES - Import Favorites by Replacing… - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Import Favorites… - - 2147483647 - - - _popUpItemAction: - - - - - YES - YES - - - 2147483647 - - - _popUpItemAction: - - - - - Save Query to File... - - 2147483647 - - - _popUpItemAction: - - - - - YES - YES - YES - - - 2147483647 - - - _popUpItemAction: - - - - - YES - Remove All... - - 2147483647 - - - _popUpItemAction: - - - - - YES - 1 - YES - YES - - - - {177, 23} - - YES - YES - NO - 0 - - - - 4370 - - YES - - - 2304 - - YES - - - 4370 - {178, 322} - - YES - - - 4352 - {178, 17} - - - - - - -2147483392 - {{198, 0}, {12, 17}} - - - - YES - - name - 120 - 20 - 2000 - - 75628096 - 2048 - Favorites - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337772097 - 133120 - Text Cell - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - tabtrigger - 52 - 20 - 2000 - - 75628096 - 2048 - - - - 6 - System - headerColor - - - - - - 337772096 - 133120 - Text Cell - - - - - - 3 - YES - - - - 3 - 2 - - 6 - System - _sourceListBackgroundColor - - 1 - MC44MzkyMTU2OTU5IDAuODY2NjY2Njc0NiAwLjg5ODAzOTIyMTgAA - - - - 6 - System - gridColor - - 3 - MC41AA - - - 16 - 1262485504 - - - SPQueryFavoriteManagerTable - 5 - 15 - 0 - YES - 1 - 1 - - - {{0, 17}, {178, 322}} - - - - 4 - - - - -2147483392 - {{198, 17}, {11, 322}} - - 256 - - _doScroller: - 0.94985252618789673 - - - - -2147483392 - {{-100, -100}, {311, 15}} - - 1 - - _doScroller: - 0.99532711505889893 - - - - 2304 - - YES - - - {178, 17} - - - - 4 - - - - {{0, 22}, {178, 339}} - - 528 - - - - - - QSAAAEEgAABBkAAAQZAAAA - - - {177, 361} - - NSView - - - - 4370 - - YES - - - 292 - {{9, 15}, {25, 25}} - - YES - - 67239424 - 134348800 - - - - -2038415105 - 161 - - - 200 - 25 - - - - - 292 - {{40, 15}, {144, 25}} - - YES - - -2076049856 - 134350848 - - - -2038284033 - 164 - - - 400 - 75 - - - YES - Insert Placeholder - - 1048576 - 2147483647 - 1 - - - _popUpItemAction: - - - YES - - OtherViews - - YES - - - - YES - ⇥ Snippet: - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Tab Snippet - - 1048576 - 2147483647 - - - _popUpItemAction: - 1 - - - - - 1 - Tab Snippet and Shell Command - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - YES - Placeholder - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Mirrored Tab Snippet - - 2147483647 - - - _popUpItemAction: - - - - - YES - Completion List: - - 2147483647 - - - _popUpItemAction: - - - - - 1 - List Template - - 2147483647 - - - _popUpItemAction: - - - - - 1 - List Template (Fuzzy Search) - - 2147483647 - - - _popUpItemAction: - - - - - 1 - List Separator - - 2147483647 - - - _popUpItemAction: - - - - - YES - Selection: - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Name Of Selected Table - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Name Of Selected Tables - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Name Of Selected Database - - 2147483647 - - - _popUpItemAction: - - - - - YES - Completion Lists: - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Field Names As List of Current Table - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Field Names As List of Current Table (Fuzzy Search) - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Table Names As List - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Table Names As List (Fuzzy Search) - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Database Names As List - - 2147483647 - - - _popUpItemAction: - - - - - 1 - Database Names As List (Fuzzy Search) - - 2147483647 - - - _popUpItemAction: - - - - YES - - - YES - 1 - YES - YES - 2 - - - - - 290 - {{92, 54}, {273, 19}} - - YES - - -1804468671 - 272761856 - - - - YES - - - 6 - System - textColor - - - - - - - 288 - {{17, 57}, {70, 14}} - - YES - - 68288064 - 272761856 - Tab Trigger: - - - - 6 - System - controlColor - - - - - - - - 268 - {{17, 331}, {60, 14}} - - YES - - 68288064 - 138544128 - Name: - - - - - - - - - 266 - {{77, 328}, {288, 19}} - - YES - - -1804468671 - 272761856 - - - [no selection] - - YES - - - - - - - 274 - - YES - - - 2304 - - YES - - - 2322 - - YES - - YES - Apple HTML pasteboard type - Apple PDF pasteboard type - Apple PICT pasteboard type - Apple PNG pasteboard type - Apple URL pasteboard type - CorePasteboardFlavorType 0x6D6F6F76 - NSColor pasteboard type - NSFilenamesPboardType - NSStringPboardType - NeXT Encapsulated PostScript v1.2 pasteboard type - NeXT RTFD pasteboard type - NeXT Rich Text Format v1.0 pasteboard type - NeXT TIFF v4.0 pasteboard type - NeXT font pasteboard type - NeXT ruler pasteboard type - WebURLsWithTitlesPboardType - public.url - - - {343, 14} - - - - - - - - - - - YES - - - 6 - - - - 343 - 1 - - - 11811 - 0 - - - - YES - - YES - NSBackgroundColor - NSColor - - - YES - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - YES - - YES - NSColor - NSUnderline - - - YES - - 1 - MCAwIDEAA - - - - - - - 6 - {592, 1e+07} - {180, 0} - - - - {{1, 1}, {343, 236}} - - - - - {4, -5} - 1 - - 4 - - - - -2147483392 - {{-100, -100}, {11, 133}} - - 256 - - _doScroller: - 0.73888891935348511 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - 1 - - _doScroller: - 1 - 0.94565218687057495 - - - {{20, 82}, {345, 238}} - - 530 - - - - - - - 289 - {{282, 13}, {88, 28}} - - 1 - YES - - 67239424 - 134348800 - Save - - - -2038021889 - 129 - - LucidaGrande - 11 - 16 - - - DQ - 200 - 25 - - - - - 289 - {{196, 13}, {88, 28}} - - YES - - 67239424 - 134348800 - Cancel - - - -2038284033 - 129 - - - Gw - 200 - 25 - - - - {{178, 0}, {385, 361}} - - NSView - - - {{0, -2}, {563, 361}} - - YES - 2 - SPQueryFavoriteSplitView - - 1 - MC42NjY2NjY2NjY3IDAuNjY2NjY2NjY2NyAwLjY2NjY2NjY2NjcAA - - YES - - YES - - YES - - - - - YES - - - - - - YES - - YES - - - - - YES - - - - - - YES - - YES - - - - - YES - - - - - - YES - - YES - - - - - YES - - - - - 0 - NO - - - {563, 369} - - - {{0, 0}, {1680, 1028}} - {529, 393} - {1.79769e+308, 1.79769e+308} - SPQueryFavoriteManagerWindow - - - YES - - - - - YES - - - Remove - - 2147483647 - - - - - - Duplicate - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Save to File... - - 2147483647 - - - - - - - - YES - name - query - tabtrigger - - YES - - YES - YES - YES - - - - - YES - - - window - - - - 133 - - - - favoriteNameTextField - - - - 139 - - - - favoriteQueryTextView - - - - 140 - - - - favoritesTableView - - - - 141 - - - - font: values.CustomQueryEditorFont - - - - - - font: values.CustomQueryEditorFont - font - values.CustomQueryEditorFont - - NSValueTransformerName - NSUnarchiveFromData - - 2 - - - 146 - - - - addQueryFavorite: - - - - 180 - - - - removeQueryFavorite: - - - - 181 - - - - closeQueryManagerSheet: - - - - 184 - - - - nextKeyView - - - - 185 - - - - delegate - - - - 187 - - - - delegate - - - - 188 - - - - delegate - - - - 193 - - - - scrollView - - - - 197 - - - - delegate - - - - 198 - - - - menu - - - - 209 - - - - removeQueryFavorite: - - - - 211 - - - - saveFavoriteToFile: - - - - 249 - - - - saveFavoriteToFile: - - - - 250 - - - - removeAllQueryFavorites: - - - - 251 - - - - exportFavorites: - - - - 257 - - - - importFavoritesByAdding: - - - - 261 - - - - importFavoritesByReplacing: - - - - 262 - - - - closeQueryManagerSheet: - - - - 273 - - - - dataSource - - - - 274 - - - - removeButton - - - - 275 - - - - nextKeyView - - - - 277 - - - - duplicateQueryFavorite: - - - - 282 - - - - duplicateQueryFavorite: - - - - 283 - - - - value: selection.name - - - - - - value: selection.name - value - selection.name - 2 - - - 287 - - - - value: selection.query - - - - - - value: selection.query - value - selection.query - 2 - - - 291 - - - - favoritesArrayController - - - - 297 - - - - value: arrangedObjects.name - - - - - - value: arrangedObjects.name - value - arrangedObjects.name - - NSCreatesSortDescriptor - - - 2 - - - 298 - - - - delegate - - - - 300 - - - - splitViewButtonBar - - - - 301 - - - - value: selection.tabtrigger - - - - - - value: selection.tabtrigger - value - selection.tabtrigger - 2 - - - 309 - - - - nextKeyView - - - - 311 - - - - favoriteTabTriggerTextField - - - - 312 - - - - delegate - - - - 313 - - - - insertPlaceholder: - - - - 324 - - - - showHelp: - - - - 344 - - - - - YES - - 0 - - YES - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 1 - - - YES - - - - Favorite Manager - - - 2 - - - YES - - - - - - - 142 - - - - - 143 - - - - - 205 - - - YES - - - - - - - Favorite Context Menu - - - 206 - - - - - 212 - - - - - 247 - - - - - 248 - - - - - 278 - - - YES - - - - - - - 280 - - - YES - - - - - - - - - - - - - - 279 - - - YES - - - - - - - 281 - - - YES - - - - - - - - 18 - - - YES - - - - - - 19 - - - - - 17 - - - YES - - - - - - 20 - - - - - 238 - - - YES - - - - - - 239 - - - YES - - - - - - 240 - - - YES - - - - - - - - - - - - - - - 260 - - - - - 243 - - - - - 255 - - - - - 259 - - - - - 258 - - - - - 254 - - - - - 252 - - - - - 246 - - - - - 244 - - - - - 241 - - - - - 14 - - - YES - - - - - - - - - 25 - - - - - 24 - - - - - 23 - - - YES - - - - - - - 26 - - - YES - - - - - - 27 - - - - - 121 - - - YES - - - - - - 122 - - - - - 123 - - - YES - - - - - - 124 - - - - - 127 - - - YES - - - - - - - - 128 - - - - - 129 - - - - - 130 - - - - - 131 - - - YES - - - - - - 132 - - - - - 271 - - - YES - - - - - - 272 - - - - - 284 - - - Favorites Controller - - - 265 - - - - - 302 - - - YES - - - - - - 303 - - - - - 304 - - - YES - - - - - - 305 - - - - - 306 - - - YES - - - - - - 307 - - - - - 314 - - - YES - - - - - - 315 - - - YES - - - - - - 316 - - - YES - - - - - - - - - - - - - - - - - - - - - - - - - - 317 - - - - - 318 - - - - - 319 - - - - - 321 - - - - - 322 - - - - - 323 - - - - - 326 - - - - - 327 - - - - - 328 - - - - - 329 - - - - - 330 - - - - - 332 - - - - - 333 - - - - - 334 - - - - - 335 - - - - - 336 - - - - - 337 - - - - - 338 - - - - - 339 - - - - - 340 - - - - - 341 - - - - - 342 - - - YES - - - - - - 343 - - - - - - - YES - - YES - -3.IBPluginDependency - 1.IBEditorWindowLastContentRect - 1.IBPluginDependency - 1.IBWindowTemplateEditedContentRect - 1.NSWindowTemplate.visibleAtLaunch - 1.WindowOrigin - 1.editorWindowContentRectSynchronizationRect - 1.windowTemplate.hasMinSize - 1.windowTemplate.minSize - 121.IBPluginDependency - 122.IBPluginDependency - 123.IBPluginDependency - 124.IBPluginDependency - 127.IBPluginDependency - 128.IBPluginDependency - 129.IBPluginDependency - 130.CustomClassName - 130.IBPluginDependency - 131.IBPluginDependency - 132.IBPluginDependency - 14.IBPluginDependency - 14.ImportedFromIB2 - 142.IBPluginDependency - 143.IBPluginDependency - 17.IBAttributePlaceholdersKey - 17.IBPluginDependency - 18.IBAttributePlaceholdersKey - 18.IBPluginDependency - 19.IBPluginDependency - 2.IBPluginDependency - 20.IBPluginDependency - 205.IBEditorWindowLastContentRect - 205.IBPluginDependency - 206.IBPluginDependency - 212.IBPluginDependency - 23.CustomClassName - 23.IBPluginDependency - 23.ImportedFromIB2 - 238.IBAttributePlaceholdersKey - 238.IBPluginDependency - 239.IBPluginDependency - 24.IBPluginDependency - 24.IBShouldRemoveOnLegacySave - 240.IBEditorWindowLastContentRect - 240.IBPluginDependency - 241.IBPluginDependency - 243.IBAttributePlaceholdersKey - 243.IBPluginDependency - 244.IBPluginDependency - 246.IBAttributePlaceholdersKey - 246.IBPluginDependency - 247.IBPluginDependency - 248.IBPluginDependency - 25.IBPluginDependency - 25.IBShouldRemoveOnLegacySave - 252.IBPluginDependency - 254.IBAttributePlaceholdersKey - 254.IBPluginDependency - 255.IBAttributePlaceholdersKey - 255.IBPluginDependency - 258.IBPluginDependency - 259.IBPluginDependency - 26.IBPluginDependency - 26.ImportedFromIB2 - 260.IBAttributePlaceholdersKey - 260.IBPluginDependency - 265.IBPluginDependency - 27.CustomClassName - 27.IBPluginDependency - 27.ImportedFromIB2 - 271.IBPluginDependency - 272.IBPluginDependency - 278.IBPluginDependency - 279.IBPluginDependency - 280.IBPluginDependency - 281.IBPluginDependency - 284.IBPluginDependency - 302.IBPluginDependency - 303.IBPluginDependency - 304.IBPluginDependency - 305.IBPluginDependency - 306.IBAttributePlaceholdersKey - 306.IBPluginDependency - 307.IBPluginDependency - 314.IBPluginDependency - 315.IBPluginDependency - 316.IBEditorWindowLastContentRect - 316.IBPluginDependency - 317.IBPluginDependency - 318.IBAttributePlaceholdersKey - 318.IBPluginDependency - 319.IBAttributePlaceholdersKey - 319.IBPluginDependency - 321.IBAttributePlaceholdersKey - 321.IBPluginDependency - 322.IBAttributePlaceholdersKey - 322.IBPluginDependency - 323.IBAttributePlaceholdersKey - 323.IBPluginDependency - 326.IBAttributePlaceholdersKey - 326.IBPluginDependency - 327.IBAttributePlaceholdersKey - 327.IBPluginDependency - 328.IBAttributePlaceholdersKey - 328.IBPluginDependency - 329.IBAttributePlaceholdersKey - 329.IBPluginDependency - 330.IBAttributePlaceholdersKey - 330.IBPluginDependency - 332.IBAttributePlaceholdersKey - 332.IBPluginDependency - 333.IBAttributePlaceholdersKey - 333.IBPluginDependency - 334.IBAttributePlaceholdersKey - 334.IBPluginDependency - 335.IBAttributePlaceholdersKey - 335.IBPluginDependency - 336.IBPluginDependency - 337.IBPluginDependency - 338.IBPluginDependency - 339.IBPluginDependency - 340.IBAttributePlaceholdersKey - 340.IBPluginDependency - 341.IBPluginDependency - 342.IBPluginDependency - 343.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - {{448, 419}, {563, 369}} - com.apple.InterfaceBuilder.CocoaPlugin - {{448, 419}, {563, 369}} - - {196, 240} - {{357, 418}, {480, 270}} - - {529, 371} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - SPTextView - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Delete selected favorite (⌫) - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Add favorite (⌥⌘A) - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{647, 450}, {142, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - SPTableView - com.apple.InterfaceBuilder.CocoaPlugin - - - ToolTip - - ToolTip - - (⌥⎋) - - - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.apple.InterfaceBuilder.CocoaPlugin - - {{498, 288}, {238, 152}} - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - - ToolTip - - ToolTip - - Save query of selected favorite to file - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Remove all favorites - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Export selected favorites as SPF file - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Import query favorites from SPF file and append them to the favorite list - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - ToolTip - - ToolTip - - Import query favorites from SPF file and replace the current favorites - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - ImageAndTextCell - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - Alphanumeric character string which inserts the favorite query string after expansion by pressing the ⇥ key. - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{655, 97}, {336, 360}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - JHsxOmRlZmF1bHRfdmFsdWV9IOKAkyB0YWIga2V5IHNuaXBwZXQgd2l0aCBhIGRlZmluYWJsZSBkZWZh + + 1050 + 11D50b + 851 + 1138.32 + 568.00 + + YES + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.brandonwalkin.BWToolkit + + + YES + 851 + 1.2.5 + + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.brandonwalkin.BWToolkit + + + PluginDependencyRecalculationVersion + + + + YES + + SPQueryFavoriteManager + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{593, 358}, {563, 369}} + 813171712 + Query Favorite Manager + NSWindow + + + {1.7976931348623157e+308, 1.7976931348623157e+308} + {529, 371} + + + 256 + + YES + + + 4106 + {{0, 356}, {563, 5}} + {{0, 10}, {563, 5}} + + {0, 0} + + 67239424 + 0 + Box + + LucidaGrande + 13 + 1040 + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + 3 + 2 + 0 + NO + + + + 4370 + + YES + + + 272 + + YES + + + 290 + + YES + + + 292 + {{-1, -1}, {32, 25}} + + YES + + 67239424 + 134217728 + + + + -2041822977 + 402653219 + + NSImage + button_add + + + a + 400 + 75 + + + + + 292 + {{30, -1}, {32, 25}} + + YES + + 67239424 + 134217728 + + + + -2042347265 + 35 + + NSImage + button_remove + + +  + 400 + 75 + + + + + 292 + {{61, -1}, {32, 24}} + + YES + + 71433792 + 134219776 + + + -2038284033 + 134217891 + + Gw + 400 + 75 + + + YES + + + 1048576 + 2147483647 + + NSImage + NSActionTemplate + + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Duplicate + d + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + Export Selected Favorites… + + 2147483647 + + + _popUpItemAction: + + + + + YES + Import Favorites by Replacing… + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Import Favorites… + + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + Save Query to File... + + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + YES + Remove All... + + 2147483647 + + + _popUpItemAction: + + + + + YES + 1 + YES + YES + + + + {177, 23} + + YES + YES + NO + 0 + + + + 4370 + + YES + + + 2304 + + YES + + + 4370 + {178, 322} + + YES + + + 4352 + {178, 17} + + + + + + -2147483392 + {{198, 0}, {12, 17}} + + + YES + + name + 120 + 20 + 2000 + + 75628096 + 2048 + Favorites + + LucidaGrande + 11 + 3088 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772097 + 133120 + Text Cell + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + tabtrigger + 52 + 20 + 2000 + + 75628096 + 2048 + + + + 6 + System + headerColor + + + + + + 337772096 + 133120 + Text Cell + + + + + + 3 + YES + + + + 3 + 2 + + 6 + System + _sourceListBackgroundColor + + 6 + System + alternateSelectedControlColor + + 1 + MCAwIDEAA + + + + + 6 + System + gridColor + + 3 + MC41AA + + + 16 + 1262485504 + + + SPQueryFavoriteManagerTable + 5 + 15 + 0 + YES + 1 + 1 + 1 + + + {{0, 17}, {178, 322}} + + + + + 4 + + + + -2147483392 + {{198, 17}, {11, 322}} + + 256 + + _doScroller: + 0.94985252618789673 + + + + -2147483392 + {{-100, -100}, {311, 15}} + + 1 + + _doScroller: + 0.99532711505889893 + + + + 2304 + + YES + + + {178, 17} + + + + + 4 + + + {{0, 22}, {178, 339}} + + + 133648 + + + + + QSAAAEEgAABBkAAAQZAAAA + + + {177, 361} + + NSView + + + + 4370 + + YES + + + 292 + {{9, 15}, {25, 25}} + + YES + + 67239424 + 134348800 + + + + -2038415105 + 161 + + + 200 + 25 + + + + + 292 + {{40, 15}, {144, 25}} + + YES + + -2076049856 + 134350848 + + + -2038284033 + 164 + + + 400 + 75 + + + YES + Insert Placeholder + + 1048576 + 2147483647 + 1 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + YES + ⇥ Snippet: + + 2147483647 + + + _popUpItemAction: + + + + + 1 + Tab Snippet + + 1048576 + 2147483647 + + + _popUpItemAction: + 100 + + + + + 1 + Tab Snippet and Shell Command + + 1048576 + 2147483647 + + + _popUpItemAction: + 101 + + + + + YES + Placeholder + + 2147483647 + + + _popUpItemAction: + + + + + 1 + Mirrored Tab Snippet + + 2147483647 + + + _popUpItemAction: + 501 + + + + + YES + Completion List: + + 2147483647 + + + _popUpItemAction: + + + + + 1 + List Template + + 2147483647 + + + _popUpItemAction: + 102 + + + + + 1 + List Template (Fuzzy Search) + + 2147483647 + + + _popUpItemAction: + 103 + + + + + 1 + List Separator + + 2147483647 + + + _popUpItemAction: + 104 + + + + + YES + Selection: + + 2147483647 + + + _popUpItemAction: + + + + + 1 + Name Of Selected Table + + 2147483647 + + + _popUpItemAction: + 105 + + + + + 1 + Name Of Selected Tables + + 2147483647 + + + _popUpItemAction: + 106 + + + + + 1 + Name Of Selected Database + + 2147483647 + + + _popUpItemAction: + 107 + + + + + YES + Completion Lists: + + 2147483647 + + + _popUpItemAction: + + + + + 1 + Field Names As List of Current Table + + 2147483647 + + + _popUpItemAction: + 108 + + + + + 1 + Field Names As List of Current Table (Fuzzy Search) + + 2147483647 + + + _popUpItemAction: + 109 + + + + + 1 + Table Names As List + + 2147483647 + + + _popUpItemAction: + 110 + + + + + 1 + Table Names As List (Fuzzy Search) + + 2147483647 + + + _popUpItemAction: + 111 + + + + + 1 + Database Names As List + + 2147483647 + + + _popUpItemAction: + 112 + + + + + 1 + Database Names As List (Fuzzy Search) + + 2147483647 + + + _popUpItemAction: + 113 + + + + YES + + + 5 + YES + 1 + YES + YES + 2 + + + + + 290 + {{92, 54}, {273, 19}} + + YES + + -1804468671 + 272761856 + + + + YES + + + 6 + System + textColor + + + + + + + 288 + {{17, 57}, {70, 14}} + + YES + + 68288064 + 272761856 + Tab Trigger: + + + + 6 + System + controlColor + + + + + + + + 268 + {{17, 331}, {60, 14}} + + YES + + 68288064 + 138544128 + Name: + + + + + + + + + 266 + {{77, 328}, {288, 19}} + + YES + + -1804468671 + 272761856 + + + [no selection] + + YES + + + + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + Apple URL pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + NeXT font pasteboard type + NeXT ruler pasteboard type + WebURLsWithTitlesPboardType + public.url + + + {343, 14} + + + + + + + + + + + YES + + + 6 + + + + 343 + 1 + + + 100675107 + 0 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + + + + + + 1 + + 6 + {592, 10000000} + {180, 0} + + + + {{1, 1}, {343, 236}} + + + + + + {4, -5} + 1 + + 4 + + + + -2147483392 + {{-100, -100}, {11, 133}} + + 256 + + _doScroller: + 0.73888891935348511 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565218687057495 + + + {{20, 82}, {345, 238}} + + + 133650 + + + + + + + 289 + {{282, 13}, {88, 28}} + + 1 + YES + + 67239424 + 134348800 + Save + + + -2038021889 + 129 + + LucidaGrande + 11 + 16 + + + DQ + 200 + 25 + + + + + 289 + {{196, 13}, {88, 28}} + + YES + + 67239424 + 134348800 + Cancel + + + -2038284033 + 129 + + + Gw + 200 + 25 + + + + {{178, 0}, {385, 361}} + + NSView + + + {{0, -2}, {563, 361}} + + YES + 2 + SPQueryFavoriteSplitView + + 1 + MC42NjY2NjY2NjY3IDAuNjY2NjY2NjY2NyAwLjY2NjY2NjY2NjcAA + + YES + + YES + + YES + + + + + YES + + + + + + YES + + YES + + + + + YES + + + + + + YES + + YES + + + + + YES + + + + + + YES + + YES + + + + + YES + + + + + 0 + NO + + + {563, 369} + + + {{0, 0}, {1680, 1028}} + {529, 393} + {1.7976931348623157e+308, 1.7976931348623157e+308} + SPQueryFavoriteManagerWindow + YES + + + YES + + + + + YES + + + Remove + + 2147483647 + + + + + + Duplicate + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Save to File... + + 2147483647 + + + + + + + + YES + name + query + tabtrigger + + YES + + YES + YES + YES + + + + + YES + + + window + + + + 133 + + + + favoriteNameTextField + + + + 139 + + + + favoriteQueryTextView + + + + 140 + + + + favoritesTableView + + + + 141 + + + + font: values.CustomQueryEditorFont + + + + + + font: values.CustomQueryEditorFont + font + values.CustomQueryEditorFont + + NSValueTransformerName + NSUnarchiveFromData + + 2 + + + 146 + + + + addQueryFavorite: + + + + 180 + + + + removeQueryFavorite: + + + + 181 + + + + closeQueryManagerSheet: + + + + 184 + + + + nextKeyView + + + + 185 + + + + delegate + + + + 187 + + + + delegate + + + + 188 + + + + delegate + + + + 193 + + + + scrollView + + + + 197 + + + + delegate + + + + 198 + + + + menu + + + + 209 + + + + removeQueryFavorite: + + + + 211 + + + + saveFavoriteToFile: + + + + 249 + + + + saveFavoriteToFile: + + + + 250 + + + + removeAllQueryFavorites: + + + + 251 + + + + exportFavorites: + + + + 257 + + + + importFavoritesByAdding: + + + + 261 + + + + importFavoritesByReplacing: + + + + 262 + + + + closeQueryManagerSheet: + + + + 273 + + + + dataSource + + + + 274 + + + + removeButton + + + + 275 + + + + nextKeyView + + + + 277 + + + + duplicateQueryFavorite: + + + + 282 + + + + duplicateQueryFavorite: + + + + 283 + + + + value: selection.name + + + + + + value: selection.name + value + selection.name + 2 + + + 287 + + + + value: selection.query + + + + + + value: selection.query + value + selection.query + 2 + + + 291 + + + + favoritesArrayController + + + + 297 + + + + value: arrangedObjects.name + + + + + + value: arrangedObjects.name + value + arrangedObjects.name + + NSCreatesSortDescriptor + + + 2 + + + 298 + + + + delegate + + + + 300 + + + + splitViewButtonBar + + + + 301 + + + + value: selection.tabtrigger + + + + + + value: selection.tabtrigger + value + selection.tabtrigger + 2 + + + 309 + + + + nextKeyView + + + + 311 + + + + favoriteTabTriggerTextField + + + + 312 + + + + delegate + + + + 313 + + + + insertPlaceholder: + + + + 324 + + + + showHelp: + + + + 344 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + Favorite Manager + + + 2 + + + YES + + + + + + + 142 + + + + + 143 + + + + + 205 + + + YES + + + + + + + Favorite Context Menu + + + 206 + + + + + 212 + + + + + 247 + + + + + 248 + + + + + 278 + + + YES + + + + + + + 280 + + + YES + + + + + + + + + + + + + + 279 + + + YES + + + + + + + 281 + + + YES + + + + + + + + 18 + + + YES + + + + + + 19 + + + + + 17 + + + YES + + + + + + 20 + + + + + 238 + + + YES + + + + + + 239 + + + YES + + + + + + 240 + + + YES + + + + + + + + + + + + + + + 260 + + + + + 243 + + + + + 255 + + + + + 259 + + + + + 258 + + + + + 254 + + + + + 252 + + + + + 246 + + + + + 244 + + + + + 241 + + + + + 14 + + + YES + + + + + + + + + 25 + + + + + 24 + + + + + 23 + + + YES + + + + + + + 26 + + + YES + + + + + + 27 + + + + + 121 + + + YES + + + + + + 122 + + + + + 123 + + + YES + + + + + + 124 + + + + + 127 + + + YES + + + + + + + + 128 + + + + + 129 + + + + + 130 + + + + + 131 + + + YES + + + + + + 132 + + + + + 271 + + + YES + + + + + + 272 + + + + + 284 + + + Favorites Controller + + + 265 + + + + + 302 + + + YES + + + + + + 303 + + + + + 304 + + + YES + + + + + + 305 + + + + + 306 + + + YES + + + + + + 307 + + + + + 314 + + + YES + + + + + + 315 + + + YES + + + + + + 316 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + 317 + + + + + 318 + + + + + 319 + + + + + 321 + + + + + 322 + + + + + 323 + + + + + 326 + + + + + 327 + + + + + 328 + + + + + 329 + + + + + 330 + + + + + 332 + + + + + 333 + + + + + 334 + + + + + 335 + + + + + 336 + + + + + 337 + + + + + 338 + + + + + 339 + + + + + 340 + + + + + 341 + + + + + 342 + + + YES + + + + + + 343 + + + + + + + YES + + YES + -3.IBPluginDependency + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 1.NSWindowTemplate.visibleAtLaunch + 1.WindowOrigin + 1.editorWindowContentRectSynchronizationRect + 1.windowTemplate.hasMinSize + 1.windowTemplate.minSize + 121.IBPluginDependency + 122.IBPluginDependency + 123.IBPluginDependency + 124.IBPluginDependency + 127.IBPluginDependency + 128.IBPluginDependency + 129.IBPluginDependency + 130.CustomClassName + 130.IBPluginDependency + 131.IBPluginDependency + 132.IBPluginDependency + 14.IBPluginDependency + 14.ImportedFromIB2 + 142.IBPluginDependency + 143.IBPluginDependency + 17.IBAttributePlaceholdersKey + 17.IBPluginDependency + 18.IBAttributePlaceholdersKey + 18.IBPluginDependency + 19.IBPluginDependency + 2.IBPluginDependency + 20.IBPluginDependency + 205.IBEditorWindowLastContentRect + 205.IBPluginDependency + 206.IBPluginDependency + 212.IBPluginDependency + 23.CustomClassName + 23.IBPluginDependency + 23.ImportedFromIB2 + 238.IBAttributePlaceholdersKey + 238.IBPluginDependency + 239.IBPluginDependency + 24.IBPluginDependency + 24.IBShouldRemoveOnLegacySave + 240.IBEditorWindowLastContentRect + 240.IBPluginDependency + 241.IBPluginDependency + 243.IBAttributePlaceholdersKey + 243.IBPluginDependency + 244.IBPluginDependency + 246.IBAttributePlaceholdersKey + 246.IBPluginDependency + 247.IBPluginDependency + 248.IBPluginDependency + 25.IBPluginDependency + 25.IBShouldRemoveOnLegacySave + 252.IBPluginDependency + 254.IBAttributePlaceholdersKey + 254.IBPluginDependency + 255.IBAttributePlaceholdersKey + 255.IBPluginDependency + 258.IBPluginDependency + 259.IBPluginDependency + 26.IBPluginDependency + 26.ImportedFromIB2 + 260.IBAttributePlaceholdersKey + 260.IBPluginDependency + 265.IBPluginDependency + 27.CustomClassName + 27.IBPluginDependency + 27.ImportedFromIB2 + 271.IBPluginDependency + 272.IBPluginDependency + 278.IBPluginDependency + 279.IBPluginDependency + 280.IBPluginDependency + 281.IBPluginDependency + 284.IBPluginDependency + 302.IBPluginDependency + 303.IBPluginDependency + 304.IBPluginDependency + 305.IBPluginDependency + 306.IBAttributePlaceholdersKey + 306.IBPluginDependency + 307.IBPluginDependency + 314.IBPluginDependency + 315.IBPluginDependency + 316.IBEditorWindowLastContentRect + 316.IBPluginDependency + 317.IBPluginDependency + 318.IBAttributePlaceholdersKey + 318.IBPluginDependency + 319.IBAttributePlaceholdersKey + 319.IBPluginDependency + 321.IBAttributePlaceholdersKey + 321.IBPluginDependency + 322.IBAttributePlaceholdersKey + 322.IBPluginDependency + 323.IBAttributePlaceholdersKey + 323.IBPluginDependency + 326.IBAttributePlaceholdersKey + 326.IBPluginDependency + 327.IBAttributePlaceholdersKey + 327.IBPluginDependency + 328.IBAttributePlaceholdersKey + 328.IBPluginDependency + 328.notes + 328.showNotes + 329.IBAttributePlaceholdersKey + 329.IBPluginDependency + 330.IBAttributePlaceholdersKey + 330.IBPluginDependency + 332.IBAttributePlaceholdersKey + 332.IBPluginDependency + 333.IBAttributePlaceholdersKey + 333.IBPluginDependency + 334.IBAttributePlaceholdersKey + 334.IBPluginDependency + 335.IBAttributePlaceholdersKey + 335.IBPluginDependency + 336.IBPluginDependency + 337.IBPluginDependency + 338.IBPluginDependency + 339.IBPluginDependency + 340.IBAttributePlaceholdersKey + 340.IBPluginDependency + 341.IBPluginDependency + 342.IBPluginDependency + 343.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + {{421, 419}, {563, 369}} + com.apple.InterfaceBuilder.CocoaPlugin + {{421, 419}, {563, 369}} + + {196, 240} + {{357, 418}, {480, 270}} + + {529, 371} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + SPTextView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Delete selected favorite (⌫) + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Add favorite (⌥⌘A) + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{647, 450}, {142, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + SPTableView + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + (⌥⎋) + + + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.apple.InterfaceBuilder.CocoaPlugin + + {{498, 288}, {238, 152}} + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + + ToolTip + + ToolTip + + Save query of selected favorite to file + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Remove all favorites + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Export selected favorites as SPF file + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Import query favorites from SPF file and append them to the favorite list + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + ToolTip + + ToolTip + + Import query favorites from SPF file and replace the current favorites + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ImageAndTextCell + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + Alphanumeric character string which inserts the favorite query string after expansion by pressing the ⇥ key. + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{628, 97}, {336, 360}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + JHsxOmRlZmF1bHRfdmFsdWV9IOKAkyB0YWIga2V5IHNuaXBwZXQgd2l0aCBhIGRlZmluYWJsZSBkZWZh dWx0IHZhbHVlIHdoaWNoIHdpbGwgYmUgc2VsZWN0ZWQKClvigJwx4oCdIGNhbiBiZSBhIG51bWJlciBm cm9tIDAgdG8gMTggYW5kIGRlZmluZXMgdGhlIG9yZGVyIG9mIHRhYiBrZXkgZG93biBldmVudHNd4oCo A - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - JChzaGVsbF9jb21tYW5kKSDigJMgc2hlbGxfY29tbWFuZCB3aWxsIGJlIGV4ZWN1dGVkIGFuZCBpbnNl + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + JChzaGVsbF9jb21tYW5kKSDigJMgc2hlbGxfY29tbWFuZCB3aWxsIGJlIGV4ZWN1dGVkIGFuZCBpbnNl cnRzIGl0cyByZXN1bHQKCltwcmVzcyDijJguIHRvIGNhbmNlbCB0aGUgZXhlY3V0aW9uIG9mIOKAnHNo ZWxsX2NvbW1hbmTigJ1dCuKAqFtvbmx5IGF2YWlsYWJsZSBpbnNpZGUgb2YgdGFiIHNuaXBwZXRzXeKA qA - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - JFNQX1NFTEVDVEVEX1RBQkxFIOKAkyB3aWxsIGJlIHJlcGxhY2VkIGJ5IHRoZSBzZWxlY3RlZCB0YWJs + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + JFNQX1NFTEVDVEVEX1RBQkxFIOKAkyB3aWxsIGJlIHJlcGxhY2VkIGJ5IHRoZSBzZWxlY3RlZCB0YWJs ZSBuYW1lCgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBzbmlwcGV0c10 - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - JFNQX1NFTEVDVEVEX1RBQkxFUyDigJMgd2lsbCBiZSByZXBsYWNlZCBieSBhIGNvbW1hIHNlcGFyYXRl + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + JFNQX1NFTEVDVEVEX1RBQkxFUyDigJMgd2lsbCBiZSByZXBsYWNlZCBieSBhIGNvbW1hIHNlcGFyYXRl ZCBsaXN0IG9mIGFsbCBzZWxlY3RlZCB0YWJsZSBuYW1lcwoKW29ubHkgYXZhaWxhYmxlIGluc2lkZSBv ZiB0YWIgc25pcHBldHNdA - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - JFNQX1NFTEVDVEVEX0RBVEFCQVNFIOKAkyB3aWxsIGJlIHJlcGxhY2VkIGJ5IHRoZSBzZWxlY3RlZCBk + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + JFNQX1NFTEVDVEVEX0RBVEFCQVNFIOKAkyB3aWxsIGJlIHJlcGxhY2VkIGJ5IHRoZSBzZWxlY3RlZCBk YXRhYmFzZSBuYW1lCgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBzbmlwcGV0c10 - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqZhwqZiwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUgc2hvd24gYXMgY29tcGxldGlvbiBsaXN0 + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqZhwqZiwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUgc2hvd24gYXMgY29tcGxldGlvbiBsaXN0 IHdpdGggdGhlIGl0ZW1zIOKAnGHigJ0gYW5kIOKAnGLigJ0KCltvbmx5IGF2YWlsYWJsZSBpbnNpZGUg b2YgdGFiIHNuaXBwZXRzXQ - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqbCpmHCpmLCpsKmIOKAkyBzdWNoIGEgc25pcHBldCB3aWxsIGJlIHNob3duIGFzIGNvbXBsZXRpb24g + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqbCpmHCpmLCpsKmIOKAkyBzdWNoIGEgc25pcHBldCB3aWxsIGJlIHNob3duIGFzIGNvbXBsZXRpb24g bGlzdCB3aXRoIHRoZSBpdGVtcyDigJxh4oCdIGFuZCDigJxi4oCdIGluIGZ1enp5IHNlYXJjaCBtb2Rl Cgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBzbmlwcGV0c10 - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqYg4oCTIGxpc3Qgc2VwYXJhdG9yCgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBzbmlwcGV0 + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqYg4oCTIGxpc3Qgc2VwYXJhdG9yCgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBzbmlwcGV0 c10 - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqYkU1BfQVNMSVNUX0FMTF9EQVRBQkFTRVPCpiDigJMgc3VjaCBhIHNuaXBwZXQgd2lsbCBiZSBzaG93 + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + + ToolTip + + ToolTip + + wqYkU1BfQVNMSVNUX0FMTF9EQVRBQkFTRVPCpiDigJMgc3VjaCBhIHNuaXBwZXQgd2lsbCBiZSBzaG93 biBhcyBjb21wbGV0aW9uIGxpc3Qgd2l0aCBhbGwgZGF0YWJhc2UgbmFtZXMgZnJvbSB0aGUgY3VycmVu dCBjb25uZWN0aW9uCgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBzbmlwcGV0c10 - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqbCpiRTUF9BU0xJU1RfQUxMX0RBVEFCQVNFU8KmwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUg + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqbCpiRTUF9BU0xJU1RfQUxMX0RBVEFCQVNFU8KmwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUg c2hvd24gYXMgY29tcGxldGlvbiBsaXN0IHdpdGggYWxsIGRhdGFiYXNlIG5hbWVzIGZyb20gdGhlIGN1 cnJlbnQgY29ubmVjdGlvbiBpbiBmdXp6eSBzZWFyY2ggbW9kZQoKW29ubHkgYXZhaWxhYmxlIGluc2lk ZSBvZiB0YWIgc25pcHBldHNdA - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqYkU1BfQVNMSVNUX0FMTF9UQUJMRVPCpiDigJMgc3VjaCBhIHNuaXBwZXQgd2lsbCBiZSBzaG93biBh + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqYkU1BfQVNMSVNUX0FMTF9UQUJMRVPCpiDigJMgc3VjaCBhIHNuaXBwZXQgd2lsbCBiZSBzaG93biBh cyBjb21wbGV0aW9uIGxpc3Qgd2l0aCBhbGwgdGFibGUgbmFtZXMgKGluY2wuIHZpZXdzKSBmcm9tIHRo ZSBjdXJyZW50IHNlbGVjdGVkIGRhdGFiYXNlCgpbb25seSBhdmFpbGFibGUgaW5zaWRlIG9mIHRhYiBz bmlwcGV0c10 - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqbCpiRTUF9BU0xJU1RfQUxMX1RBQkxFU8KmwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUgc2hv + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqbCpiRTUF9BU0xJU1RfQUxMX1RBQkxFU8KmwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUgc2hv d24gYXMgY29tcGxldGlvbiBsaXN0IHdpdGggYWxsIHRhYmxlIG5hbWVzIChpbmNsLiB2aWV3cykgZnJv bSB0aGUgY3VycmVudCBzZWxlY3RlZCBkYXRhYmFzZSBpbiBmdXp6eSBzZWFyY2ggbW9kZQoKW29ubHkg YXZhaWxhYmxlIGluc2lkZSBvZiB0YWIgc25pcHBldHNdA - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqYkU1BfQVNMSVNUX0FMTF9GSUVMRFPCpiDigJMgc3VjaCBhIHNuaXBwZXQgd2lsbCBiZSBzaG93biBh + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqYkU1BfQVNMSVNUX0FMTF9GSUVMRFPCpiDigJMgc3VjaCBhIHNuaXBwZXQgd2lsbCBiZSBzaG93biBh cyBjb21wbGV0aW9uIGxpc3Qgd2l0aCBhbGwgZmllbGQgbmFtZXMgZnJvbSB0aGUgY3VycmVudCBzZWxl Y3RlZCB0YWJsZQoKW29ubHkgYXZhaWxhYmxlIGluc2lkZSBvZiB0YWIgc25pcHBldHNdA - - - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - wqbCpiRTUF9BU0xJU1RfQUxMX0ZJRUxEU8KmwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUgc2hv + + + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + wqbCpiRTUF9BU0xJU1RfQUxMX0ZJRUxEU8KmwqYg4oCTIHN1Y2ggYSBzbmlwcGV0IHdpbGwgYmUgc2hv d24gYXMgY29tcGxldGlvbiBsaXN0IHdpdGggYWxsIGZpZWxkIG5hbWVzIGZyb20gdGhlIGN1cnJlbnQg c2VsZWN0ZWQgdGFibGUKCltvbmx5IGF2YWlsYWJsZSBpbnNpZGUgb2YgdGFiIHNuaXBwZXRzXQ - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - ToolTip - - ToolTip - - JDEg4oCTIG1pcnJvcmVkIHRhYiBzbmlwcGV0IHdoaWNoIGlzIGEgcGxhY2Vob2xkZXIgZm9yIHRoZSBj + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + ToolTip + + ToolTip + + JDEg4oCTIG1pcnJvcmVkIHRhYiBzbmlwcGV0IHdoaWNoIGlzIGEgcGxhY2Vob2xkZXIgZm9yIHRoZSBj b250ZW50IG9mIHRhYiBzbmlwcGV0IOKAnDHigJ0KClvigJwx4oCdIGNhbiBiZSBhIG51bWJlciBmcm9t IDAgdG8gMTggYW5kIGRlZmluZXMgdGhlIG9yZGVyIG9mIHRhYiBrZXkgZG93biBldmVudHNdCgpbbWF5 IG5vdCBiZSB1c2VkIGluc2lkZSBvZiBhIHRhYiBzbmlwcGV0XeKAqA - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 344 - - - - YES - - ImageAndTextCell - NSTextFieldCell - - IBProjectSource - Source/ImageAndTextCell.h - - - - NSApplication - - IBProjectSource - Frameworks/PSMTabBar/PSMTabDragAssistant.h - - - - NSMenu - - IBProjectSource - Source/SPMenuAdditions.h - - - - NSObject - - IBProjectSource - Frameworks/MCPKit/MCPFoundationKit/MCPNull.h - - - - NSObject - - IBProjectSource - Frameworks/PSMTabBar/PSMTabBarCell.h - - - - NSObject - - IBProjectSource - Frameworks/PSMTabBar/PSMTabBarControl.h - - - - NSObject - - IBProjectSource - Source/SPConnectionController.h - - - - NSObject - - IBProjectSource - Source/SPContentFilterManager.h - - - - NSObject - - IBProjectSource - Source/SPImageView.h - - - - NSObject - - IBProjectSource - Source/SPMainThreadTrampoline.h - - - - NSObject - - IBProjectSource - Source/SPNotLoaded.h - - - - NSObject - - IBProjectSource - Source/SPQueryFavoriteManager.h - - - - NSObject - - toggleCollapse: - id - - - toggleCollapse: - - toggleCollapse: - id - - - - IBProjectSource - Source/SPTablesList.h - - - - NSTextView - - YES - - YES - doDecomposedStringWithCanonicalMapping: - doDecomposedStringWithCompatibilityMapping: - doPrecomposedStringWithCanonicalMapping: - doPrecomposedStringWithCompatibilityMapping: - doRemoveDiacritics: - doSelectionLowerCase: - doSelectionTitleCase: - doSelectionUpperCase: - doTranspose: - executeBundleItemForInputField: - insertNULLvalue: - moveSelectionLineDown: - moveSelectionLineUp: - selectCurrentLine: - selectCurrentWord: - selectEnclosingBrackets: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - doDecomposedStringWithCanonicalMapping: - doDecomposedStringWithCompatibilityMapping: - doPrecomposedStringWithCanonicalMapping: - doPrecomposedStringWithCompatibilityMapping: - doRemoveDiacritics: - doSelectionLowerCase: - doSelectionTitleCase: - doSelectionUpperCase: - doTranspose: - executeBundleItemForInputField: - insertNULLvalue: - moveSelectionLineDown: - moveSelectionLineUp: - selectCurrentLine: - selectCurrentWord: - selectEnclosingBrackets: - - - YES - - doDecomposedStringWithCanonicalMapping: - id - - - doDecomposedStringWithCompatibilityMapping: - id - - - doPrecomposedStringWithCanonicalMapping: - id - - - doPrecomposedStringWithCompatibilityMapping: - id - - - doRemoveDiacritics: - id - - - doSelectionLowerCase: - id - - - doSelectionTitleCase: - id - - - doSelectionUpperCase: - id - - - doTranspose: - id - - - executeBundleItemForInputField: - id - - - insertNULLvalue: - id - - - moveSelectionLineDown: - id - - - moveSelectionLineUp: - id - - - selectCurrentLine: - id - - - selectCurrentWord: - id - - - selectEnclosingBrackets: - id - - - - - IBProjectSource - Source/SPTextViewAdditions.h - - - - NSWindow - - IBProjectSource - Source/SPWindowAdditions.h - - - - SPContentFilterManager - NSWindowController - - YES - - YES - addContentFilter: - closeContentFilterManagerSheet: - duplicateContentFilter: - exportContentFilter: - importContentFilterByAdding: - insertPlaceholder: - removeContentFilter: - suppressLeadingFiledPlaceholderWasChanged: - - - YES - id - id - id - id - id - id - id - id - - - - YES - - YES - addContentFilter: - closeContentFilterManagerSheet: - duplicateContentFilter: - exportContentFilter: - importContentFilterByAdding: - insertPlaceholder: - removeContentFilter: - suppressLeadingFiledPlaceholderWasChanged: - - - YES - - addContentFilter: - id - - - closeContentFilterManagerSheet: - id - - - duplicateContentFilter: - id - - - exportContentFilter: - id - - - importContentFilterByAdding: - id - - - insertPlaceholder: - id - - - removeContentFilter: - id - - - suppressLeadingFiledPlaceholderWasChanged: - id - - - - - YES - - YES - contentFilterArrayController - contentFilterConjunctionLabel - contentFilterConjunctionTextField - contentFilterNameTextField - contentFilterTableView - contentFilterTextView - encodingPopUp - insertPlaceholderButton - numberOfArgsLabel - removeButton - resultingClauseContentLabel - resultingClauseLabel - splitViewButtonBar - suppressLeadingFiledPlaceholderCheckbox - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - BWAnchoredButtonBar - id - - - - YES - - YES - contentFilterArrayController - contentFilterConjunctionLabel - contentFilterConjunctionTextField - contentFilterNameTextField - contentFilterTableView - contentFilterTextView - encodingPopUp - insertPlaceholderButton - numberOfArgsLabel - removeButton - resultingClauseContentLabel - resultingClauseLabel - splitViewButtonBar - suppressLeadingFiledPlaceholderCheckbox - - - YES - - contentFilterArrayController - id - - - contentFilterConjunctionLabel - id - - - contentFilterConjunctionTextField - id - - - contentFilterNameTextField - id - - - contentFilterTableView - id - - - contentFilterTextView - id - - - encodingPopUp - id - - - insertPlaceholderButton - id - - - numberOfArgsLabel - id - - - removeButton - id - - - resultingClauseContentLabel - id - - - resultingClauseLabel - id - - - splitViewButtonBar - BWAnchoredButtonBar - - - suppressLeadingFiledPlaceholderCheckbox - id - - - - - - - SPCopyTable - SPTableView - - YES - - YES - copy: - executeBundleItemForDataTable: - - - YES - id - id - - - - YES - - YES - copy: - executeBundleItemForDataTable: - - - YES - - copy: - id - - - executeBundleItemForDataTable: - id - - - - - YES - - YES - mySQLConnection - tableInstance - - - YES - id - id - - - - YES - - YES - mySQLConnection - tableInstance - - - YES - - mySQLConnection - id - - - tableInstance - id - - - - - IBProjectSource - Source/SPCopyTable.h - - - - SPCopyTable - SPTableView - - IBUserSource - - - - - SPCustomQuery - NSObject - - YES - - YES - chooseQueryFavorite: - chooseQueryHistory: - clearQueryHistory: - closeSheet: - copyQueryHistory: - filterQueryFavorites: - filterQueryHistory: - gearMenuItemSelected: - helpSearchFindNextInPage: - helpSearchFindPreviousInPage: - helpSegmentDispatcher: - helpSelectHelpTargetMySQL: - helpSelectHelpTargetPage: - helpSelectHelpTargetWeb: - helpTargetDispatcher: - runAllQueries: - runSelectedQueries: - saveQueryHistory: - showAutoHelpForCurrentWord: - showCompletionList: - showHelpForCurrentWord: - showHelpForSearchString: - toggleQueryInfoPaneCollapse: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - chooseQueryFavorite: - chooseQueryHistory: - clearQueryHistory: - closeSheet: - copyQueryHistory: - filterQueryFavorites: - filterQueryHistory: - gearMenuItemSelected: - helpSearchFindNextInPage: - helpSearchFindPreviousInPage: - helpSegmentDispatcher: - helpSelectHelpTargetMySQL: - helpSelectHelpTargetPage: - helpSelectHelpTargetWeb: - helpTargetDispatcher: - runAllQueries: - runSelectedQueries: - saveQueryHistory: - showAutoHelpForCurrentWord: - showCompletionList: - showHelpForCurrentWord: - showHelpForSearchString: - toggleQueryInfoPaneCollapse: - - - YES - - chooseQueryFavorite: - id - - - chooseQueryHistory: - id - - - clearQueryHistory: - id - - - closeSheet: - id - - - copyQueryHistory: - id - - - filterQueryFavorites: - id - - - filterQueryHistory: - id - - - gearMenuItemSelected: - id - - - helpSearchFindNextInPage: - id - - - helpSearchFindPreviousInPage: - id - - - helpSegmentDispatcher: - id - - - helpSelectHelpTargetMySQL: - id - - - helpSelectHelpTargetPage: - id - - - helpSelectHelpTargetWeb: - id - - - helpTargetDispatcher: - id - - - runAllQueries: - id - - - runSelectedQueries: - id - - - saveQueryHistory: - id - - - showAutoHelpForCurrentWord: - id - - - showCompletionList: - id - - - showHelpForCurrentWord: - id - - - showHelpForSearchString: - id - - - toggleQueryInfoPaneCollapse: - id - - - - - YES - - YES - affectedRowsText - autohelpMenuItem - autoindentMenuItem - autopairMenuItem - autouppercaseKeywordsMenuItem - clearHistoryMenuItem - commentCurrentQueryMenuItem - commentLineOrSelectionMenuItem - completionListMenuItem - copyHistoryMenuItem - customQueryScrollView - customQueryView - editorFontMenuItem - encodingPopUp - errorText - errorTextScrollView - helpNavigator - helpSearchField - helpSearchFieldCell - helpTargetSelector - helpWebView - helpWebViewWindow - multipleLineEditingButton - nextHistoryMenuItem - previousHistoryMenuItem - queryFavoriteNameTextField - queryFavoritesButton - queryFavoritesSaveAllMenuItem - queryFavoritesSaveAsMenuItem - queryFavoritesSearchField - queryFavoritesSearchFieldView - queryFavoritesSearchMenuItem - queryFavoritesSheet - queryHistoryButton - queryHistorySearchField - queryHistorySearchFieldView - queryHistorySearchMenuItem - queryInfoButton - queryInfoPaneSplitView - runAllButton - runAllMenuItem - runSelectionButton - runSelectionMenuItem - saveHistoryMenuItem - saveQueryFavoriteButton - saveQueryFavoriteGlobal - shiftLeftMenuItem - shiftRightMenuItem - tableDocumentInstance - tablesListInstance - textView - valueSheet - valueTextField - - - YES - id - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSScrollView - SPCopyTable - NSMenuItem - NSPopUpButton - id - NSScrollView - NSSegmentedControl - NSSearchField - NSSearchFieldCell - NSSegmentedControl - WebView - NSWindow - id - NSMenuItem - NSMenuItem - NSTextField - id - NSMenuItem - NSMenuItem - NSSearchField - id - NSMenuItem - NSWindow - id - NSSearchField - id - NSMenuItem - NSButton - BWSplitView - id - NSMenuItem - id - NSMenuItem - NSMenuItem - NSButton - id - NSMenuItem - NSMenuItem - id - id - SPTextView - id - id - - - - YES - - YES - affectedRowsText - autohelpMenuItem - autoindentMenuItem - autopairMenuItem - autouppercaseKeywordsMenuItem - clearHistoryMenuItem - commentCurrentQueryMenuItem - commentLineOrSelectionMenuItem - completionListMenuItem - copyHistoryMenuItem - customQueryScrollView - customQueryView - editorFontMenuItem - encodingPopUp - errorText - errorTextScrollView - helpNavigator - helpSearchField - helpSearchFieldCell - helpTargetSelector - helpWebView - helpWebViewWindow - multipleLineEditingButton - nextHistoryMenuItem - previousHistoryMenuItem - queryFavoriteNameTextField - queryFavoritesButton - queryFavoritesSaveAllMenuItem - queryFavoritesSaveAsMenuItem - queryFavoritesSearchField - queryFavoritesSearchFieldView - queryFavoritesSearchMenuItem - queryFavoritesSheet - queryHistoryButton - queryHistorySearchField - queryHistorySearchFieldView - queryHistorySearchMenuItem - queryInfoButton - queryInfoPaneSplitView - runAllButton - runAllMenuItem - runSelectionButton - runSelectionMenuItem - saveHistoryMenuItem - saveQueryFavoriteButton - saveQueryFavoriteGlobal - shiftLeftMenuItem - shiftRightMenuItem - tableDocumentInstance - tablesListInstance - textView - valueSheet - valueTextField - - - YES - - affectedRowsText - id - - - autohelpMenuItem - NSMenuItem - - - autoindentMenuItem - NSMenuItem - - - autopairMenuItem - NSMenuItem - - - autouppercaseKeywordsMenuItem - NSMenuItem - - - clearHistoryMenuItem - NSMenuItem - - - commentCurrentQueryMenuItem - NSMenuItem - - - commentLineOrSelectionMenuItem - NSMenuItem - - - completionListMenuItem - NSMenuItem - - - copyHistoryMenuItem - NSMenuItem - - - customQueryScrollView - NSScrollView - - - customQueryView - SPCopyTable - - - editorFontMenuItem - NSMenuItem - - - encodingPopUp - NSPopUpButton - - - errorText - id - - - errorTextScrollView - NSScrollView - - - helpNavigator - NSSegmentedControl - - - helpSearchField - NSSearchField - - - helpSearchFieldCell - NSSearchFieldCell - - - helpTargetSelector - NSSegmentedControl - - - helpWebView - WebView - - - helpWebViewWindow - NSWindow - - - multipleLineEditingButton - id - - - nextHistoryMenuItem - NSMenuItem - - - previousHistoryMenuItem - NSMenuItem - - - queryFavoriteNameTextField - NSTextField - - - queryFavoritesButton - id - - - queryFavoritesSaveAllMenuItem - NSMenuItem - - - queryFavoritesSaveAsMenuItem - NSMenuItem - - - queryFavoritesSearchField - NSSearchField - - - queryFavoritesSearchFieldView - id - - - queryFavoritesSearchMenuItem - NSMenuItem - - - queryFavoritesSheet - NSWindow - - - queryHistoryButton - id - - - queryHistorySearchField - NSSearchField - - - queryHistorySearchFieldView - id - - - queryHistorySearchMenuItem - NSMenuItem - - - queryInfoButton - NSButton - - - queryInfoPaneSplitView - BWSplitView - - - runAllButton - id - - - runAllMenuItem - NSMenuItem - - - runSelectionButton - id - - - runSelectionMenuItem - NSMenuItem - - - saveHistoryMenuItem - NSMenuItem - - - saveQueryFavoriteButton - NSButton - - - saveQueryFavoriteGlobal - id - - - shiftLeftMenuItem - NSMenuItem - - - shiftRightMenuItem - NSMenuItem - - - tableDocumentInstance - id - - - tablesListInstance - id - - - textView - SPTextView - - - valueSheet - id - - - valueTextField - id - - - - - IBProjectSource - Source/SPCustomQuery.h - - - - SPCustomQuery - NSObject - - IBUserSource - - - - - SPDatabaseDocument - - IBProjectSource - Source/SPConnectionDelegate.h - - - - SPDatabaseDocument - NSObject - - YES - - YES - addConnectionToFavorites: - addDatabase: - analyzeTable: - backForwardInHistory: - cancelTask: - checkTable: - checksumTable: - chooseDatabase: - chooseEncoding: - closePanelSheet: - closePasswordSheet: - closeSheet: - copyChecksumFromSheet: - copyCreateTableSyntax: - copyCreateTableSyntaxFromSheet: - copyDatabase: - export: - exportSelectedTablesAs: - flushPrivileges: - flushTable: - focusOnTableContentFilter: - focusOnTableListFilter: - import: - importFromClipboard: - openCurrentConnectionInNewWindow: - openDatabaseInNewTab: - optimizeTable: - refreshTables: - removeDatabase: - renameDatabase: - repairTable: - saveConnectionSheet: - saveCreateSyntax: - setDatabases: - showConsole: - showCreateTableSyntax: - showMySQLHelp: - showNavigator: - showServerProcesses: - showServerVariables: - showUserManager: - toggleNavigator: - updateWindowTitle: - validateSaveConnectionAccessory: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addConnectionToFavorites: - addDatabase: - analyzeTable: - backForwardInHistory: - cancelTask: - checkTable: - checksumTable: - chooseDatabase: - chooseEncoding: - closePanelSheet: - closePasswordSheet: - closeSheet: - copyChecksumFromSheet: - copyCreateTableSyntax: - copyCreateTableSyntaxFromSheet: - copyDatabase: - export: - exportSelectedTablesAs: - flushPrivileges: - flushTable: - focusOnTableContentFilter: - focusOnTableListFilter: - import: - importFromClipboard: - openCurrentConnectionInNewWindow: - openDatabaseInNewTab: - optimizeTable: - refreshTables: - removeDatabase: - renameDatabase: - repairTable: - saveConnectionSheet: - saveCreateSyntax: - setDatabases: - showConsole: - showCreateTableSyntax: - showMySQLHelp: - showNavigator: - showServerProcesses: - showServerVariables: - showUserManager: - toggleNavigator: - updateWindowTitle: - validateSaveConnectionAccessory: - - - YES - - addConnectionToFavorites: - id - - - addDatabase: - id - - - analyzeTable: - id - - - backForwardInHistory: - id - - - cancelTask: - id - - - checkTable: - id - - - checksumTable: - id - - - chooseDatabase: - id - - - chooseEncoding: - id - - - closePanelSheet: - id - - - closePasswordSheet: - id - - - closeSheet: - id - - - copyChecksumFromSheet: - id - - - copyCreateTableSyntax: - id - - - copyCreateTableSyntaxFromSheet: - id - - - copyDatabase: - id - - - export: - id - - - exportSelectedTablesAs: - id - - - flushPrivileges: - id - - - flushTable: - id - - - focusOnTableContentFilter: - id - - - focusOnTableListFilter: - id - - - import: - id - - - importFromClipboard: - id - - - openCurrentConnectionInNewWindow: - id - - - openDatabaseInNewTab: - id - - - optimizeTable: - id - - - refreshTables: - id - - - removeDatabase: - id - - - renameDatabase: - id - - - repairTable: - id - - - saveConnectionSheet: - id - - - saveCreateSyntax: - id - - - setDatabases: - id - - - showConsole: - id - - - showCreateTableSyntax: - id - - - showMySQLHelp: - id - - - showNavigator: - id - - - showServerProcesses: - id - - - showServerVariables: - id - - - showUserManager: - id - - - toggleNavigator: - id - - - updateWindowTitle: - id - - - validateSaveConnectionAccessory: - id - - - - - YES - - YES - addDatabaseButton - chooseDatabaseButton - connectionErrorDialog - contentViewSplitter - copyDatabaseButton - copyDatabaseDataButton - copyDatabaseMessageField - createTableSyntaxTextField - createTableSyntaxTextView - createTableSyntaxWindow - customQueryInstance - customQueryTextView - databaseCopyNameField - databaseCopySheet - databaseDataInstance - databaseEncodingButton - databaseNameField - databaseRenameNameField - databaseRenameSheet - databaseSheet - dbTablesTableView - encodingPopUp - exportControllerInstance - extendedTableInfoInstance - favoritesButton - historyControl - inputTextWindow - inputTextWindowHeader - inputTextWindowMessage - inputTextWindowSecureTextField - listFilterField - parentView - queryProgressBar - renameDatabaseButton - renameDatabaseMessageField - saveConnectionAccessory - saveConnectionAutoConnect - saveConnectionEncrypt - saveConnectionEncryptString - saveConnectionIncludeData - saveConnectionIncludeQuery - saveConnectionSavePassword - saveConnectionSavePasswordAlert - sidebarGrabber - spHistoryControllerInstance - statusTableAccessoryView - statusTableCopyChecksum - statusTableView - statusValues - tableContentInstance - tableDataInstance - tableDumpInstance - tableInfoCollapseButton - tableInfoTable - tableListSplitter - tableRelationsInstance - tableSourceInstance - tableTabView - tableTriggersInstance - tablesListInstance - taskCancelButton - taskCancellationCallbackObject - taskDescriptionText - taskProgressIndicator - taskProgressLayer - titleAccessoryView - titleImageView - titleStringView - - - YES - id - id - NSWindow - NSSplitView - id - id - id - NSTextField - NSTextView - NSWindow - id - NSTextView - id - id - id - id - id - id - id - id - NSTableView - NSPopUpButton - id - id - id - id - id - id - id - id - NSSearchField - NSView - id - id - id - id - id - id - NSSecureTextField - id - id - id - id - id - id - id - id - id - id - id - id - id - NSButton - NSTableView - NSSplitView - id - id - NSTabView - id - id - NSButton - id - id - id - NSBox - id - id - id - - - - YES - - YES - addDatabaseButton - chooseDatabaseButton - connectionErrorDialog - contentViewSplitter - copyDatabaseButton - copyDatabaseDataButton - copyDatabaseMessageField - createTableSyntaxTextField - createTableSyntaxTextView - createTableSyntaxWindow - customQueryInstance - customQueryTextView - databaseCopyNameField - databaseCopySheet - databaseDataInstance - databaseEncodingButton - databaseNameField - databaseRenameNameField - databaseRenameSheet - databaseSheet - dbTablesTableView - encodingPopUp - exportControllerInstance - extendedTableInfoInstance - favoritesButton - historyControl - inputTextWindow - inputTextWindowHeader - inputTextWindowMessage - inputTextWindowSecureTextField - listFilterField - parentView - queryProgressBar - renameDatabaseButton - renameDatabaseMessageField - saveConnectionAccessory - saveConnectionAutoConnect - saveConnectionEncrypt - saveConnectionEncryptString - saveConnectionIncludeData - saveConnectionIncludeQuery - saveConnectionSavePassword - saveConnectionSavePasswordAlert - sidebarGrabber - spHistoryControllerInstance - statusTableAccessoryView - statusTableCopyChecksum - statusTableView - statusValues - tableContentInstance - tableDataInstance - tableDumpInstance - tableInfoCollapseButton - tableInfoTable - tableListSplitter - tableRelationsInstance - tableSourceInstance - tableTabView - tableTriggersInstance - tablesListInstance - taskCancelButton - taskCancellationCallbackObject - taskDescriptionText - taskProgressIndicator - taskProgressLayer - titleAccessoryView - titleImageView - titleStringView - - - YES - - addDatabaseButton - id - - - chooseDatabaseButton - id - - - connectionErrorDialog - NSWindow - - - contentViewSplitter - NSSplitView - - - copyDatabaseButton - id - - - copyDatabaseDataButton - id - - - copyDatabaseMessageField - id - - - createTableSyntaxTextField - NSTextField - - - createTableSyntaxTextView - NSTextView - - - createTableSyntaxWindow - NSWindow - - - customQueryInstance - id - - - customQueryTextView - NSTextView - - - databaseCopyNameField - id - - - databaseCopySheet - id - - - databaseDataInstance - id - - - databaseEncodingButton - id - - - databaseNameField - id - - - databaseRenameNameField - id - - - databaseRenameSheet - id - - - databaseSheet - id - - - dbTablesTableView - NSTableView - - - encodingPopUp - NSPopUpButton - - - exportControllerInstance - id - - - extendedTableInfoInstance - id - - - favoritesButton - id - - - historyControl - id - - - inputTextWindow - id - - - inputTextWindowHeader - id - - - inputTextWindowMessage - id - - - inputTextWindowSecureTextField - id - - - listFilterField - NSSearchField - - - parentView - NSView - - - queryProgressBar - id - - - renameDatabaseButton - id - - - renameDatabaseMessageField - id - - - saveConnectionAccessory - id - - - saveConnectionAutoConnect - id - - - saveConnectionEncrypt - id - - - saveConnectionEncryptString - NSSecureTextField - - - saveConnectionIncludeData - id - - - saveConnectionIncludeQuery - id - - - saveConnectionSavePassword - id - - - saveConnectionSavePasswordAlert - id - - - sidebarGrabber - id - - - spHistoryControllerInstance - id - - - statusTableAccessoryView - id - - - statusTableCopyChecksum - id - - - statusTableView - id - - - statusValues - id - - - tableContentInstance - id - - - tableDataInstance - id - - - tableDumpInstance - id - - - tableInfoCollapseButton - NSButton - - - tableInfoTable - NSTableView - - - tableListSplitter - NSSplitView - - - tableRelationsInstance - id - - - tableSourceInstance - id - - - tableTabView - NSTabView - - - tableTriggersInstance - id - - - tablesListInstance - id - - - taskCancelButton - NSButton - - - taskCancellationCallbackObject - id - - - taskDescriptionText - id - - - taskProgressIndicator - id - - - taskProgressLayer - NSBox - - - titleAccessoryView - id - - - titleImageView - id - - - titleStringView - id - - - - - IBProjectSource - Source/SPDatabaseDocument.h - - - - SPDatabaseDocument - - YES - - YES - viewContent: - viewQuery: - viewRelations: - viewStatus: - viewStructure: - viewTriggers: - - - YES - id - id - id - id - id - id - - - - YES - - YES - viewContent: - viewQuery: - viewRelations: - viewStatus: - viewStructure: - viewTriggers: - - - YES - - viewContent: - id - - - viewQuery: - id - - - viewRelations: - id - - - viewStatus: - id - - - viewStructure: - id - - - viewTriggers: - id - - - - - IBProjectSource - Source/SPDatabaseViewController.h - - - - SPDatabaseDocument - - IBProjectSource - Source/SPPrintController.h - - - - SPHistoryController - NSObject - - historyControlClicked: - NSSegmentedControl - - - historyControlClicked: - - historyControlClicked: - NSSegmentedControl - - - - YES - - YES - historyControl - theDocument - - - YES - NSSegmentedControl - SPDatabaseDocument - - - - YES - - YES - historyControl - theDocument - - - YES - - historyControl - NSSegmentedControl - - - theDocument - SPDatabaseDocument - - - - - IBProjectSource - Source/SPHistoryController.h - - - - SPQueryFavoriteManager - NSWindowController - - YES - - YES - addQueryFavorite: - closeQueryManagerSheet: - duplicateQueryFavorite: - exportFavorites: - importFavoritesByAdding: - importFavoritesByReplacing: - insertPlaceholder: - removeAllQueryFavorites: - removeQueryFavorite: - saveFavoriteToFile: - showHelp: - - - YES - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addQueryFavorite: - closeQueryManagerSheet: - duplicateQueryFavorite: - exportFavorites: - importFavoritesByAdding: - importFavoritesByReplacing: - insertPlaceholder: - removeAllQueryFavorites: - removeQueryFavorite: - saveFavoriteToFile: - showHelp: - - - YES - - addQueryFavorite: - id - - - closeQueryManagerSheet: - id - - - duplicateQueryFavorite: - id - - - exportFavorites: - id - - - importFavoritesByAdding: - id - - - importFavoritesByReplacing: - id - - - insertPlaceholder: - id - - - removeAllQueryFavorites: - id - - - removeQueryFavorite: - id - - - saveFavoriteToFile: - id - - - showHelp: - id - - - - - YES - - YES - encodingPopUp - favoriteNameTextField - favoriteQueryTextView - favoriteTabTriggerTextField - favoritesArrayController - favoritesTableView - removeButton - splitViewButtonBar - - - YES - NSPopUpButton - NSTextField - SPTextView - NSTextField - NSArrayController - NSTableView - NSButton - BWAnchoredButtonBar - - - - YES - - YES - encodingPopUp - favoriteNameTextField - favoriteQueryTextView - favoriteTabTriggerTextField - favoritesArrayController - favoritesTableView - removeButton - splitViewButtonBar - - - YES - - encodingPopUp - NSPopUpButton - - - favoriteNameTextField - NSTextField - - - favoriteQueryTextView - SPTextView - - - favoriteTabTriggerTextField - NSTextField - - - favoritesArrayController - NSArrayController - - - favoritesTableView - NSTableView - - - removeButton - NSButton - - - splitViewButtonBar - BWAnchoredButtonBar - - - - - - - SPTableView - NSTableView - - IBProjectSource - Source/SPTableView.h - - - - SPTablesList - NSObject - - YES - - YES - addTable: - closeSheet: - copyTable: - openTableInNewTab: - removeTable: - renameTable: - togglePaneCollapse: - truncateTable: - updateFilter: - updateTables: - - - YES - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addTable: - closeSheet: - copyTable: - openTableInNewTab: - removeTable: - renameTable: - togglePaneCollapse: - truncateTable: - updateFilter: - updateTables: - - - YES - - addTable: - id - - - closeSheet: - id - - - copyTable: - id - - - openTableInNewTab: - id - - - removeTable: - id - - - renameTable: - id - - - togglePaneCollapse: - id - - - truncateTable: - id - - - updateFilter: - id - - - updateTables: - id - - - - - YES - - YES - addTableButton - copyTableButton - copyTableContentSwitch - copyTableMessageField - copyTableNameField - copyTableSheet - customQueryInstance - databaseDataInstance - duplicateTableContextMenuItem - duplicateTableMenuItem - extendedTableInfoInstance - listFilterField - openTableInNewTabContextMenuItem - openTableInNewTabMenuItem - removeTableContextMenuItem - removeTableMenuItem - renameTableContextMenuItem - renameTableMenuItem - separatorTableContextMenuItem - separatorTableContextMenuItem2 - separatorTableMenuItem - separatorTableMenuItem2 - showCreateSyntaxContextMenuItem - showCreateSyntaxMenuItem - spHistoryControllerInstance - tableContentInstance - tableDataInstance - tableDocumentInstance - tableDumpInstance - tableEncodingButton - tableInfoCollapseButton - tableInfoInstance - tableListFilterSplitView - tableListSplitView - tableNameField - tableSheet - tableSourceInstance - tableTriggersInstance - tableTypeButton - tablesListView - toolbarActionsButton - toolbarAddButton - toolbarReloadButton - truncateTableButton - truncateTableContextMenuItem - - - YES - id - id - id - id - id - id - id - id - NSMenuItem - NSMenuItem - id - NSSearchField - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - NSMenuItem - SPHistoryController - id - id - id - id - id - NSButton - id - NSSplitView - NSSplitView - id - id - id - id - id - id - id - id - id - id - NSMenuItem - - - - YES - - YES - addTableButton - copyTableButton - copyTableContentSwitch - copyTableMessageField - copyTableNameField - copyTableSheet - customQueryInstance - databaseDataInstance - duplicateTableContextMenuItem - duplicateTableMenuItem - extendedTableInfoInstance - listFilterField - openTableInNewTabContextMenuItem - openTableInNewTabMenuItem - removeTableContextMenuItem - removeTableMenuItem - renameTableContextMenuItem - renameTableMenuItem - separatorTableContextMenuItem - separatorTableContextMenuItem2 - separatorTableMenuItem - separatorTableMenuItem2 - showCreateSyntaxContextMenuItem - showCreateSyntaxMenuItem - spHistoryControllerInstance - tableContentInstance - tableDataInstance - tableDocumentInstance - tableDumpInstance - tableEncodingButton - tableInfoCollapseButton - tableInfoInstance - tableListFilterSplitView - tableListSplitView - tableNameField - tableSheet - tableSourceInstance - tableTriggersInstance - tableTypeButton - tablesListView - toolbarActionsButton - toolbarAddButton - toolbarReloadButton - truncateTableButton - truncateTableContextMenuItem - - - YES - - addTableButton - id - - - copyTableButton - id - - - copyTableContentSwitch - id - - - copyTableMessageField - id - - - copyTableNameField - id - - - copyTableSheet - id - - - customQueryInstance - id - - - databaseDataInstance - id - - - duplicateTableContextMenuItem - NSMenuItem - - - duplicateTableMenuItem - NSMenuItem - - - extendedTableInfoInstance - id - - - listFilterField - NSSearchField - - - openTableInNewTabContextMenuItem - NSMenuItem - - - openTableInNewTabMenuItem - NSMenuItem - - - removeTableContextMenuItem - NSMenuItem - - - removeTableMenuItem - NSMenuItem - - - renameTableContextMenuItem - NSMenuItem - - - renameTableMenuItem - NSMenuItem - - - separatorTableContextMenuItem - NSMenuItem - - - separatorTableContextMenuItem2 - NSMenuItem - - - separatorTableMenuItem - NSMenuItem - - - separatorTableMenuItem2 - NSMenuItem - - - showCreateSyntaxContextMenuItem - NSMenuItem - - - showCreateSyntaxMenuItem - NSMenuItem - - - spHistoryControllerInstance - SPHistoryController - - - tableContentInstance - id - - - tableDataInstance - id - - - tableDocumentInstance - id - - - tableDumpInstance - id - - - tableEncodingButton - id - - - tableInfoCollapseButton - NSButton - - - tableInfoInstance - id - - - tableListFilterSplitView - NSSplitView - - - tableListSplitView - NSSplitView - - - tableNameField - id - - - tableSheet - id - - - tableSourceInstance - id - - - tableTriggersInstance - id - - - tableTypeButton - id - - - tablesListView - id - - - toolbarActionsButton - id - - - toolbarAddButton - id - - - toolbarReloadButton - id - - - truncateTableButton - id - - - truncateTableContextMenuItem - NSMenuItem - - - - - - - SPTextView - NSTextView - - showMySQLHelpForCurrentWord: - id - - - showMySQLHelpForCurrentWord: - - showMySQLHelpForCurrentWord: - id - - - - YES - - YES - customQueryInstance - scrollView - tableDocumentInstance - tablesListInstance - - - YES - SPCustomQuery - NSScrollView - SPDatabaseDocument - SPTablesList - - - - YES - - YES - customQueryInstance - scrollView - tableDocumentInstance - tablesListInstance - - - YES - - customQueryInstance - SPCustomQuery - - - scrollView - NSScrollView - - - tableDocumentInstance - SPDatabaseDocument - - - tablesListInstance - SPTablesList - - - - - IBProjectSource - Source/SPTextView.h - - - - SPTextView - NSTextView - - IBUserSource - - - - - - YES - - BWAnchoredButtonBar - NSView - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h - - - - BWAnchoredPopUpButton - NSPopUpButton - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredPopUpButton.h - - - - BWAnchoredPopUpButtonCell - NSPopUpButtonCell - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredPopUpButtonCell.h - - - - BWSplitView - NSSplitView - - toggleCollapse: - id - - - toggleCollapse: - - toggleCollapse: - id - - - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWSplitView.h - - - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSApplication - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h - - - - NSArrayController - NSObjectController - - IBFrameworkSource - AppKit.framework/Headers/NSArrayController.h - - - - NSBox - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSBox.h - - - - NSButton - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSButton.h - - - - NSButtonCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSButtonCell.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSController - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSController.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMenuItemCell - NSButtonCell - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItemCell.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSObject - - IBFrameworkSource - Growl.framework/Headers/GrowlApplicationBridge.h - - - - NSObject - - IBFrameworkSource - Print.framework/Headers/PDEPluginInterface.h - - - - NSObject - - IBFrameworkSource - PrintCore.framework/Headers/PDEPluginInterface.h - - - - NSObject - - IBFrameworkSource - ShortcutRecorder.framework/Headers/SRRecorderCell.h - - - - NSObject - - IBFrameworkSource - ShortcutRecorder.framework/Headers/SRRecorderControl.h - - - - NSObject - - IBFrameworkSource - ShortcutRecorder.framework/Headers/SRValidator.h - - - - NSObject - - IBFrameworkSource - Sparkle.framework/Headers/SUAppcast.h - - - - NSObject - - IBFrameworkSource - Sparkle.framework/Headers/SUUpdater.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebDownload.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebEditingDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebFrameLoadDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebJavaPlugIn.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPlugin.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPluginContainer.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPolicyDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebResourceLoadDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebScriptObject.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebUIDelegate.h - - - - NSObjectController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSObjectController.h - - - - NSPopUpButton - NSButton - - IBFrameworkSource - AppKit.framework/Headers/NSPopUpButton.h - - - - NSPopUpButtonCell - NSMenuItemCell - - IBFrameworkSource - AppKit.framework/Headers/NSPopUpButtonCell.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSScrollView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSScrollView.h - - - - NSScroller - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSScroller.h - - - - NSSearchField - NSTextField - - IBFrameworkSource - AppKit.framework/Headers/NSSearchField.h - - - - NSSearchFieldCell - NSTextFieldCell - - IBFrameworkSource - AppKit.framework/Headers/NSSearchFieldCell.h - - - - NSSecureTextField - NSTextField - - IBFrameworkSource - AppKit.framework/Headers/NSSecureTextField.h - - - - NSSegmentedControl - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSSegmentedControl.h - - - - NSSplitView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSSplitView.h - - - - NSTabView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTabView.h - - - - NSTableColumn - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableColumn.h - - - - NSTableHeaderView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTableHeaderView.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextField - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSTextField.h - - - - NSTextFieldCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSTextFieldCell.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSUserDefaultsController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSUserDefaultsController.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSView - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSView+BWAdditions.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - NSWindow - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h - - - - NSWindowController - NSResponder - - showWindow: - id - - - showWindow: - - showWindow: - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSWindowController.h - - - - WebView - NSView - - YES - - YES - goBack: - goForward: - makeTextLarger: - makeTextSmaller: - makeTextStandardSize: - reload: - reloadFromOrigin: - stopLoading: - takeStringURLFrom: - toggleContinuousSpellChecking: - toggleSmartInsertDelete: - - - YES - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - goBack: - goForward: - makeTextLarger: - makeTextSmaller: - makeTextStandardSize: - reload: - reloadFromOrigin: - stopLoading: - takeStringURLFrom: - toggleContinuousSpellChecking: - toggleSmartInsertDelete: - - - YES - - goBack: - id - - - goForward: - id - - - makeTextLarger: - id - - - makeTextSmaller: - id - - - makeTextStandardSize: - id - - - reload: - id - - - reloadFromOrigin: - id - - - stopLoading: - id - - - takeStringURLFrom: - id - - - toggleContinuousSpellChecking: - id - - - toggleSmartInsertDelete: - id - - - - - IBFrameworkSource - WebKit.framework/Headers/WebView.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../../sequel-pro.xcodeproj - 3 - - YES - - YES - NSActionTemplate - NSMenuCheckmark - NSMenuMixedState - button_add - button_remove - - - YES - {10, 10} - {9, 8} - {7, 2} - {32, 23} - {32, 23} - - - + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 344 + + + + YES + + ImageAndTextCell + NSTextFieldCell + + IBProjectSource + Source/ImageAndTextCell.h + + + + NSApplication + + IBProjectSource + Frameworks/PSMTabBar/PSMTabDragAssistant.h + + + + NSMenu + + IBProjectSource + Source/SPMenuAdditions.h + + + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarCell.h + + + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarControl.h + + + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarController.h + + + + NSObject + + IBProjectSource + Source/SPConnectionController.h + + + + NSObject + + IBProjectSource + Source/SPContentFilterManager.h + + + + NSObject + + IBProjectSource + Source/SPImageView.h + + + + NSObject + + IBProjectSource + Source/SPMainThreadTrampoline.h + + + + NSObject + + IBProjectSource + Source/SPNotLoaded.h + + + + NSObject + + IBProjectSource + Source/SPObjectAdditions.h + + + + NSObject + + IBProjectSource + Source/SPQueryFavoriteManager.h + + + + NSObject + + toggleCollapse: + id + + + toggleCollapse: + + toggleCollapse: + id + + + + IBProjectSource + Source/SPTablesList.h + + + + NSTextView + + YES + + YES + doDecomposedStringWithCanonicalMapping: + doDecomposedStringWithCompatibilityMapping: + doPrecomposedStringWithCanonicalMapping: + doPrecomposedStringWithCompatibilityMapping: + doRemoveDiacritics: + doSelectionLowerCase: + doSelectionTitleCase: + doSelectionUpperCase: + doTranspose: + executeBundleItemForInputField: + insertNULLvalue: + moveSelectionLineDown: + moveSelectionLineUp: + selectCurrentLine: + selectCurrentWord: + selectEnclosingBrackets: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + doDecomposedStringWithCanonicalMapping: + doDecomposedStringWithCompatibilityMapping: + doPrecomposedStringWithCanonicalMapping: + doPrecomposedStringWithCompatibilityMapping: + doRemoveDiacritics: + doSelectionLowerCase: + doSelectionTitleCase: + doSelectionUpperCase: + doTranspose: + executeBundleItemForInputField: + insertNULLvalue: + moveSelectionLineDown: + moveSelectionLineUp: + selectCurrentLine: + selectCurrentWord: + selectEnclosingBrackets: + + + YES + + doDecomposedStringWithCanonicalMapping: + id + + + doDecomposedStringWithCompatibilityMapping: + id + + + doPrecomposedStringWithCanonicalMapping: + id + + + doPrecomposedStringWithCompatibilityMapping: + id + + + doRemoveDiacritics: + id + + + doSelectionLowerCase: + id + + + doSelectionTitleCase: + id + + + doSelectionUpperCase: + id + + + doTranspose: + id + + + executeBundleItemForInputField: + id + + + insertNULLvalue: + id + + + moveSelectionLineDown: + id + + + moveSelectionLineUp: + id + + + selectCurrentLine: + id + + + selectCurrentWord: + id + + + selectEnclosingBrackets: + id + + + + + IBProjectSource + Source/SPTextViewAdditions.h + + + + NSWindow + + IBProjectSource + Source/SPWindowAdditions.h + + + + SPContentFilterManager + NSWindowController + + YES + + YES + addContentFilter: + closeContentFilterManagerSheet: + duplicateContentFilter: + exportContentFilter: + importContentFilterByAdding: + insertPlaceholder: + removeContentFilter: + suppressLeadingFiledPlaceholderWasChanged: + + + YES + id + id + id + id + id + id + id + id + + + + YES + + YES + addContentFilter: + closeContentFilterManagerSheet: + duplicateContentFilter: + exportContentFilter: + importContentFilterByAdding: + insertPlaceholder: + removeContentFilter: + suppressLeadingFiledPlaceholderWasChanged: + + + YES + + addContentFilter: + id + + + closeContentFilterManagerSheet: + id + + + duplicateContentFilter: + id + + + exportContentFilter: + id + + + importContentFilterByAdding: + id + + + insertPlaceholder: + id + + + removeContentFilter: + id + + + suppressLeadingFiledPlaceholderWasChanged: + id + + + + + YES + + YES + contentFilterArrayController + contentFilterConjunctionLabel + contentFilterConjunctionTextField + contentFilterNameTextField + contentFilterTableView + contentFilterTextView + encodingPopUp + insertPlaceholderButton + numberOfArgsLabel + removeButton + resultingClauseContentLabel + resultingClauseLabel + splitViewButtonBar + suppressLeadingFiledPlaceholderCheckbox + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + BWAnchoredButtonBar + id + + + + YES + + YES + contentFilterArrayController + contentFilterConjunctionLabel + contentFilterConjunctionTextField + contentFilterNameTextField + contentFilterTableView + contentFilterTextView + encodingPopUp + insertPlaceholderButton + numberOfArgsLabel + removeButton + resultingClauseContentLabel + resultingClauseLabel + splitViewButtonBar + suppressLeadingFiledPlaceholderCheckbox + + + YES + + contentFilterArrayController + id + + + contentFilterConjunctionLabel + id + + + contentFilterConjunctionTextField + id + + + contentFilterNameTextField + id + + + contentFilterTableView + id + + + contentFilterTextView + id + + + encodingPopUp + id + + + insertPlaceholderButton + id + + + numberOfArgsLabel + id + + + removeButton + id + + + resultingClauseContentLabel + id + + + resultingClauseLabel + id + + + splitViewButtonBar + BWAnchoredButtonBar + + + suppressLeadingFiledPlaceholderCheckbox + id + + + + + + + SPCopyTable + SPTableView + + YES + + YES + copy: + executeBundleItemForDataTable: + + + YES + id + id + + + + YES + + YES + copy: + executeBundleItemForDataTable: + + + YES + + copy: + id + + + executeBundleItemForDataTable: + id + + + + + mySQLConnection + id + + + mySQLConnection + + mySQLConnection + id + + + + IBProjectSource + Source/SPCopyTable.h + + + + SPCopyTable + SPTableView + + IBUserSource + + + + + SPCustomQuery + NSObject + + YES + + YES + chooseQueryFavorite: + chooseQueryHistory: + clearQueryHistory: + closeSheet: + copyQueryHistory: + filterQueryFavorites: + filterQueryHistory: + gearMenuItemSelected: + helpSearchFindNextInPage: + helpSearchFindPreviousInPage: + helpSegmentDispatcher: + helpSelectHelpTargetMySQL: + helpSelectHelpTargetPage: + helpSelectHelpTargetWeb: + helpTargetDispatcher: + runAllQueries: + runSelectedQueries: + saveQueryHistory: + showAutoHelpForCurrentWord: + showCompletionList: + showHelpForCurrentWord: + showHelpForSearchString: + toggleQueryInfoPaneCollapse: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + NSButton + + + + YES + + YES + chooseQueryFavorite: + chooseQueryHistory: + clearQueryHistory: + closeSheet: + copyQueryHistory: + filterQueryFavorites: + filterQueryHistory: + gearMenuItemSelected: + helpSearchFindNextInPage: + helpSearchFindPreviousInPage: + helpSegmentDispatcher: + helpSelectHelpTargetMySQL: + helpSelectHelpTargetPage: + helpSelectHelpTargetWeb: + helpTargetDispatcher: + runAllQueries: + runSelectedQueries: + saveQueryHistory: + showAutoHelpForCurrentWord: + showCompletionList: + showHelpForCurrentWord: + showHelpForSearchString: + toggleQueryInfoPaneCollapse: + + + YES + + chooseQueryFavorite: + id + + + chooseQueryHistory: + id + + + clearQueryHistory: + id + + + closeSheet: + id + + + copyQueryHistory: + id + + + filterQueryFavorites: + id + + + filterQueryHistory: + id + + + gearMenuItemSelected: + id + + + helpSearchFindNextInPage: + id + + + helpSearchFindPreviousInPage: + id + + + helpSegmentDispatcher: + id + + + helpSelectHelpTargetMySQL: + id + + + helpSelectHelpTargetPage: + id + + + helpSelectHelpTargetWeb: + id + + + helpTargetDispatcher: + id + + + runAllQueries: + id + + + runSelectedQueries: + id + + + saveQueryHistory: + id + + + showAutoHelpForCurrentWord: + id + + + showCompletionList: + id + + + showHelpForCurrentWord: + id + + + showHelpForSearchString: + id + + + toggleQueryInfoPaneCollapse: + NSButton + + + + + YES + + YES + affectedRowsText + autohelpMenuItem + autoindentMenuItem + autopairMenuItem + autouppercaseKeywordsMenuItem + clearHistoryMenuItem + commentCurrentQueryMenuItem + commentLineOrSelectionMenuItem + completionListMenuItem + copyHistoryMenuItem + customQueryScrollView + customQueryView + editorFontMenuItem + encodingPopUp + errorText + errorTextScrollView + helpNavigator + helpSearchField + helpSearchFieldCell + helpTargetSelector + helpWebView + helpWebViewWindow + multipleLineEditingButton + nextHistoryMenuItem + previousHistoryMenuItem + queryFavoriteNameTextField + queryFavoritesButton + queryFavoritesSaveAllMenuItem + queryFavoritesSaveAsMenuItem + queryFavoritesSearchField + queryFavoritesSearchFieldView + queryFavoritesSearchMenuItem + queryFavoritesSheet + queryHistoryButton + queryHistorySearchField + queryHistorySearchFieldView + queryHistorySearchMenuItem + queryInfoButton + queryInfoPaneSplitView + runAllButton + runAllMenuItem + runSelectionButton + runSelectionMenuItem + saveHistoryMenuItem + saveQueryFavoriteButton + saveQueryFavoriteGlobal + shiftLeftMenuItem + shiftRightMenuItem + tableDocumentInstance + tablesListInstance + textView + valueSheet + valueTextField + + + YES + id + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSScrollView + SPCopyTable + NSMenuItem + NSPopUpButton + id + NSScrollView + NSSegmentedControl + NSSearchField + NSSearchFieldCell + NSSegmentedControl + WebView + NSWindow + id + NSMenuItem + NSMenuItem + NSTextField + id + NSMenuItem + NSMenuItem + NSSearchField + id + NSMenuItem + NSWindow + id + NSSearchField + id + NSMenuItem + NSButton + NSSplitView + id + NSMenuItem + id + NSMenuItem + NSMenuItem + NSButton + NSButton + NSMenuItem + NSMenuItem + id + id + SPTextView + id + id + + + + YES + + YES + affectedRowsText + autohelpMenuItem + autoindentMenuItem + autopairMenuItem + autouppercaseKeywordsMenuItem + clearHistoryMenuItem + commentCurrentQueryMenuItem + commentLineOrSelectionMenuItem + completionListMenuItem + copyHistoryMenuItem + customQueryScrollView + customQueryView + editorFontMenuItem + encodingPopUp + errorText + errorTextScrollView + helpNavigator + helpSearchField + helpSearchFieldCell + helpTargetSelector + helpWebView + helpWebViewWindow + multipleLineEditingButton + nextHistoryMenuItem + previousHistoryMenuItem + queryFavoriteNameTextField + queryFavoritesButton + queryFavoritesSaveAllMenuItem + queryFavoritesSaveAsMenuItem + queryFavoritesSearchField + queryFavoritesSearchFieldView + queryFavoritesSearchMenuItem + queryFavoritesSheet + queryHistoryButton + queryHistorySearchField + queryHistorySearchFieldView + queryHistorySearchMenuItem + queryInfoButton + queryInfoPaneSplitView + runAllButton + runAllMenuItem + runSelectionButton + runSelectionMenuItem + saveHistoryMenuItem + saveQueryFavoriteButton + saveQueryFavoriteGlobal + shiftLeftMenuItem + shiftRightMenuItem + tableDocumentInstance + tablesListInstance + textView + valueSheet + valueTextField + + + YES + + affectedRowsText + id + + + autohelpMenuItem + NSMenuItem + + + autoindentMenuItem + NSMenuItem + + + autopairMenuItem + NSMenuItem + + + autouppercaseKeywordsMenuItem + NSMenuItem + + + clearHistoryMenuItem + NSMenuItem + + + commentCurrentQueryMenuItem + NSMenuItem + + + commentLineOrSelectionMenuItem + NSMenuItem + + + completionListMenuItem + NSMenuItem + + + copyHistoryMenuItem + NSMenuItem + + + customQueryScrollView + NSScrollView + + + customQueryView + SPCopyTable + + + editorFontMenuItem + NSMenuItem + + + encodingPopUp + NSPopUpButton + + + errorText + id + + + errorTextScrollView + NSScrollView + + + helpNavigator + NSSegmentedControl + + + helpSearchField + NSSearchField + + + helpSearchFieldCell + NSSearchFieldCell + + + helpTargetSelector + NSSegmentedControl + + + helpWebView + WebView + + + helpWebViewWindow + NSWindow + + + multipleLineEditingButton + id + + + nextHistoryMenuItem + NSMenuItem + + + previousHistoryMenuItem + NSMenuItem + + + queryFavoriteNameTextField + NSTextField + + + queryFavoritesButton + id + + + queryFavoritesSaveAllMenuItem + NSMenuItem + + + queryFavoritesSaveAsMenuItem + NSMenuItem + + + queryFavoritesSearchField + NSSearchField + + + queryFavoritesSearchFieldView + id + + + queryFavoritesSearchMenuItem + NSMenuItem + + + queryFavoritesSheet + NSWindow + + + queryHistoryButton + id + + + queryHistorySearchField + NSSearchField + + + queryHistorySearchFieldView + id + + + queryHistorySearchMenuItem + NSMenuItem + + + queryInfoButton + NSButton + + + queryInfoPaneSplitView + NSSplitView + + + runAllButton + id + + + runAllMenuItem + NSMenuItem + + + runSelectionButton + id + + + runSelectionMenuItem + NSMenuItem + + + saveHistoryMenuItem + NSMenuItem + + + saveQueryFavoriteButton + NSButton + + + saveQueryFavoriteGlobal + NSButton + + + shiftLeftMenuItem + NSMenuItem + + + shiftRightMenuItem + NSMenuItem + + + tableDocumentInstance + id + + + tablesListInstance + id + + + textView + SPTextView + + + valueSheet + id + + + valueTextField + id + + + + + IBProjectSource + Source/SPCustomQuery.h + + + + SPCustomQuery + NSObject + + IBUserSource + + + + + SPDatabaseData + NSObject + + IBProjectSource + Source/SPDatabaseData.h + + + + SPDatabaseDocument + + IBProjectSource + Source/SPConnectionDelegate.h + + + + SPDatabaseDocument + NSObject + + YES + + YES + addConnectionToFavorites: + addDatabase: + analyzeTable: + backForwardInHistory: + cancelTask: + checkTable: + checksumTable: + chooseDatabase: + chooseEncoding: + closePanelSheet: + closePasswordSheet: + closeSheet: + copyChecksumFromSheet: + copyCreateTableSyntax: + copyCreateTableSyntaxFromSheet: + copyDatabase: + export: + exportSelectedTablesAs: + flushPrivileges: + flushTable: + focusOnTableContentFilter: + focusOnTableListFilter: + import: + importFromClipboard: + openCurrentConnectionInNewWindow: + openDatabaseInNewTab: + optimizeTable: + refreshTables: + removeDatabase: + renameDatabase: + repairTable: + saveConnectionSheet: + saveCreateSyntax: + setDatabases: + showConsole: + showCreateTableSyntax: + showMySQLHelp: + showNavigator: + showServerProcesses: + showServerVariables: + showUserManager: + toggleNavigator: + updateWindowTitle: + validateSaveConnectionAccessory: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addConnectionToFavorites: + addDatabase: + analyzeTable: + backForwardInHistory: + cancelTask: + checkTable: + checksumTable: + chooseDatabase: + chooseEncoding: + closePanelSheet: + closePasswordSheet: + closeSheet: + copyChecksumFromSheet: + copyCreateTableSyntax: + copyCreateTableSyntaxFromSheet: + copyDatabase: + export: + exportSelectedTablesAs: + flushPrivileges: + flushTable: + focusOnTableContentFilter: + focusOnTableListFilter: + import: + importFromClipboard: + openCurrentConnectionInNewWindow: + openDatabaseInNewTab: + optimizeTable: + refreshTables: + removeDatabase: + renameDatabase: + repairTable: + saveConnectionSheet: + saveCreateSyntax: + setDatabases: + showConsole: + showCreateTableSyntax: + showMySQLHelp: + showNavigator: + showServerProcesses: + showServerVariables: + showUserManager: + toggleNavigator: + updateWindowTitle: + validateSaveConnectionAccessory: + + + YES + + addConnectionToFavorites: + id + + + addDatabase: + id + + + analyzeTable: + id + + + backForwardInHistory: + id + + + cancelTask: + id + + + checkTable: + id + + + checksumTable: + id + + + chooseDatabase: + id + + + chooseEncoding: + id + + + closePanelSheet: + id + + + closePasswordSheet: + id + + + closeSheet: + id + + + copyChecksumFromSheet: + id + + + copyCreateTableSyntax: + id + + + copyCreateTableSyntaxFromSheet: + id + + + copyDatabase: + id + + + export: + id + + + exportSelectedTablesAs: + id + + + flushPrivileges: + id + + + flushTable: + id + + + focusOnTableContentFilter: + id + + + focusOnTableListFilter: + id + + + import: + id + + + importFromClipboard: + id + + + openCurrentConnectionInNewWindow: + id + + + openDatabaseInNewTab: + id + + + optimizeTable: + id + + + refreshTables: + id + + + removeDatabase: + id + + + renameDatabase: + id + + + repairTable: + id + + + saveConnectionSheet: + id + + + saveCreateSyntax: + id + + + setDatabases: + id + + + showConsole: + id + + + showCreateTableSyntax: + id + + + showMySQLHelp: + id + + + showNavigator: + id + + + showServerProcesses: + id + + + showServerVariables: + id + + + showUserManager: + id + + + toggleNavigator: + id + + + updateWindowTitle: + id + + + validateSaveConnectionAccessory: + id + + + + + YES + + YES + addDatabaseButton + chooseDatabaseButton + connectionErrorDialog + contentViewSplitter + copyDatabaseButton + copyDatabaseDataButton + copyDatabaseMessageField + createTableSyntaxTextField + createTableSyntaxTextView + createTableSyntaxWindow + customQueryInstance + customQueryTextView + databaseCopyNameField + databaseCopySheet + databaseDataInstance + databaseEncodingButton + databaseNameField + databaseRenameNameField + databaseRenameSheet + databaseSheet + dbTablesTableView + delegate + documentActivityScrollView + encodingPopUp + exportControllerInstance + extendedTableInfoInstance + favoritesButton + historyControl + inputTextWindow + inputTextWindowHeader + inputTextWindowMessage + inputTextWindowSecureTextField + listFilterField + parentView + queryProgressBar + renameDatabaseButton + renameDatabaseMessageField + saveConnectionAccessory + saveConnectionAutoConnect + saveConnectionEncrypt + saveConnectionEncryptString + saveConnectionIncludeData + saveConnectionIncludeQuery + saveConnectionSavePassword + saveConnectionSavePasswordAlert + sidebarGrabber + spHistoryControllerInstance + statusTableAccessoryView + statusTableCopyChecksum + statusTableView + tableContentInstance + tableDataInstance + tableDumpInstance + tableInfoCollapseButton + tableInfoScrollView + tableInfoTable + tableListSplitter + tableRelationsInstance + tableSourceInstance + tableTabView + tableTriggersInstance + tablesListInstance + taskCancelButton + taskCancellationCallbackObject + taskDescriptionText + taskProgressIndicator + taskProgressLayer + titleAccessoryView + titleImageView + titleStringView + + + YES + id + id + NSWindow + NSSplitView + id + NSButton + id + NSTextField + NSTextView + NSWindow + id + NSTextView + id + id + id + id + id + id + id + id + NSTableView + id + NSScrollView + NSPopUpButton + id + id + id + id + id + id + id + id + NSSearchField + NSView + NSProgressIndicator + id + id + id + NSButton + NSButton + NSSecureTextField + NSButton + NSButton + NSButton + id + id + id + id + id + id + SPTableContent + SPTableData + id + NSButton + NSScrollView + NSTableView + NSSplitView + id + SPTableStructure + NSTabView + id + SPTablesList + NSButton + id + id + id + NSBox + id + id + id + + + + YES + + YES + addDatabaseButton + chooseDatabaseButton + connectionErrorDialog + contentViewSplitter + copyDatabaseButton + copyDatabaseDataButton + copyDatabaseMessageField + createTableSyntaxTextField + createTableSyntaxTextView + createTableSyntaxWindow + customQueryInstance + customQueryTextView + databaseCopyNameField + databaseCopySheet + databaseDataInstance + databaseEncodingButton + databaseNameField + databaseRenameNameField + databaseRenameSheet + databaseSheet + dbTablesTableView + delegate + documentActivityScrollView + encodingPopUp + exportControllerInstance + extendedTableInfoInstance + favoritesButton + historyControl + inputTextWindow + inputTextWindowHeader + inputTextWindowMessage + inputTextWindowSecureTextField + listFilterField + parentView + queryProgressBar + renameDatabaseButton + renameDatabaseMessageField + saveConnectionAccessory + saveConnectionAutoConnect + saveConnectionEncrypt + saveConnectionEncryptString + saveConnectionIncludeData + saveConnectionIncludeQuery + saveConnectionSavePassword + saveConnectionSavePasswordAlert + sidebarGrabber + spHistoryControllerInstance + statusTableAccessoryView + statusTableCopyChecksum + statusTableView + tableContentInstance + tableDataInstance + tableDumpInstance + tableInfoCollapseButton + tableInfoScrollView + tableInfoTable + tableListSplitter + tableRelationsInstance + tableSourceInstance + tableTabView + tableTriggersInstance + tablesListInstance + taskCancelButton + taskCancellationCallbackObject + taskDescriptionText + taskProgressIndicator + taskProgressLayer + titleAccessoryView + titleImageView + titleStringView + + + YES + + addDatabaseButton + id + + + chooseDatabaseButton + id + + + connectionErrorDialog + NSWindow + + + contentViewSplitter + NSSplitView + + + copyDatabaseButton + id + + + copyDatabaseDataButton + NSButton + + + copyDatabaseMessageField + id + + + createTableSyntaxTextField + NSTextField + + + createTableSyntaxTextView + NSTextView + + + createTableSyntaxWindow + NSWindow + + + customQueryInstance + id + + + customQueryTextView + NSTextView + + + databaseCopyNameField + id + + + databaseCopySheet + id + + + databaseDataInstance + id + + + databaseEncodingButton + id + + + databaseNameField + id + + + databaseRenameNameField + id + + + databaseRenameSheet + id + + + databaseSheet + id + + + dbTablesTableView + NSTableView + + + delegate + id + + + documentActivityScrollView + NSScrollView + + + encodingPopUp + NSPopUpButton + + + exportControllerInstance + id + + + extendedTableInfoInstance + id + + + favoritesButton + id + + + historyControl + id + + + inputTextWindow + id + + + inputTextWindowHeader + id + + + inputTextWindowMessage + id + + + inputTextWindowSecureTextField + id + + + listFilterField + NSSearchField + + + parentView + NSView + + + queryProgressBar + NSProgressIndicator + + + renameDatabaseButton + id + + + renameDatabaseMessageField + id + + + saveConnectionAccessory + id + + + saveConnectionAutoConnect + NSButton + + + saveConnectionEncrypt + NSButton + + + saveConnectionEncryptString + NSSecureTextField + + + saveConnectionIncludeData + NSButton + + + saveConnectionIncludeQuery + NSButton + + + saveConnectionSavePassword + NSButton + + + saveConnectionSavePasswordAlert + id + + + sidebarGrabber + id + + + spHistoryControllerInstance + id + + + statusTableAccessoryView + id + + + statusTableCopyChecksum + id + + + statusTableView + id + + + tableContentInstance + SPTableContent + + + tableDataInstance + SPTableData + + + tableDumpInstance + id + + + tableInfoCollapseButton + NSButton + + + tableInfoScrollView + NSScrollView + + + tableInfoTable + NSTableView + + + tableListSplitter + NSSplitView + + + tableRelationsInstance + id + + + tableSourceInstance + SPTableStructure + + + tableTabView + NSTabView + + + tableTriggersInstance + id + + + tablesListInstance + SPTablesList + + + taskCancelButton + NSButton + + + taskCancellationCallbackObject + id + + + taskDescriptionText + id + + + taskProgressIndicator + id + + + taskProgressLayer + NSBox + + + titleAccessoryView + id + + + titleImageView + id + + + titleStringView + id + + + + + IBProjectSource + Source/SPDatabaseDocument.h + + + + SPDatabaseDocument + + YES + + YES + viewContent: + viewQuery: + viewRelations: + viewStatus: + viewStructure: + viewTriggers: + + + YES + id + id + id + id + id + id + + + + YES + + YES + viewContent: + viewQuery: + viewRelations: + viewStatus: + viewStructure: + viewTriggers: + + + YES + + viewContent: + id + + + viewQuery: + id + + + viewRelations: + id + + + viewStatus: + id + + + viewStructure: + id + + + viewTriggers: + id + + + + + IBProjectSource + Source/SPDatabaseViewController.h + + + + SPDatabaseDocument + + IBProjectSource + Source/SPPrintController.h + + + + SPHistoryController + NSObject + + historyControlClicked: + NSSegmentedControl + + + historyControlClicked: + + historyControlClicked: + NSSegmentedControl + + + + YES + + YES + historyControl + theDocument + + + YES + NSSegmentedControl + SPDatabaseDocument + + + + YES + + YES + historyControl + theDocument + + + YES + + historyControl + NSSegmentedControl + + + theDocument + SPDatabaseDocument + + + + + IBProjectSource + Source/SPHistoryController.h + + + + SPIndexesController + NSWindowController + + YES + + YES + addIndex: + addIndexedField: + chooseIndexType: + closeSheet: + removeIndex: + removeIndexedField: + toggleAdvancedIndexOptionsView: + + + YES + id + id + id + id + id + id + id + + + + YES + + YES + addIndex: + addIndexedField: + chooseIndexType: + closeSheet: + removeIndex: + removeIndexedField: + toggleAdvancedIndexOptionsView: + + + YES + + addIndex: + id + + + addIndexedField: + id + + + chooseIndexType: + id + + + closeSheet: + id + + + removeIndex: + id + + + removeIndexedField: + id + + + toggleAdvancedIndexOptionsView: + id + + + + + YES + + YES + addIndexButton + addIndexedColumnButton + anchoredButtonBar + confirmAddIndexButton + dbDocument + indexAdvancedOptionsView + indexAdvancedOptionsViewButton + indexAdvancedOptionsViewLabelButton + indexKeyBlockSizeTextField + indexNameLabel + indexNameTextField + indexSizeTableColumn + indexStorageTypePopUpButton + indexTypeLabel + indexTypePopUpButton + indexedColumnsScrollView + indexedColumnsTableView + indexesTableView + removeIndexButton + removeIndexedColumnButton + tableData + tableStructure + tablesList + + + YES + NSButton + NSButton + BWAnchoredButtonBar + NSButton + SPDatabaseDocument + NSView + NSButton + NSButton + NSTextField + NSTextField + NSTextField + NSTableColumn + NSPopUpButton + NSTextField + NSPopUpButton + NSScrollView + NSTableView + SPTableView + NSButton + NSButton + SPTableData + SPTableStructure + SPTablesList + + + + YES + + YES + addIndexButton + addIndexedColumnButton + anchoredButtonBar + confirmAddIndexButton + dbDocument + indexAdvancedOptionsView + indexAdvancedOptionsViewButton + indexAdvancedOptionsViewLabelButton + indexKeyBlockSizeTextField + indexNameLabel + indexNameTextField + indexSizeTableColumn + indexStorageTypePopUpButton + indexTypeLabel + indexTypePopUpButton + indexedColumnsScrollView + indexedColumnsTableView + indexesTableView + removeIndexButton + removeIndexedColumnButton + tableData + tableStructure + tablesList + + + YES + + addIndexButton + NSButton + + + addIndexedColumnButton + NSButton + + + anchoredButtonBar + BWAnchoredButtonBar + + + confirmAddIndexButton + NSButton + + + dbDocument + SPDatabaseDocument + + + indexAdvancedOptionsView + NSView + + + indexAdvancedOptionsViewButton + NSButton + + + indexAdvancedOptionsViewLabelButton + NSButton + + + indexKeyBlockSizeTextField + NSTextField + + + indexNameLabel + NSTextField + + + indexNameTextField + NSTextField + + + indexSizeTableColumn + NSTableColumn + + + indexStorageTypePopUpButton + NSPopUpButton + + + indexTypeLabel + NSTextField + + + indexTypePopUpButton + NSPopUpButton + + + indexedColumnsScrollView + NSScrollView + + + indexedColumnsTableView + NSTableView + + + indexesTableView + SPTableView + + + removeIndexButton + NSButton + + + removeIndexedColumnButton + NSButton + + + tableData + SPTableData + + + tableStructure + SPTableStructure + + + tablesList + SPTablesList + + + + + IBProjectSource + Source/SPIndexesController.h + + + + SPQueryFavoriteManager + NSWindowController + + YES + + YES + addQueryFavorite: + closeQueryManagerSheet: + duplicateQueryFavorite: + exportFavorites: + importFavoritesByAdding: + importFavoritesByReplacing: + insertPlaceholder: + removeAllQueryFavorites: + removeQueryFavorite: + saveFavoriteToFile: + showHelp: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addQueryFavorite: + closeQueryManagerSheet: + duplicateQueryFavorite: + exportFavorites: + importFavoritesByAdding: + importFavoritesByReplacing: + insertPlaceholder: + removeAllQueryFavorites: + removeQueryFavorite: + saveFavoriteToFile: + showHelp: + + + YES + + addQueryFavorite: + id + + + closeQueryManagerSheet: + id + + + duplicateQueryFavorite: + id + + + exportFavorites: + id + + + importFavoritesByAdding: + id + + + importFavoritesByReplacing: + id + + + insertPlaceholder: + id + + + removeAllQueryFavorites: + id + + + removeQueryFavorite: + id + + + saveFavoriteToFile: + id + + + showHelp: + id + + + + + YES + + YES + encodingPopUp + favoriteNameTextField + favoriteQueryTextView + favoriteTabTriggerTextField + favoritesArrayController + favoritesTableView + removeButton + splitViewButtonBar + + + YES + NSPopUpButton + NSTextField + SPTextView + NSTextField + NSArrayController + NSTableView + NSButton + BWAnchoredButtonBar + + + + YES + + YES + encodingPopUp + favoriteNameTextField + favoriteQueryTextView + favoriteTabTriggerTextField + favoritesArrayController + favoritesTableView + removeButton + splitViewButtonBar + + + YES + + encodingPopUp + NSPopUpButton + + + favoriteNameTextField + NSTextField + + + favoriteQueryTextView + SPTextView + + + favoriteTabTriggerTextField + NSTextField + + + favoritesArrayController + NSArrayController + + + favoritesTableView + NSTableView + + + removeButton + NSButton + + + splitViewButtonBar + BWAnchoredButtonBar + + + + + + + SPTableContent + NSObject + + YES + + YES + addRow: + closeSheet: + duplicateRow: + filterTable: + navigatePaginationFromButton: + reloadTable: + removeRow: + setCompareTypes: + setDefaultOperator: + showDefaultOperaterHelp: + showFilterTable: + swapFilterTable: + tableFilterClear: + toggleDistinctSelect: + toggleFilterField: + toggleLookAllFieldsMode: + toggleNegateClause: + togglePagination: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + NSButton + + + + YES + + YES + addRow: + closeSheet: + duplicateRow: + filterTable: + navigatePaginationFromButton: + reloadTable: + removeRow: + setCompareTypes: + setDefaultOperator: + showDefaultOperaterHelp: + showFilterTable: + swapFilterTable: + tableFilterClear: + toggleDistinctSelect: + toggleFilterField: + toggleLookAllFieldsMode: + toggleNegateClause: + togglePagination: + + + YES + + addRow: + id + + + closeSheet: + id + + + duplicateRow: + id + + + filterTable: + id + + + navigatePaginationFromButton: + id + + + reloadTable: + id + + + removeRow: + id + + + setCompareTypes: + id + + + setDefaultOperator: + id + + + showDefaultOperaterHelp: + id + + + showFilterTable: + id + + + swapFilterTable: + id + + + tableFilterClear: + id + + + toggleDistinctSelect: + id + + + toggleFilterField: + id + + + toggleLookAllFieldsMode: + id + + + toggleNegateClause: + id + + + togglePagination: + NSButton + + + + + YES + + YES + addButton + argumentField + betweenTextField + compareField + contentViewPane + countText + duplicateButton + fieldField + filterButton + filterTableClearButton + filterTableDistinctMenuItem + filterTableFilterButton + filterTableGearLookAllFields + filterTableLiveSearchCheckbox + filterTableNegateCheckbox + filterTableSetDefaultOperatorSheet + filterTableSetDefaultOperatorValue + filterTableView + filterTableWhereClause + filterTableWindow + firstBetweenField + limitRowsButton + limitRowsField + limitRowsStepper + multipleLineEditingButton + paginationButton + paginationNextButton + paginationPageField + paginationPageStepper + paginationPreviousButton + paginationView + reloadButton + removeButton + secondBetweenField + spHistoryControllerInstance + tableContentView + tableDataInstance + tableDocumentInstance + tableInfoInstance + tableSourceInstance + tablesListInstance + + + YES + id + id + id + id + NSView + id + id + NSPopUpButton + id + NSButton + NSMenuItem + NSButton + NSMenuItem + NSButton + NSButton + NSPanel + NSComboBox + SPCopyTable + SPTextView + NSPanel + id + id + id + id + NSButton + NSButton + NSButton + NSTextField + NSStepper + NSButton + NSView + id + id + id + SPHistoryController + SPCopyTable + SPTableData + SPDatabaseDocument + SPTableInfo + id + id + + + + YES + + YES + addButton + argumentField + betweenTextField + compareField + contentViewPane + countText + duplicateButton + fieldField + filterButton + filterTableClearButton + filterTableDistinctMenuItem + filterTableFilterButton + filterTableGearLookAllFields + filterTableLiveSearchCheckbox + filterTableNegateCheckbox + filterTableSetDefaultOperatorSheet + filterTableSetDefaultOperatorValue + filterTableView + filterTableWhereClause + filterTableWindow + firstBetweenField + limitRowsButton + limitRowsField + limitRowsStepper + multipleLineEditingButton + paginationButton + paginationNextButton + paginationPageField + paginationPageStepper + paginationPreviousButton + paginationView + reloadButton + removeButton + secondBetweenField + spHistoryControllerInstance + tableContentView + tableDataInstance + tableDocumentInstance + tableInfoInstance + tableSourceInstance + tablesListInstance + + + YES + + addButton + id + + + argumentField + id + + + betweenTextField + id + + + compareField + id + + + contentViewPane + NSView + + + countText + id + + + duplicateButton + id + + + fieldField + NSPopUpButton + + + filterButton + id + + + filterTableClearButton + NSButton + + + filterTableDistinctMenuItem + NSMenuItem + + + filterTableFilterButton + NSButton + + + filterTableGearLookAllFields + NSMenuItem + + + filterTableLiveSearchCheckbox + NSButton + + + filterTableNegateCheckbox + NSButton + + + filterTableSetDefaultOperatorSheet + NSPanel + + + filterTableSetDefaultOperatorValue + NSComboBox + + + filterTableView + SPCopyTable + + + filterTableWhereClause + SPTextView + + + filterTableWindow + NSPanel + + + firstBetweenField + id + + + limitRowsButton + id + + + limitRowsField + id + + + limitRowsStepper + id + + + multipleLineEditingButton + NSButton + + + paginationButton + NSButton + + + paginationNextButton + NSButton + + + paginationPageField + NSTextField + + + paginationPageStepper + NSStepper + + + paginationPreviousButton + NSButton + + + paginationView + NSView + + + reloadButton + id + + + removeButton + id + + + secondBetweenField + id + + + spHistoryControllerInstance + SPHistoryController + + + tableContentView + SPCopyTable + + + tableDataInstance + SPTableData + + + tableDocumentInstance + SPDatabaseDocument + + + tableInfoInstance + SPTableInfo + + + tableSourceInstance + id + + + tablesListInstance + id + + + + + IBProjectSource + Source/SPTableContent.h + + + + SPTableContent + + IBProjectSource + Source/SPTableContentDataSource.h + + + + SPTableContent + + IBProjectSource + Source/SPTableContentDelegate.h + + + + SPTableData + NSObject + + YES + + YES + tableDocumentInstance + tableListInstance + + + YES + SPDatabaseDocument + SPTablesList + + + + YES + + YES + tableDocumentInstance + tableListInstance + + + YES + + tableDocumentInstance + SPDatabaseDocument + + + tableListInstance + SPTablesList + + + + + IBProjectSource + Source/SPTableData.h + + + + SPTableInfo + NSObject + + YES + + YES + activitiesTable + containerView + infoTable + tableDataInstance + tableDocumentInstance + tableInfoScrollView + tableList + tableListInstance + + + YES + NSTableView + NSView + id + id + id + NSScrollView + id + id + + + + YES + + YES + activitiesTable + containerView + infoTable + tableDataInstance + tableDocumentInstance + tableInfoScrollView + tableList + tableListInstance + + + YES + + activitiesTable + NSTableView + + + containerView + NSView + + + infoTable + id + + + tableDataInstance + id + + + tableDocumentInstance + id + + + tableInfoScrollView + NSScrollView + + + tableList + id + + + tableListInstance + id + + + + + IBProjectSource + Source/SPTableInfo.h + + + + SPTableStructure + NSObject + + YES + + YES + addField: + closeSheet: + duplicateField: + reloadTable: + removeField: + resetAutoIncrement: + showOptimizedFieldType: + toggleColumnView: + unhideIndexesView: + + + YES + id + id + id + id + id + id + id + NSMenuItem + id + + + + YES + + YES + addField: + closeSheet: + duplicateField: + reloadTable: + removeField: + resetAutoIncrement: + showOptimizedFieldType: + toggleColumnView: + unhideIndexesView: + + + YES + + addField: + id + + + closeSheet: + id + + + duplicateField: + id + + + reloadTable: + id + + + removeField: + id + + + resetAutoIncrement: + id + + + showOptimizedFieldType: + id + + + toggleColumnView: + NSMenuItem + + + unhideIndexesView: + id + + + + + YES + + YES + addFieldButton + addIndexButton + chooseKeyButton + databaseDataInstance + duplicateFieldButton + editTableButton + encodingPopupCell + extendedTableInfoInstance + indexesController + indexesShowButton + indexesTableView + keySheet + refreshIndexesButton + reloadFieldsButton + removeFieldButton + removeIndexButton + resetAutoIncrementLine + resetAutoIncrementSheet + resetAutoIncrementValue + structureGrabber + tableDataInstance + tableDocumentInstance + tableInfoInstance + tableSourceView + tablesIndexesSplitView + tablesListInstance + viewColumnsMenu + + + YES + id + id + id + SPDatabaseData + id + id + NSPopUpButtonCell + id + SPIndexesController + NSButton + SPTableView + id + id + id + id + id + id + id + id + id + SPTableData + SPDatabaseDocument + id + SPTableView + NSSplitView + SPTablesList + id + + + + YES + + YES + addFieldButton + addIndexButton + chooseKeyButton + databaseDataInstance + duplicateFieldButton + editTableButton + encodingPopupCell + extendedTableInfoInstance + indexesController + indexesShowButton + indexesTableView + keySheet + refreshIndexesButton + reloadFieldsButton + removeFieldButton + removeIndexButton + resetAutoIncrementLine + resetAutoIncrementSheet + resetAutoIncrementValue + structureGrabber + tableDataInstance + tableDocumentInstance + tableInfoInstance + tableSourceView + tablesIndexesSplitView + tablesListInstance + viewColumnsMenu + + + YES + + addFieldButton + id + + + addIndexButton + id + + + chooseKeyButton + id + + + databaseDataInstance + SPDatabaseData + + + duplicateFieldButton + id + + + editTableButton + id + + + encodingPopupCell + NSPopUpButtonCell + + + extendedTableInfoInstance + id + + + indexesController + SPIndexesController + + + indexesShowButton + NSButton + + + indexesTableView + SPTableView + + + keySheet + id + + + refreshIndexesButton + id + + + reloadFieldsButton + id + + + removeFieldButton + id + + + removeIndexButton + id + + + resetAutoIncrementLine + id + + + resetAutoIncrementSheet + id + + + resetAutoIncrementValue + id + + + structureGrabber + id + + + tableDataInstance + SPTableData + + + tableDocumentInstance + SPDatabaseDocument + + + tableInfoInstance + id + + + tableSourceView + SPTableView + + + tablesIndexesSplitView + NSSplitView + + + tablesListInstance + SPTablesList + + + viewColumnsMenu + id + + + + + IBProjectSource + Source/SPTableStructure.h + + + + SPTableStructure + + IBProjectSource + Source/SPTableStructureDelegate.h + + + + SPTableView + NSTableView + + IBProjectSource + Source/SPTableView.h + + + + SPTablesList + NSObject + + YES + + YES + addTable: + closeSheet: + copyTable: + openTableInNewTab: + removeTable: + renameTable: + togglePaneCollapse: + truncateTable: + updateFilter: + updateTables: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addTable: + closeSheet: + copyTable: + openTableInNewTab: + removeTable: + renameTable: + togglePaneCollapse: + truncateTable: + updateFilter: + updateTables: + + + YES + + addTable: + id + + + closeSheet: + id + + + copyTable: + id + + + openTableInNewTab: + id + + + removeTable: + id + + + renameTable: + id + + + togglePaneCollapse: + id + + + truncateTable: + id + + + updateFilter: + id + + + updateTables: + id + + + + + YES + + YES + addTableButton + copyCreateSyntaxContextMenuItem + copyCreateSyntaxMenuItem + copyTableButton + copyTableContentSwitch + copyTableMessageField + copyTableNameField + copyTableSheet + customQueryInstance + databaseDataInstance + duplicateTableContextMenuItem + duplicateTableMenuItem + extendedTableInfoInstance + listFilterField + openTableInNewTabContextMenuItem + openTableInNewTabMenuItem + removeTableContextMenuItem + removeTableMenuItem + renameTableContextMenuItem + renameTableMenuItem + separatorTableContextMenuItem + separatorTableContextMenuItem2 + separatorTableContextMenuItem3 + separatorTableMenuItem + separatorTableMenuItem2 + separatorTableMenuItem3 + showCreateSyntaxContextMenuItem + showCreateSyntaxMenuItem + spHistoryControllerInstance + tableContentInstance + tableDataInstance + tableDocumentInstance + tableDumpInstance + tableEncodingButton + tableInfoCollapseButton + tableInfoInstance + tableListFilterSplitView + tableListSplitView + tableNameField + tableSheet + tableSourceInstance + tableTriggersInstance + tableTypeButton + tablesListView + toolbarActionsButton + toolbarAddButton + toolbarDeleteButton + toolbarReloadButton + truncateTableButton + truncateTableContextMenuItem + + + YES + id + NSMenuItem + NSMenuItem + id + NSButton + id + id + id + id + SPDatabaseData + NSMenuItem + NSMenuItem + id + NSSearchField + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + NSMenuItem + SPHistoryController + SPTableContent + id + SPDatabaseDocument + id + id + NSButton + id + NSSplitView + NSSplitView + id + id + SPTableStructure + id + id + SPTableView + id + id + id + id + id + NSMenuItem + + + + YES + + YES + addTableButton + copyCreateSyntaxContextMenuItem + copyCreateSyntaxMenuItem + copyTableButton + copyTableContentSwitch + copyTableMessageField + copyTableNameField + copyTableSheet + customQueryInstance + databaseDataInstance + duplicateTableContextMenuItem + duplicateTableMenuItem + extendedTableInfoInstance + listFilterField + openTableInNewTabContextMenuItem + openTableInNewTabMenuItem + removeTableContextMenuItem + removeTableMenuItem + renameTableContextMenuItem + renameTableMenuItem + separatorTableContextMenuItem + separatorTableContextMenuItem2 + separatorTableContextMenuItem3 + separatorTableMenuItem + separatorTableMenuItem2 + separatorTableMenuItem3 + showCreateSyntaxContextMenuItem + showCreateSyntaxMenuItem + spHistoryControllerInstance + tableContentInstance + tableDataInstance + tableDocumentInstance + tableDumpInstance + tableEncodingButton + tableInfoCollapseButton + tableInfoInstance + tableListFilterSplitView + tableListSplitView + tableNameField + tableSheet + tableSourceInstance + tableTriggersInstance + tableTypeButton + tablesListView + toolbarActionsButton + toolbarAddButton + toolbarDeleteButton + toolbarReloadButton + truncateTableButton + truncateTableContextMenuItem + + + YES + + addTableButton + id + + + copyCreateSyntaxContextMenuItem + NSMenuItem + + + copyCreateSyntaxMenuItem + NSMenuItem + + + copyTableButton + id + + + copyTableContentSwitch + NSButton + + + copyTableMessageField + id + + + copyTableNameField + id + + + copyTableSheet + id + + + customQueryInstance + id + + + databaseDataInstance + SPDatabaseData + + + duplicateTableContextMenuItem + NSMenuItem + + + duplicateTableMenuItem + NSMenuItem + + + extendedTableInfoInstance + id + + + listFilterField + NSSearchField + + + openTableInNewTabContextMenuItem + NSMenuItem + + + openTableInNewTabMenuItem + NSMenuItem + + + removeTableContextMenuItem + NSMenuItem + + + removeTableMenuItem + NSMenuItem + + + renameTableContextMenuItem + NSMenuItem + + + renameTableMenuItem + NSMenuItem + + + separatorTableContextMenuItem + NSMenuItem + + + separatorTableContextMenuItem2 + NSMenuItem + + + separatorTableContextMenuItem3 + NSMenuItem + + + separatorTableMenuItem + NSMenuItem + + + separatorTableMenuItem2 + NSMenuItem + + + separatorTableMenuItem3 + NSMenuItem + + + showCreateSyntaxContextMenuItem + NSMenuItem + + + showCreateSyntaxMenuItem + NSMenuItem + + + spHistoryControllerInstance + SPHistoryController + + + tableContentInstance + SPTableContent + + + tableDataInstance + id + + + tableDocumentInstance + SPDatabaseDocument + + + tableDumpInstance + id + + + tableEncodingButton + id + + + tableInfoCollapseButton + NSButton + + + tableInfoInstance + id + + + tableListFilterSplitView + NSSplitView + + + tableListSplitView + NSSplitView + + + tableNameField + id + + + tableSheet + id + + + tableSourceInstance + SPTableStructure + + + tableTriggersInstance + id + + + tableTypeButton + id + + + tablesListView + SPTableView + + + toolbarActionsButton + id + + + toolbarAddButton + id + + + toolbarDeleteButton + id + + + toolbarReloadButton + id + + + truncateTableButton + id + + + truncateTableContextMenuItem + NSMenuItem + + + + + + + SPTextView + NSTextView + + showMySQLHelpForCurrentWord: + id + + + showMySQLHelpForCurrentWord: + + showMySQLHelpForCurrentWord: + id + + + + YES + + YES + customQueryInstance + scrollView + tableDocumentInstance + tablesListInstance + + + YES + SPCustomQuery + NSScrollView + SPDatabaseDocument + SPTablesList + + + + YES + + YES + customQueryInstance + scrollView + tableDocumentInstance + tablesListInstance + + + YES + + customQueryInstance + SPCustomQuery + + + scrollView + NSScrollView + + + tableDocumentInstance + SPDatabaseDocument + + + tablesListInstance + SPTablesList + + + + + IBProjectSource + Source/SPTextView.h + + + + SPTextView + NSTextView + + IBUserSource + + + + + + YES + + BWAnchoredButtonBar + NSView + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h + + + + BWAnchoredPopUpButton + NSPopUpButton + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredPopUpButton.h + + + + BWAnchoredPopUpButtonCell + NSPopUpButtonCell + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredPopUpButtonCell.h + + + + BWSplitView + NSSplitView + + toggleCollapse: + id + + + toggleCollapse: + + toggleCollapse: + id + + + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWSplitView.h + + + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSApplication + + IBFrameworkSource + BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h + + + + NSArrayController + NSObjectController + + IBFrameworkSource + AppKit.framework/Headers/NSArrayController.h + + + + NSBox + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSBox.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSComboBox + NSTextField + + IBFrameworkSource + AppKit.framework/Headers/NSComboBox.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSController + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSController.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMenuItemCell + NSButtonCell + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItemCell.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + Growl.framework/Headers/GrowlApplicationBridge.h + + + + NSObject + + IBFrameworkSource + Print.framework/Headers/PDEPluginInterface.h + + + + NSObject + + IBFrameworkSource + PrintCore.framework/Headers/PDEPluginInterface.h + + + + NSObject + + IBFrameworkSource + ShortcutRecorder.framework/Headers/SRRecorderCell.h + + + + NSObject + + IBFrameworkSource + ShortcutRecorder.framework/Headers/SRRecorderControl.h + + + + NSObject + + IBFrameworkSource + ShortcutRecorder.framework/Headers/SRValidator.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUAppcast.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUUpdater.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSObjectController + NSController + + IBFrameworkSource + AppKit.framework/Headers/NSObjectController.h + + + + NSPanel + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSPanel.h + + + + NSPopUpButton + NSButton + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButton.h + + + + NSPopUpButtonCell + NSMenuItemCell + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButtonCell.h + + + + NSProgressIndicator + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSProgressIndicator.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSScrollView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSScrollView.h + + + + NSScroller + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSScroller.h + + + + NSSearchField + NSTextField + + IBFrameworkSource + AppKit.framework/Headers/NSSearchField.h + + + + NSSearchFieldCell + NSTextFieldCell + + IBFrameworkSource + AppKit.framework/Headers/NSSearchFieldCell.h + + + + NSSecureTextField + NSTextField + + IBFrameworkSource + AppKit.framework/Headers/NSSecureTextField.h + + + + NSSegmentedControl + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSSegmentedControl.h + + + + NSSplitView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSSplitView.h + + + + NSStepper + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSStepper.h + + + + NSTabView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSTabView.h + + + + NSTableColumn + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableColumn.h + + + + NSTableHeaderView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSTableHeaderView.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSTextView + NSText + + IBFrameworkSource + AppKit.framework/Headers/NSTextView.h + + + + NSUserDefaultsController + NSController + + IBFrameworkSource + AppKit.framework/Headers/NSUserDefaultsController.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSView + + IBFrameworkSource + BWToolkitFramework.framework/Headers/NSView+BWAdditions.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + NSWindow + + IBFrameworkSource + BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h + + + + NSWindowController + NSResponder + + showWindow: + id + + + showWindow: + + showWindow: + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSWindowController.h + + + + WebView + NSView + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + goBack: + goForward: + makeTextLarger: + makeTextSmaller: + makeTextStandardSize: + reload: + reloadFromOrigin: + stopLoading: + takeStringURLFrom: + toggleContinuousSpellChecking: + toggleSmartInsertDelete: + + + YES + + goBack: + id + + + goForward: + id + + + makeTextLarger: + id + + + makeTextSmaller: + id + + + makeTextStandardSize: + id + + + reload: + id + + + reloadFromOrigin: + id + + + stopLoading: + id + + + takeStringURLFrom: + id + + + toggleContinuousSpellChecking: + id + + + toggleSmartInsertDelete: + id + + + + + IBFrameworkSource + WebKit.framework/Headers/WebView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../../sequel-pro.xcodeproj + 3 + + YES + + YES + NSActionTemplate + NSMenuCheckmark + NSMenuMixedState + button_add + button_remove + + + YES + {10, 10} + {11, 11} + {10, 3} + {32, 23} + {32, 23} + + + diff --git a/Interfaces/English.lproj/UserManagerView.xib b/Interfaces/English.lproj/UserManagerView.xib index 90af4b12..34aae3dc 100644 --- a/Interfaces/English.lproj/UserManagerView.xib +++ b/Interfaces/English.lproj/UserManagerView.xib @@ -1,7603 +1,7655 @@ - - 1050 - 11D50b - 851 - 1138.32 - 568.00 - - YES - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit - - - YES - 851 - 1.2.5 - - - - YES - - - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit - - - YES - - YES - - - YES - - - - YES - - SPUserManager - - - FirstResponder - - - NSApplication - - - 1 - 2 - {{459, 282}, {815, 506}} - 1140851712 - User Managment - NSWindow - - - {1.7976931348623157e+308, 1.7976931348623157e+308} - {752, 506} - - - 256 - - YES - - - 274 - - YES - - - 256 - - YES - - - 274 - - YES - - - 2304 - - YES - - - 4352 - {177, 467} - - YES - - - 256 - {177, 17} - - - - - - -2147483392 - {{183, 0}, {12, 17}} - - - YES - - NameColumn - 174 - 16 - 1000 - - 75628096 - 2048 - Accounts - - LucidaGrande - 11 - 3088 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337772096 - 2304 - Text Cell - - LucidaGrande - 13 - 1040 - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - displayName - YES - compare: - - - - 3 - 0.0 - - 6 - System - _sourceListBackgroundColor - - 6 - System - alternateSelectedControlColor - - 1 - MCAwIDEAA - - - - - 6 - System - gridColor - - 3 - MC41AA - - - 20 - 1379926016 - - - 4 - 15 - 0 - YES - 1 - 1 - 1 - 14 - - - {{0, 17}, {177, 467}} - - - - - 4 - - - - -2147483392 - {{183, 17}, {11, 456}} - - 256 - - _doScroller: - 0.96487605571746826 - - - - -2147483392 - {{0, 473}, {183, 11}} - - 257 - - _doScroller: - 0.99487179517745972 - - - - 2304 - - YES - - - {177, 17} - - - - - 4 - - - {{0, 22}, {177, 484}} - - - 133680 - - - - - QSAAAEEgAABBoAAAQaAAAA - - - - 290 - - YES - - - 292 - {{-1, -1}, {32, 24}} - - YES - - 67239424 - 134348800 - - - - -2033434369 - 163 - - NSImage - NSAddTemplate - - - - 200 - 25 - - - - - 292 - {{30, -1}, {32, 24}} - - YES - - 67239424 - 134348800 - - - - -2033434369 - 163 - - NSImage - NSRemoveTemplate - - - - 200 - 25 - - - - - 292 - {{61, -1}, {32, 24}} - - YES - - -2076049856 - 134350848 - - - -2038284033 - 163 - - - 400 - 75 - - - YES - - - 1048576 - 2147483647 - - NSImage - NSActionTemplate - - - NSImage - NSMenuCheckmark - - - NSImage - NSMenuMixedState - - _popUpItemAction: - - - YES - - OtherViews - - YES - - - - Add Host - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - Remove Host - - 1048576 - 2147483647 - - - _popUpItemAction: - - - - - YES - YES - - - 2147483647 - - - _popUpItemAction: - - - - - Refresh - - 2147483647 - - - _popUpItemAction: - - - - - YES - 1 - YES - YES - 2 - - - - {177, 23} - - YES - YES - NO - 0 - - - {177, 506} - - NSView - - - - 256 - - YES - - - 274 - {{13, 40}, {611, 460}} - - - YES - - General - - - 256 - - YES - - - 47 - - YES - - - 274 - - YES - - - 268 - {{3, 46}, {134, 17}} - - YES - - 68288064 - 71304192 - Username: - - - - 6 - System - controlColor - - - - - - - - 268 - {{3, 16}, {134, 17}} - - YES - - 68288064 - 71304192 - Password: - - - - - - - - - 266 - {{142, 44}, {204, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - 6 - System - textBackgroundColor - - 3 - MQA - - - - 6 - System - textColor - - - - - - - 266 - {{142, 14}, {204, 22}} - - YES - - 343014976 - 272630784 - - - - YES - - - - YES - NSAllRomanInputSourcesLocaleIdentifier - - - - - {{1, 1}, {364, 76}} - - - - {{112, 175}, {366, 92}} - - {0, 0} - - 67239424 - 0 - Login Information - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - {{10, 33}, {591, 414}} - - General - - - - - Global Privileges - - - 288 - - YES - - - 269 - - YES - - - 10 - - YES - - - 274 - - YES - - - 268 - {{16, 32}, {221, 18}} - - YES - - 67239424 - 0 - Replication Client - - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - - - - - 268 - {{16, 12}, {221, 18}} - - YES - - 67239424 - 0 - Replication Slave - - - 1211912703 - 2 - - - - - 200 - 25 - - - - {{1, 1}, {253, 58}} - - - - {{17, 75}, {255, 74}} - - {0, 0} - - 67239424 - 0 - Replication - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - - 10 - - YES - - - 274 - - YES - - - 268 - {{16, 192}, {124, 18}} - - YES - - 67239424 - 0 - Reload - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 172}, {259, 18}} - - YES - - 67239424 - 0 - Shutdown - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 152}, {259, 18}} - - YES - - 67239424 - 0 - File - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 132}, {259, 18}} - - YES - - 67239424 - 0 - Process - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 112}, {259, 18}} - - YES - - 67239424 - 0 - Super - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 92}, {259, 18}} - - YES - - 67239424 - 0 - Create Temp Table - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 72}, {259, 18}} - - YES - - 67239424 - 0 - Lock Tables - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 52}, {259, 18}} - - YES - - 67239424 - 0 - Show Databases - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 32}, {259, 18}} - - YES - - 67239424 - 0 - Create User - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 12}, {259, 18}} - - YES - - 67239424 - 0 - Grant - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{144, 192}, {131, 18}} - - YES - - 67239424 - 0 - Event - - - 1211912703 - 2 - - - - - 200 - 25 - - - - {{1, 1}, {291, 218}} - - - - {{273, 15}, {293, 234}} - - {0, 0} - - 67239424 - 0 - Administration - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - - 289 - {{65, 44}, {157, 32}} - - YES - - 67239424 - 134217728 - Check All - - - -2038284033 - 129 - - - 200 - 25 - - - - - 10 - - YES - - - 274 - - YES - - - 268 - {{16, 192}, {220, 18}} - - YES - - 67239424 - 0 - Select - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 172}, {220, 18}} - - YES - - 67239424 - 0 - Insert - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 152}, {220, 18}} - - YES - - 67239424 - 0 - Update - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 132}, {220, 18}} - - YES - - 67239424 - 0 - Delete - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 112}, {220, 18}} - - YES - - 67239424 - 0 - References - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 92}, {220, 18}} - - YES - - 67239424 - 0 - Create - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 72}, {220, 18}} - - YES - - 67239424 - 0 - Drop - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 52}, {220, 18}} - - YES - - 67239424 - 0 - Alter - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 32}, {220, 18}} - - YES - - 67239424 - 0 - Index - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 12}, {220, 18}} - - YES - - 67239424 - 0 - Trigger - - - 1211912703 - 2 - - - - - 200 - 25 - - - - {{1, 1}, {252, 218}} - - - - {{17, 153}, {254, 234}} - - {0, 0} - - 67239424 - 0 - Database and Tables - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - - 289 - {{66, 12}, {157, 32}} - - YES - - 67239424 - 134217728 - Uncheck All - - - -2038284033 - 129 - - - 200 - 25 - - - - - 10 - - YES - - - 274 - - YES - - - 268 - {{16, 92}, {259, 18}} - - YES - - 67239424 - 0 - Create View - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 72}, {259, 18}} - - YES - - 67239424 - 0 - Show View - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 52}, {259, 18}} - - YES - - 67239424 - 0 - Create Routine - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 32}, {259, 18}} - - YES - - 67239424 - 0 - Alter Routine - - - 1211912703 - 2 - - - - - 200 - 25 - - - - - 268 - {{16, 12}, {259, 18}} - - YES - - 67239424 - 0 - Execute - - - 1211912703 - 2 - - - - - 200 - 25 - - - - {{1, 1}, {291, 118}} - - - - {{273, 253}, {293, 134}} - - {0, 0} - - 67239424 - 0 - Views and Procedures - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - {{8, 12}, {574, 399}} - - NSView - - - {{10, 33}, {591, 414}} - - Global Privileges - - - - - Schema Privileges - - - 256 - - YES - - - 268 - - YES - - - 2304 - - YES - - - 256 - {163, 363} - - YES - - - 256 - {163, 17} - - - - - - -2147483392 - {{110, 0}, {12, 17}} - - - YES - - Schemas - 160 - 40 - 1000 - - 75628096 - 2048 - Schemas - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 337772096 - 133120 - Text Cell - - - - - - 1 - YES - - - - 3 - 2 - - - 14 - -700448768 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {163, 363}} - - - - - 4 - - - - -2147483392 - {{110, 17}, {11, 352}} - - 256 - - _doScroller: - 37 - 0.1947367936372757 - - - - -2147483392 - {{1, 369}, {109, 11}} - - 257 - - _doScroller: - 0.57142859697341919 - - - - 2304 - - YES - - - {{1, 0}, {163, 17}} - - - - - 4 - - - {{17, 17}, {165, 381}} - - - 133682 - - - - - QSAAAEEgAABBgAAAQYAAAA - - - - 268 - - YES - - - 2304 - - YES - - - 256 - {163, 363} - - YES - - - 256 - {163, 17} - - - - - - -2147483392 - {{110, 0}, {12, 17}} - - - YES - - Granted Privilege - 160 - 40 - 1000 - - 75628096 - 2048 - Granted Privileges - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 337772096 - 133120 - Text Cell - - - - - - 1 - YES - - - - 3 - 2 - - - 14 - 1581252608 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {163, 363}} - - - - - 4 - - - - -2147483392 - {{110, 17}, {11, 352}} - - 256 - - _doScroller: - 0.96969699859619141 - - - - -2147483392 - {{1, 369}, {109, 11}} - - 257 - - _doScroller: - 0.99236643314361572 - - - - 2304 - - YES - - - {{1, 0}, {163, 17}} - - - - - 4 - - - {{190, 17}, {165, 381}} - - - 133682 - - - - - QSAAAEEgAABBgAAAQYAAAA - - - - 268 - - YES - - - 2304 - - YES - - - 256 - {163, 363} - - - - 256 - {163, 17} - - - - - - -2147483392 - {{110, 0}, {12, 17}} - - - YES - - Available Privilige - 160 - 40 - 1000 - - 612499008 - 2048 - Available Privileges - - - 3 - MC4zMzMzMzI5ODU2AA - - - - - 874643008 - 133120 - Text Cell - - - - - - 1 - YES - - - - 3 - 2 - - - 14 - 1581252608 - - - 4 - 15 - 0 - YES - 0 - 1 - - - {{1, 17}, {163, 363}} - - - - - 4 - - - - -2147483392 - {{110, 17}, {11, 352}} - - 256 - - _doScroller: - 0.96969699859619141 - - - - -2147483392 - {{1, 369}, {109, 11}} - - 257 - - _doScroller: - 0.99280577898025513 - - - - 2304 - - YES - - - {{1, 0}, {163, 17}} - - - - - 4 - - - {{409, 17}, {165, 381}} - - - 133682 - - - - - QSAAAEEgAABBgAAAQYAAAA - - - - 268 - {{363, 206}, {31, 32}} - - YES - - 604110336 - 134217728 - - - - -2030288641 - 34 - - NSImage - NSLeftFacingTriangleTemplate - - - - 400 - 75 - - - - - 268 - {{363, 177}, {31, 32}} - - YES - - 604110336 - 134217728 - - - - -2030288641 - 34 - - NSImage - NSRightFacingTriangleTemplate - - - - 400 - 75 - - - - {{10, 33}, {591, 414}} - - - Schema Privileges - - - - - Resources - - - 256 - - YES - - - 303 - - YES - - - 274 - - YES - - - 268 - {{15, 84}, {164, 17}} - - YES - - 68288064 - 71304192 - Max Updates: - - - - - - - - - 268 - {{15, 49}, {164, 17}} - - YES - - 68288064 - 71304192 - Max Connections: - - - - - - - - - 268 - {{15, 17}, {164, 17}} - - YES - - 68288064 - 71304192 - Max Questions: - - - - - - - - - 268 - {{184, 81}, {149, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - YES - allowsFloats - formatterBehavior - lenient - negativeInfinitySymbol - nilSymbol - numberStyle - positiveInfinitySymbol - - - YES - - - - -∞ - - - +∞ - - - # - # - - - - - - - - NaN - - YES - - - YES - - - - - 0 - 0 - YES - NO - 1 - AAAAAAAAAAAAAAAAAAAAAA - - - - 3 - YES - YES - YES - - . - , - NO - YES - NO - - - YES - - - - - - - 268 - {{184, 46}, {149, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - YES - allowsFloats - formatterBehavior - lenient - negativeInfinitySymbol - nilSymbol - numberStyle - positiveInfinitySymbol - - - YES - - - - -∞ - - - +∞ - - - # - # - - - - - - - - NaN - - - - - - 3 - YES - YES - YES - - . - , - NO - YES - NO - - - YES - - - - - - - 268 - {{184, 14}, {149, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - YES - allowsFloats - formatterBehavior - lenient - negativeInfinitySymbol - nilSymbol - numberStyle - positiveInfinitySymbol - - - YES - - - - -∞ - - - +∞ - - - # - # - - - - - - - - NaN - - - - - - 3 - YES - YES - YES - - . - , - NO - YES - NO - - - YES - - - - - - {{1, 1}, {351, 113}} - - - - {{119, 140}, {353, 129}} - - {0, 0} - - 67239424 - 0 - Resource Limits - - - - 3 - MCAwLjgwMDAwMDAxMTkAA - - - - 1 - 0 - 2 - NO - - - {{10, 33}, {591, 414}} - - Resources - - - - - - - 0 - YES - - YES - - - - - - 289 - {{476, 12}, {147, 32}} - - YES - - -2080244224 - 134217728 - Apply - - - -2038021889 - 129 - - - DQ - 400 - 75 - - - - - 289 - {{329, 12}, {147, 32}} - - YES - - -2080244224 - 134217728 - Cancel - - - -2038021889 - 129 - - - Gw - 400 - 75 - - - - {{178, 0}, {637, 506}} - - NSView - - - {815, 506} - - YES - 2 - - - {815, 506} - - - {{0, 0}, {1680, 1028}} - {752, 528} - {1.7976931348623157e+308, 1.7976931348623157e+308} - YES - - - - YES - username - children - host - itemTitle - password - globalPrivileges - globalPrivileges.Select_priv - globalPrivileges.Insert_priv - globalPrivileges.Update_priv - globalPrivileges.Delete_priv - globalPrivileges.Create_priv - globalPrivileges.Drop_priv - globalPrivileges.Reload_priv - globalPrivileges.Shutdown_priv - globalPrivileges.Process_priv - globalPrivileges.File_priv - globalPrivileges.Grant_priv - globalPrivileges.References_priv - globalPrivileges.Index_priv - globalPrivileges.Alter_priv - globalPrivileges.Show_db_priv - globalPrivileges.Super_priv - globalPrivileges.Create_tmp_table_priv - globalPrivileges.Lock_tables_priv - globalPrivileges.Execute_priv - globalPrivileges.Repl_slav_priv - globalPrivileges.Repl_client_priv - globalPrivileges.Create_view_priv - globalPrivileges.Show_view_priv - globalPrivileges.Create_routine_priv - globalPrivileges.Alter_routine_priv - globalPrivileges.Create_user_priv - globalPrivileges.Event_pri - user - content - contents - hosts.Select_priv - hosts.Insert_priv - displayName - create_priv - delete_priv - drop_priv - insert_priv - reload_priv - select_priv - update_priv - maxUserConnections - maxConnections - maxQuestions - max_user_connections - max_connections - max_questions - references_priv - alter_priv - index_priv - create_view_priv - show_view_priv - create_routine_priv - alter_routine_priv - execute_priv - shutdown_priv - file_priv - process_priv - super_priv - create_temporary_table_priv - lock_table_priv - lock_tables_priv - show_databases_priv - create_user_priv - grant_option_priv - replication_client_priv - replication_slave_priv - parent - create_temporary_tables_priv - select_priv.optional - insert_priv.optional - insert_priv.isOptional - select_priv.isOptional - trigger_priv - event_priv - name - max_updates - - SPUserItem - YES - YES - - SPUser - - - 3 - valueForKey: - - 1 - - - YES - - 10 - parent - - - - - 0 - - - - 4 - 0 - NO - 0 - - - - YES - YES - YES - YES - children - - - NSMutableDictionary - - - NSString - YES - YES - - YES - YES - YES - - - - YES - displayName - - YES - - YES - YES - YES - - - - YES - displayName - - YES - YES - - Privileges - - YES - YES - YES - - - - - YES - - - Remove User - - 2147483647 - - - - - - Remove Host - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Refresh - - 2147483647 - - - - - - - 9 - 2 - {{157, 20}, {480, 441}} - 1954022400 - Errors Sheet - NSWindow - - - {1.7976931348623157e+308, 1.7976931348623157e+308} - - - 256 - - YES - - - 268 - {{17, 327}, {446, 94}} - - YES - - 67239424 - 272891904 - RXJyb3JzIG9jY3VycmVkIHdoZW4gYXBwbHlpbmcgeW91ciBjaGFuZ2VzIHRvIHRoZSBzZXJ2ZXIuCgpT + + 1050 + 10K549 + 851 + 1038.36 + 461.00 + + YES + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.brandonwalkin.BWToolkit + + + YES + 851 + 1.2.5 + + + + YES + + + + YES + com.brandonwalkin.BWToolkit + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + SPUserManager + + + FirstResponder + + + NSApplication + + + 1 + 2 + {{459, 282}, {815, 506}} + 1140851712 + User Managment + NSWindow + + {3.40282e+38, 3.40282e+38} + {752, 506} + + + 256 + + YES + + + 274 + + YES + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 4352 + {177, 467} + + + YES + + + 256 + {177, 17} + + + + + + + -2147483392 + {{183, 0}, {12, 17}} + + + + + YES + + NameColumn + 174 + 16 + 1000 + + 75628096 + 2048 + Accounts + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2304 + Text Cell + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2ODY1AA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + displayName + YES + compare: + + + + 3 + 0.0 + + 6 + System + _sourceListBackgroundColor + + 1 + MC44MzkyMTU2OTU5IDAuODY2NjY2Njc0NiAwLjg5ODAzOTIyMTgAA + + + + 6 + System + gridColor + + 3 + MC41AA + + + 20 + 1379926016 + + + 4 + 15 + 0 + YES + 1 + 1 + 14 + + + {{0, 17}, {177, 467}} + + + + + + 4 + + + + -2147483392 + {{183, 17}, {11, 456}} + + + 256 + + _doScroller: + 0.96487605571746826 + + + + -2147483392 + {{0, 473}, {183, 11}} + + + 257 + + _doScroller: + 0.99487179517745972 + + + + 2304 + + YES + + + {177, 17} + + + + + + 4 + + + + {{0, 22}, {177, 484}} + + + + 560 + + + + + + QSAAAEEgAABBoAAAQaAAAA + + + + 290 + + YES + + + 292 + {{-1, -1}, {32, 24}} + + + YES + + 67239424 + 134348800 + + + + -2033434369 + 163 + + NSImage + NSAddTemplate + + + + 200 + 25 + + + + + 292 + {{30, -1}, {32, 24}} + + + YES + + 67239424 + 134348800 + + + + -2033434369 + 163 + + NSImage + NSRemoveTemplate + + + + 200 + 25 + + + + + 292 + {{61, -1}, {32, 24}} + + + YES + + -2076049856 + 134350848 + + + -2038284033 + 163 + + + 400 + 75 + + + YES + + + 1048576 + 2147483647 + + NSImage + NSActionTemplate + + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Add Host + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Remove Host + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + Refresh + + 2147483647 + + + _popUpItemAction: + + + + + YES + 1 + YES + YES + 2 + + + + {177, 23} + + + YES + YES + NO + 0 + + + {177, 506} + + + NSView + + + + 256 + + YES + + + 274 + {{13, 40}, {611, 460}} + + + + YES + + General + + + 256 + + YES + + + 47 + + YES + + + 274 + + YES + + + 268 + {{3, 46}, {134, 17}} + + YES + + 68288064 + 71304192 + Username: + + + + 6 + System + controlColor + + + + + + + + 268 + {{3, 16}, {134, 17}} + + YES + + 68288064 + 71304192 + Password: + + + + + + + + + 266 + {{142, 44}, {204, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 266 + {{142, 14}, {204, 22}} + + YES + + 343014976 + 272630784 + + + + YES + + + + YES + NSAllRomanInputSourcesLocaleIdentifier + + + + + {{1, 1}, {364, 76}} + + + + {{112, 175}, {366, 92}} + + {0, 0} + + 67239424 + 0 + Login Information + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + {{10, 33}, {591, 414}} + + General + + + + + Global Privileges + + + 288 + + YES + + + 269 + + YES + + + 10 + + YES + + + 274 + + YES + + + 268 + {{16, 32}, {221, 18}} + + YES + + 67239424 + 0 + Replication Client + + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 268 + {{16, 12}, {221, 18}} + + YES + + 67239424 + 0 + Replication Slave + + + 1211912703 + 2 + + + + + 200 + 25 + + + + {{1, 1}, {253, 58}} + + + + {{17, 75}, {255, 74}} + + {0, 0} + + 67239424 + 0 + Replication + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + + 10 + + YES + + + 274 + + YES + + + 268 + {{16, 192}, {124, 18}} + + YES + + 67239424 + 0 + Reload + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 172}, {259, 18}} + + YES + + 67239424 + 0 + Shutdown + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 152}, {259, 18}} + + YES + + 67239424 + 0 + File + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 132}, {259, 18}} + + YES + + 67239424 + 0 + Process + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 112}, {259, 18}} + + YES + + 67239424 + 0 + Super + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 92}, {259, 18}} + + YES + + 67239424 + 0 + Create Temp Table + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 72}, {259, 18}} + + YES + + 67239424 + 0 + Lock Tables + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 52}, {259, 18}} + + YES + + 67239424 + 0 + Show Databases + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 32}, {259, 18}} + + YES + + 67239424 + 0 + Create User + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 12}, {259, 18}} + + YES + + 67239424 + 0 + Grant + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{144, 192}, {131, 18}} + + YES + + 67239424 + 0 + Event + + + 1211912703 + 2 + + + + + 200 + 25 + + + + {{1, 1}, {291, 218}} + + + + {{273, 15}, {293, 234}} + + {0, 0} + + 67239424 + 0 + Administration + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + + 289 + {{65, 44}, {157, 32}} + + YES + + 67239424 + 134217728 + Check All + + + -2038284033 + 129 + + + 200 + 25 + + + + + 10 + + YES + + + 274 + + YES + + + 268 + {{16, 192}, {220, 18}} + + YES + + 67239424 + 0 + Select + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 172}, {220, 18}} + + YES + + 67239424 + 0 + Insert + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 152}, {220, 18}} + + YES + + 67239424 + 0 + Update + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 132}, {220, 18}} + + YES + + 67239424 + 0 + Delete + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 112}, {220, 18}} + + YES + + 67239424 + 0 + References + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 92}, {220, 18}} + + YES + + 67239424 + 0 + Create + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 72}, {220, 18}} + + YES + + 67239424 + 0 + Drop + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 52}, {220, 18}} + + YES + + 67239424 + 0 + Alter + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 32}, {220, 18}} + + YES + + 67239424 + 0 + Index + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 12}, {220, 18}} + + YES + + 67239424 + 0 + Trigger + + + 1211912703 + 2 + + + + + 200 + 25 + + + + {{1, 1}, {252, 218}} + + + + {{17, 153}, {254, 234}} + + {0, 0} + + 67239424 + 0 + Database and Tables + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + + 289 + {{66, 12}, {157, 32}} + + YES + + 67239424 + 134217728 + Uncheck All + + + -2038284033 + 129 + + + 200 + 25 + + + + + 10 + + YES + + + 274 + + YES + + + 268 + {{16, 92}, {259, 18}} + + YES + + 67239424 + 0 + Create View + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 72}, {259, 18}} + + YES + + 67239424 + 0 + Show View + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 52}, {259, 18}} + + YES + + 67239424 + 0 + Create Routine + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 32}, {259, 18}} + + YES + + 67239424 + 0 + Alter Routine + + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + {{16, 12}, {259, 18}} + + YES + + 67239424 + 0 + Execute + + + 1211912703 + 2 + + + + + 200 + 25 + + + + {{1, 1}, {291, 118}} + + + + {{273, 253}, {293, 134}} + + {0, 0} + + 67239424 + 0 + Views and Procedures + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + {{8, 12}, {574, 399}} + + NSView + + + {{10, 33}, {591, 414}} + + Global Privileges + + + + + Schema Privileges + + + 256 + + YES + + + 268 + + YES + + + 2304 + + YES + + + 256 + {163, 363} + + + YES + + + 256 + {163, 17} + + + + + + + -2147483392 + {{110, 0}, {12, 17}} + + + + + YES + + Schemas + 160 + 40 + 1000 + + 75628096 + 2048 + Schemas + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 337772096 + 133120 + Text Cell + + + + + + 1 + YES + + + + 3 + 2 + + + 14 + -700448768 + + + 4 + 15 + 0 + YES + 0 + + + {{1, 17}, {163, 363}} + + + + + + 4 + + + + -2147483392 + {{110, 17}, {11, 352}} + + + 256 + + _doScroller: + 37 + 0.1947367936372757 + + + + -2147483392 + {{1, 369}, {109, 11}} + + + 257 + + _doScroller: + 0.57142859697341919 + + + + 2304 + + YES + + + {{1, 0}, {163, 17}} + + + + + + 4 + + + + {{17, 17}, {165, 381}} + + + + 562 + + + + + + QSAAAEEgAABBgAAAQYAAAA + + + + 268 + + YES + + + 2304 + + YES + + + 256 + {163, 363} + + + YES + + + 256 + {163, 17} + + + + + + + -2147483392 + {{110, 0}, {12, 17}} + + + + + YES + + Granted Privilege + 160 + 40 + 1000 + + 75628096 + 2048 + Granted Privileges + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 337772096 + 133120 + Text Cell + + + + + + 1 + YES + + + + 3 + 2 + + + 14 + 1581252608 + + + 4 + 15 + 0 + YES + 0 + + + {{1, 17}, {163, 363}} + + + + + + 4 + + + + -2147483392 + {{110, 17}, {11, 352}} + + + 256 + + _doScroller: + 0.96969699859619141 + + + + -2147483392 + {{1, 369}, {109, 11}} + + + 257 + + _doScroller: + 0.99236643314361572 + + + + 2304 + + YES + + + {{1, 0}, {163, 17}} + + + + + + 4 + + + + {{190, 17}, {165, 381}} + + + + 562 + + + + + + QSAAAEEgAABBgAAAQYAAAA + + + + 268 + + YES + + + 2304 + + YES + + + 256 + {163, 363} + + + + + 256 + {163, 17} + + + + + + + -2147483392 + {{110, 0}, {12, 17}} + + + + + YES + + Available Privilige + 160 + 40 + 1000 + + 612499008 + 2048 + Available Privileges + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 874643008 + 133120 + Text Cell + + + + + + 1 + YES + + + + 3 + 2 + + + 14 + 1581252608 + + + 4 + 15 + 0 + YES + 0 + + + {{1, 17}, {163, 363}} + + + + + + 4 + + + + -2147483392 + {{110, 17}, {11, 352}} + + + 256 + + _doScroller: + 0.96969699859619141 + + + + -2147483392 + {{1, 369}, {109, 11}} + + + 257 + + _doScroller: + 0.99280577898025513 + + + + 2304 + + YES + + + {{1, 0}, {163, 17}} + + + + + + 4 + + + + {{409, 17}, {165, 381}} + + + + 562 + + + + + + QSAAAEEgAABBgAAAQYAAAA + + + + 268 + {{363, 206}, {31, 32}} + + + YES + + 604110336 + 134217728 + + + + -2030288641 + 34 + + NSImage + NSLeftFacingTriangleTemplate + + + + 400 + 75 + + + + + 268 + {{363, 177}, {31, 32}} + + + YES + + 604110336 + 134217728 + + + + -2030288641 + 34 + + NSImage + NSRightFacingTriangleTemplate + + + + 400 + 75 + + + + {{10, 33}, {591, 414}} + + + + Schema Privileges + + + + + Resources + + + 256 + + YES + + + 303 + + YES + + + 274 + + YES + + + 268 + {{15, 84}, {164, 17}} + + YES + + 68288064 + 71304192 + Max Updates: + + + + + + + + + 268 + {{15, 49}, {164, 17}} + + YES + + 68288064 + 71304192 + Max Connections: + + + + + + + + + 268 + {{15, 17}, {164, 17}} + + YES + + 68288064 + 71304192 + Max Questions: + + + + + + + + + 268 + {{184, 81}, {149, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + YES + allowsFloats + formatterBehavior + lenient + negativeInfinitySymbol + nilSymbol + numberStyle + positiveInfinitySymbol + + + YES + + + + -∞ + + + +∞ + + + # + # + + + + + + + + NaN + + YES + + + YES + + + + + 0 + 0 + YES + NO + 1 + AAAAAAAAAAAAAAAAAAAAAA + + + + 3 + YES + YES + YES + + . + , + NO + YES + NO + + + YES + + + + + + + 268 + {{184, 46}, {149, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + YES + allowsFloats + formatterBehavior + lenient + negativeInfinitySymbol + nilSymbol + numberStyle + positiveInfinitySymbol + + + YES + + + + -∞ + + + +∞ + + + # + # + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + NO + YES + NO + + + YES + + + + + + + 268 + {{184, 14}, {149, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + YES + allowsFloats + formatterBehavior + lenient + negativeInfinitySymbol + nilSymbol + numberStyle + positiveInfinitySymbol + + + YES + + + + -∞ + + + +∞ + + + # + # + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + NO + YES + NO + + + YES + + + + + + {{1, 1}, {351, 113}} + + + + {{119, 140}, {353, 129}} + + {0, 0} + + 67239424 + 0 + Resource Limits + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + {{10, 33}, {591, 414}} + + Resources + + + + + + + 0 + YES + + YES + + + + + + 289 + {{476, 12}, {147, 32}} + + + YES + + -2080244224 + 134217728 + Apply + + + -2038021889 + 129 + + + DQ + 400 + 75 + + + + + 289 + {{329, 12}, {147, 32}} + + + YES + + -2080244224 + 134217728 + Cancel + + + -2038021889 + 129 + + + Gw + 400 + 75 + + + + {{178, 0}, {637, 506}} + + + NSView + + + {815, 506} + + + YES + 2 + + + {815, 506} + + + + {{0, 0}, {1680, 1028}} + {752, 528} + {3.40282e+38, 3.40282e+38} + + + + YES + username + children + host + itemTitle + password + globalPrivileges + globalPrivileges.Select_priv + globalPrivileges.Insert_priv + globalPrivileges.Update_priv + globalPrivileges.Delete_priv + globalPrivileges.Create_priv + globalPrivileges.Drop_priv + globalPrivileges.Reload_priv + globalPrivileges.Shutdown_priv + globalPrivileges.Process_priv + globalPrivileges.File_priv + globalPrivileges.Grant_priv + globalPrivileges.References_priv + globalPrivileges.Index_priv + globalPrivileges.Alter_priv + globalPrivileges.Show_db_priv + globalPrivileges.Super_priv + globalPrivileges.Create_tmp_table_priv + globalPrivileges.Lock_tables_priv + globalPrivileges.Execute_priv + globalPrivileges.Repl_slav_priv + globalPrivileges.Repl_client_priv + globalPrivileges.Create_view_priv + globalPrivileges.Show_view_priv + globalPrivileges.Create_routine_priv + globalPrivileges.Alter_routine_priv + globalPrivileges.Create_user_priv + globalPrivileges.Event_pri + user + content + contents + hosts.Select_priv + hosts.Insert_priv + displayName + create_priv + delete_priv + drop_priv + insert_priv + reload_priv + select_priv + update_priv + maxUserConnections + maxConnections + maxQuestions + max_user_connections + max_connections + max_questions + references_priv + alter_priv + index_priv + create_view_priv + show_view_priv + create_routine_priv + alter_routine_priv + execute_priv + shutdown_priv + file_priv + process_priv + super_priv + create_temporary_table_priv + lock_table_priv + lock_tables_priv + show_databases_priv + create_user_priv + grant_option_priv + replication_client_priv + replication_slave_priv + parent + create_temporary_tables_priv + select_priv.optional + insert_priv.optional + insert_priv.isOptional + select_priv.isOptional + trigger_priv + event_priv + name + max_updates + + SPUserItem + YES + YES + + SPUser + + + 3 + valueForKey: + + 1 + + + YES + + 10 + parent + + + + + 0 + + + + 4 + 0 + NO + 0 + + + + YES + YES + YES + YES + children + + + NSMutableDictionary + + + NSString + YES + YES + + YES + YES + YES + + + + YES + displayName + + YES + + YES + YES + YES + + + + YES + displayName + + YES + YES + + Privileges + + YES + YES + YES + + + + + YES + + + Remove User + + 2147483647 + + + + + + Remove Host + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Refresh + + 2147483647 + + + + + + + 9 + 2 + {{157, 161}, {447, 300}} + 1954022400 + Errors Sheet + NSWindow + + {3.40282e+38, 3.40282e+38} + {447, 300} + + + 256 + + YES + + + 266 + {{17, 186}, {413, 94}} + + YES + + 67239424 + 272891904 + RXJyb3JzIG9jY3VycmVkIHdoZW4gYXBwbHlpbmcgeW91ciBjaGFuZ2VzIHRvIHRoZSBzZXJ2ZXIuCgpT b21lIGNoYW5nZXMgbWF5IGhhdmUgYWxyZWFkeSBiZWVuIGFwcGxpZWQ7IHBsZWFzZSByZXZpZXcgdGhl IGVycm9ycyBiZWxvdyBiZWZvcmUgcHJvY2VlZGluZy4 - - LucidaGrande - 13 - 16 - - - - - - - - - 274 - - YES - - - 2304 - - YES - - - 2322 - {438, 25} - - - - - - - - - - - YES - - - 134 - - - - 438 - 1 - - - 100674533 - 0 - - - - YES - - YES - NSBackgroundColor - NSColor - - - YES - - 6 - System - selectedTextBackgroundColor - - - - 6 - System - selectedTextColor - - - - - - - YES - - YES - NSColor - NSCursor - NSUnderline - - - YES - - - {8, -8} - 13 - - - - - - - 1 - - 6 - {463, 10000000} - {223, 25} - - - - {{1, 1}, {438, 257}} - - - - - - {4, -5} - 1 - - 4 - - - - -2147483392 - {{424, 1}, {15, 257}} - - - _doScroller: - 1 - 0.85256409645080566 - - - - -2147483392 - {{-100, -100}, {87, 18}} - - 1 - - _doScroller: - 1 - 0.94565218687057495 - - - {{20, 60}, {440, 259}} - - - 133682 - - - - - - - 268 - {{314, 12}, {152, 32}} - - YES - - 67239424 - 134217728 - OK - - - -2038284033 - 129 - - DQ - 200 - 25 - - - - {480, 441} - - - {{0, 0}, {1440, 878}} - {1.7976931348623157e+308, 1.7976931348623157e+308} - YES - - - - - YES - - - treeController - - - - 101 - - - - outlineView - - - - 102 - - - - tabView - - - - 103 - - - - delegate - - - - 168 - - - - managedObjectContext: managedObjectContext - - - - - - managedObjectContext: managedObjectContext - managedObjectContext - managedObjectContext - 2 - - - 355 - - - - doApply: - - - - 399 - - - - doCancel: - - - - 400 - - - - value: selection.select_priv - - - - - - value: selection.select_priv - value - selection.select_priv - 2 - - - 514 - - - - value: selection.insert_priv - - - - - - value: selection.insert_priv - value - selection.insert_priv - 2 - - - 516 - - - - value: selection.update_priv - - - - - - value: selection.update_priv - value - selection.update_priv - 2 - - - 518 - - - - value: selection.delete_priv - - - - - - value: selection.delete_priv - value - selection.delete_priv - 2 - - - 519 - - - - value: selection.references_priv - - - - - - value: selection.references_priv - value - selection.references_priv - 2 - - - 520 - - - - value: selection.create_priv - - - - - - value: selection.create_priv - value - selection.create_priv - 2 - - - 521 - - - - value: selection.drop_priv - - - - - - value: selection.drop_priv - value - selection.drop_priv - 2 - - - 522 - - - - value: selection.alter_priv - - - - - - value: selection.alter_priv - value - selection.alter_priv - 2 - - - 523 - - - - value: selection.index_priv - - - - - - value: selection.index_priv - value - selection.index_priv - 2 - - - 524 - - - - value: selection.create_view_priv - - - - - - value: selection.create_view_priv - value - selection.create_view_priv - 2 - - - 525 - - - - value: selection.show_view_priv - - - - - - value: selection.show_view_priv - value - selection.show_view_priv - 2 - - - 526 - - - - value: selection.create_routine_priv - - - - - - value: selection.create_routine_priv - value - selection.create_routine_priv - 2 - - - 527 - - - - value: selection.alter_routine_priv - - - - - - value: selection.alter_routine_priv - value - selection.alter_routine_priv - 2 - - - 528 - - - - value: selection.execute_priv - - - - - - value: selection.execute_priv - value - selection.execute_priv - 2 - - - 529 - - - - value: selection.reload_priv - - - - - - value: selection.reload_priv - value - selection.reload_priv - 2 - - - 530 - - - - value: selection.shutdown_priv - - - - - - value: selection.shutdown_priv - value - selection.shutdown_priv - 2 - - - 531 - - - - value: selection.file_priv - - - - - - value: selection.file_priv - value - selection.file_priv - 2 - - - 532 - - - - value: selection.process_priv - - - - - - value: selection.process_priv - value - selection.process_priv - 2 - - - 533 - - - - value: selection.super_priv - - - - - - value: selection.super_priv - value - selection.super_priv - 2 - - - 534 - - - - value: selection.lock_tables_priv - - - - - - value: selection.lock_tables_priv - value - selection.lock_tables_priv - 2 - - - 537 - - - - value: selection.show_databases_priv - - - - - - value: selection.show_databases_priv - value - selection.show_databases_priv - 2 - - - 538 - - - - value: selection.create_user_priv - - - - - - value: selection.create_user_priv - value - selection.create_user_priv - 2 - - - 539 - - - - value: selection.grant_option_priv - - - - - - value: selection.grant_option_priv - value - selection.grant_option_priv - 2 - - - 540 - - - - value: selection.replication_client_priv - - - - - - value: selection.replication_client_priv - value - selection.replication_client_priv - 2 - - - 541 - - - - value: selection.replication_slave_priv - - - - - - value: selection.replication_slave_priv - value - selection.replication_slave_priv - 2 - - - 542 - - - - addUser: - - - - 590 - - - - removeUser: - - - - 591 - - - - addHost: - - - - 594 - - - - removeHost: - - - - 595 - - - - enabled: selection.parent - - - - - - enabled: selection.parent - enabled - selection.parent - - NSValueTransformerName - NSIsNil - - 2 - - - 600 - - - - enabled: selection.parent - - - - - - enabled: selection.parent - enabled - selection.parent - - NSValueTransformerName - NSIsNil - - 2 - - - 603 - - - - value: selection.create_temporary_tables_priv - - - - - - value: selection.create_temporary_tables_priv - value - selection.create_temporary_tables_priv - 2 - - - 606 - - - - privsSupportedByServer - - - - 649 - - - - enabled: select_priv - - - - - - enabled: select_priv - enabled - select_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 653 - - - - enabled: insert_priv - - - - - - enabled: insert_priv - enabled - insert_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 657 - - - - enabled: update_priv - - - - - - enabled: update_priv - enabled - update_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 661 - - - - enabled: delete_priv - - - - - - enabled: delete_priv - enabled - delete_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 665 - - - - enabled: references_priv - - - - - - enabled: references_priv - enabled - references_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 669 - - - - enabled: create_priv - - - - - - enabled: create_priv - enabled - create_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 673 - - - - enabled: drop_priv - - - - - - enabled: drop_priv - enabled - drop_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 677 - - - - enabled: alter_priv - - - - - - enabled: alter_priv - enabled - alter_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 679 - - - - enabled: index_priv - - - - - - enabled: index_priv - enabled - index_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 683 - - - - enabled: reload_priv - - - - - - enabled: reload_priv - enabled - reload_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 685 - - - - enabled: shutdown_priv - - - - - - enabled: shutdown_priv - enabled - shutdown_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 687 - - - - enabled: file_priv - - - - - - enabled: file_priv - enabled - file_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 689 - - - - enabled: process_priv - - - - - - enabled: process_priv - enabled - process_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 691 - - - - enabled: super_priv - - - - - - enabled: super_priv - enabled - super_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 693 - - - - enabled: lock_tables_priv - - - - - - enabled: lock_tables_priv - enabled - lock_tables_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 697 - - - - enabled: show_databases_priv - - - - - - enabled: show_databases_priv - enabled - show_databases_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 699 - - - - enabled: create_user_priv - - - - - - enabled: create_user_priv - enabled - create_user_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 701 - - - - enabled: grant_option_priv - - - - - - enabled: grant_option_priv - enabled - grant_option_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 703 - - - - enabled: create_view_priv - - - - - - enabled: create_view_priv - enabled - create_view_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 705 - - - - enabled: show_view_priv - - - - - - enabled: show_view_priv - enabled - show_view_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 707 - - - - enabled: create_routine_priv - - - - - - enabled: create_routine_priv - enabled - create_routine_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 709 - - - - enabled: alter_routine_priv - - - - - - enabled: alter_routine_priv - enabled - alter_routine_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 711 - - - - enabled: execute_priv - - - - - - enabled: execute_priv - enabled - execute_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 713 - - - - enabled: replication_client_priv - - - - - - enabled: replication_client_priv - enabled - replication_client_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 715 - - - - enabled: replication_slave_priv - - - - - - enabled: replication_slave_priv - enabled - replication_slave_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 717 - - - - enabled: create_temporary_tables_priv - - - - - - enabled: create_temporary_tables_priv - enabled - create_temporary_tables_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 718 - - - - value: selection.trigger_priv - - - - - - value: selection.trigger_priv - value - selection.trigger_priv - 2 - - - 723 - - - - enabled: trigger_priv - - - - - - enabled: trigger_priv - enabled - trigger_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 724 - - - - enabled: event_priv - - - - - - enabled: event_priv - enabled - event_priv - - NSValueTransformerName - NSIsNotNil - - 2 - - - 729 - - - - value: selection.event_priv - - - - - - value: selection.event_priv - value - selection.event_priv - 2 - - - 730 - - - - checkAllPrivileges: - - - - 731 - - - - uncheckAllPrivileges: - - - - 732 - - - - window - - - - 733 - - - - delegate - - - - 734 - - - - delegate - - - - 735 - - - - value: selection.password - - - - - - value: selection.password - value - selection.password - - YES - - YES - NSConditionallySetsHidden - NSNoSelectionPlaceholder - NSNullPlaceholder - NSRaisesForNotApplicableKeys - NSValidatesImmediately - - - YES - - No Selection - Empty Password - - - - - 2 - - - 736 - - - - sortDescriptors: treeSortDescriptors - - - - - - sortDescriptors: treeSortDescriptors - sortDescriptors - treeSortDescriptors - 2 - - - 740 - - - - availableController - - - - 789 - - - - grantedController - - - - 790 - - - - schemaController - - - - 791 - - - - addSchemaPriv: - - - - 792 - - - - contentArray: schemas - - - - - - contentArray: schemas - contentArray - schemas - 2 - - - 809 - - - - dataSource - - - - 810 - - - - contentArray: availablePrivs - - - - - - contentArray: availablePrivs - contentArray - availablePrivs - 2 - - - 821 - - - - delegate - - - - 826 - - - - schemasTableView - - - - 827 - - - - dataSource - - - - 848 - - - - delegate - - - - 849 - - - - dataSource - - - - 850 - - - - delegate - - - - 851 - - - - grantedTableView - - - - 854 - - - - availableTableView - - - - 855 - - - - value: arrangedObjects.displayName - - - - - - value: arrangedObjects.displayName - value - arrangedObjects.displayName - - NSConditionallySetsEditable - - - 2 - - - 861 - - - - value: arrangedObjects.displayName - - - - - - value: arrangedObjects.displayName - value - arrangedObjects.displayName - - NSConditionallySetsEditable - - - 2 - - - 866 - - - - addSchemaPrivButton - - - - 883 - - - - value: arrangedObjects.displayName - - - - - - value: arrangedObjects.displayName - value - arrangedObjects.displayName - - YES - - YES - NSAllowsEditingMultipleValuesSelection - NSNullPlaceholder - NSValidatesImmediately - - - YES - - Anonymous - - - - 2 - - - 887 - - - - value: selection.displayName - - - - - - value: selection.displayName - value - selection.displayName - - YES - - YES - NSContinuouslyUpdatesValue - NSNoSelectionPlaceholder - NSNotApplicablePlaceholder - NSNullPlaceholder - NSRaisesForNotApplicableKeys - NSValidatesImmediately - - - YES - - No Selection - User Not Selected - Anonymous - - - - - 2 - - - 892 - - - - userNameTextField - - - - 893 - - - - menu - - - - 902 - - - - refresh: - - - - 903 - - - - removeUser: - - - - 905 - - - - removeHost: - - - - 907 - - - - enabled: selection.parent - - - - - - enabled: selection.parent - enabled - selection.parent - - NSValueTransformerName - NSIsNil - - 2 - - - 913 - - - - delegate - - - - 914 - - - - splitViewButtonBar - - - - 917 - - - - removeSchemaPriv: - - - - 921 - - - - removeSchemaPrivButton - - - - 922 - - - - delegate - - - - 924 - - - - refresh: - - - - 925 - - - - contentArray: grantedSchemaPrivs - - - - - - contentArray: grantedSchemaPrivs - contentArray - grantedSchemaPrivs - - NSDeletesObjectsOnRemove - - - 2 - - - 929 - - - - value: selection.max_updates - - - - - - value: selection.max_updates - value - selection.max_updates - 2 - - - 975 - - - - value: selection.max_connections - - - - - - value: selection.max_connections - value - selection.max_connections - 2 - - - 977 - - - - value: selection.max_questions - - - - - - value: selection.max_questions - value - selection.max_questions - 2 - - - 979 - - - - maxUpdatesTextField - - - - 980 - - - - maxConnectionsTextField - - - - 981 - - - - maxQuestionsTextField - - - - 982 - - - - errorsSheet - - - - 993 - - - - errorsTextView - - - - 994 - - - - closeErrorsSheet: - - - - 998 - - - - value: arrangedObjects - - - - - - value: arrangedObjects - value - arrangedObjects - - NSConditionallySetsEditable - - - 2 - - - 999 - - - - - YES - - 0 - - - - - - -2 - - - File's Owner - - - -1 - - - First Responder - - - -3 - - - Application - - - 3 - - - YES - - - - UserManagerView - - - 4 - - - YES - - - - - - 25 - - - YES - - - - - - - 48 - - - - - 26 - - - YES - - - - - - - 28 - - - YES - - - - - - - - - 31 - - - YES - - - - - - 33 - - - YES - - - - - - 36 - - - - - 30 - - - - - 29 - - - - - 579 - - - YES - - - - - - - - 580 - - - YES - - - - - - 581 - - - - - 582 - - - YES - - - - - - 583 - - - - - 584 - - - YES - - - - - - 585 - - - YES - - - - - - 586 - - - YES - - - - - - - - - - 587 - - - - - 588 - - - - - 589 - - - - - 648 - - - SupportedPrivileges - - - 27 - - - YES - - - - - - - - 37 - - - YES - - - - - - - - - 38 - - - YES - - - - - - 41 - - - YES - - - - - - 44 - - - YES - - - - - - - - - 112 - - - YES - - - - - - 113 - - - - - 116 - - - YES - - - - - - 117 - - - - - 114 - - - YES - - - - - - 115 - - - - - 110 - - - YES - - - - - - 111 - - - - - 42 - - - YES - - - - - - 43 - - - YES - - - - - - 593 - - - YES - - - - - - - - - - - 189 - - - YES - - - - - - 190 - - - YES - - - - - - 592 - - - YES - - - - - - - - - - - 509 - - - YES - - - - - - 510 - - - - - 452 - - - YES - - - - - - - - - - 479 - - - YES - - - - - - 480 - - - - - 481 - - - YES - - - - - - 482 - - - - - 473 - - - YES - - - - - - 474 - - - - - 475 - - - YES - - - - - - 476 - - - - - 477 - - - YES - - - - - - 478 - - - - - 451 - - - YES - - - - - - - - - - - - - - - 719 - - - YES - - - - - - 720 - - - - - 455 - - - YES - - - - - - 456 - - - - - 457 - - - YES - - - - - - 458 - - - - - 459 - - - YES - - - - - - 460 - - - - - 461 - - - YES - - - - - - 462 - - - - - 463 - - - YES - - - - - - 464 - - - - - 465 - - - YES - - - - - - 466 - - - - - 467 - - - YES - - - - - - 468 - - - - - 469 - - - YES - - - - - - 470 - - - - - 471 - - - YES - - - - - - 472 - - - - - 453 - - - YES - - - - - - - - - - - - - - - - 725 - - - YES - - - - - - 726 - - - - - 487 - - - YES - - - - - - 488 - - - - - 489 - - - YES - - - - - - 490 - - - - - 491 - - - YES - - - - - - 492 - - - - - 493 - - - YES - - - - - - 494 - - - - - 495 - - - YES - - - - - - 496 - - - - - 497 - - - YES - - - - - - 498 - - - - - 499 - - - YES - - - - - - 500 - - - - - 501 - - - YES - - - - - - 502 - - - - - 503 - - - YES - - - - - - 504 - - - - - 505 - - - YES - - - - - - 506 - - - - - 454 - - - YES - - - - - - - 485 - - - YES - - - - - - 486 - - - - - 483 - - - YES - - - - - - 484 - - - - - 122 - - - YES - - - - - - 123 - - - - - 124 - - - YES - - - - - - 125 - - - - - 743 - - - YES - - - - - - 744 - - - YES - - - - - - - - - - 745 - - - YES - - - - - - - - - 746 - - - - - 747 - - - - - 748 - - - YES - - - - - - 749 - - - - - 750 - - - YES - - - - - - 753 - - - - - 768 - - - YES - - - - - - - - - 770 - - - YES - - - - - - 771 - - - - - 772 - - - - - 773 - - - YES - - - - - - 774 - - - - - 775 - - - YES - - - - - - - - - 776 - - - - - 777 - - - YES - - - - - - 778 - - - - - 779 - - - - - 780 - - - YES - - - - - - 781 - - - - - 782 - - - YES - - - - - - 783 - - - - - 786 - - - Schemas - - - 787 - - - GrantedPrivs - - - 788 - - - AvailablePrivs - - - 867 - - - - - 894 - - - YES - - - - - - - Context Menu - - - 896 - - - - - 899 - - - - - 900 - - - - - 901 - - - - - 915 - - - - - 916 - - - - - 918 - - - YES - - - - - - 919 - - - - - 923 - - - - - 953 - - - YES - - - - - - 954 - - - - - 955 - - - YES - - - - - - 956 - - - - - 957 - - - YES - - - - - - 958 - - - - - 965 - - - YES - - - - - - 966 - - - YES - - - - - - 967 - - - - - 968 - - - YES - - - - - - 969 - - - YES - - - - - - 970 - - - - - 971 - - - YES - - - - - - 972 - - - YES - - - - - - 973 - - - - - 983 - - - YES - - - - - - 984 - - - YES - - - - - - - - 985 - - - YES - - - - - - 986 - - - - - 987 - - - YES - - - - - - - - 988 - - - - - 989 - - - - - 990 - - - - - 995 - - - YES - - - - - - 996 - - - - - 511 - - - YES - - - - - - 512 - - - - - - - YES - - YES - -3.IBPluginDependency - 110.IBPluginDependency - 111.IBPluginDependency - 112.IBPluginDependency - 113.IBPluginDependency - 114.IBPluginDependency - 115.IBPluginDependency - 116.IBPluginDependency - 117.IBPluginDependency - 122.IBPluginDependency - 123.IBPluginDependency - 124.IBPluginDependency - 125.IBPluginDependency - 189.IBPluginDependency - 190.IBPluginDependency - 25.IBPluginDependency - 26.IBPluginDependency - 27.IBPluginDependency - 28.IBPluginDependency - 29.IBPluginDependency - 3.IBEditorWindowLastContentRect - 3.IBPluginDependency - 3.IBWindowTemplateEditedContentRect - 3.NSWindowTemplate.visibleAtLaunch - 3.windowTemplate.hasMinSize - 3.windowTemplate.minSize - 30.IBPluginDependency - 31.CustomClassName - 31.IBPluginDependency - 33.IBPluginDependency - 36.IBPluginDependency - 37.IBAttributePlaceholdersKey - 37.IBPluginDependency - 38.IBPluginDependency - 4.IBPluginDependency - 41.IBPluginDependency - 42.IBPluginDependency - 43.IBPluginDependency - 44.IBPluginDependency - 451.IBPluginDependency - 451.IBViewBoundsToFrameTransform - 452.IBPluginDependency - 452.IBViewBoundsToFrameTransform - 453.IBPluginDependency - 453.IBViewBoundsToFrameTransform - 454.IBPluginDependency - 454.IBViewBoundsToFrameTransform - 455.IBPluginDependency - 456.IBPluginDependency - 457.IBPluginDependency - 458.IBPluginDependency - 459.IBPluginDependency - 460.IBPluginDependency - 461.IBPluginDependency - 462.IBPluginDependency - 463.IBPluginDependency - 464.IBPluginDependency - 465.IBPluginDependency - 465.IBViewBoundsToFrameTransform - 466.IBPluginDependency - 467.IBPluginDependency - 467.IBViewBoundsToFrameTransform - 468.IBPluginDependency - 469.IBPluginDependency - 469.IBViewBoundsToFrameTransform - 470.IBPluginDependency - 471.IBPluginDependency - 471.IBViewBoundsToFrameTransform - 472.IBPluginDependency - 473.IBPluginDependency - 474.IBPluginDependency - 475.IBPluginDependency - 476.IBPluginDependency - 477.IBPluginDependency - 478.IBPluginDependency - 479.IBPluginDependency - 48.IBPluginDependency - 480.IBPluginDependency - 481.IBPluginDependency - 482.IBPluginDependency - 483.IBPluginDependency - 484.IBPluginDependency - 485.IBPluginDependency - 486.IBPluginDependency - 487.IBPluginDependency - 488.IBPluginDependency - 489.IBPluginDependency - 490.IBPluginDependency - 491.IBPluginDependency - 492.IBPluginDependency - 493.IBPluginDependency - 494.IBPluginDependency - 495.IBPluginDependency - 496.IBPluginDependency - 497.IBPluginDependency - 498.IBPluginDependency - 499.IBPluginDependency - 500.IBPluginDependency - 501.IBPluginDependency - 502.IBPluginDependency - 503.IBPluginDependency - 504.IBPluginDependency - 505.IBPluginDependency - 506.IBPluginDependency - 509.IBPluginDependency - 509.IBViewBoundsToFrameTransform - 510.IBPluginDependency - 511.IBPluginDependency - 511.IBViewBoundsToFrameTransform - 512.IBPluginDependency - 579.IBPluginDependency - 580.IBAttributePlaceholdersKey - 580.IBPluginDependency - 581.IBPluginDependency - 582.IBAttributePlaceholdersKey - 582.IBPluginDependency - 583.IBPluginDependency - 584.IBPluginDependency - 585.IBPluginDependency - 586.IBEditorWindowLastContentRect - 586.IBPluginDependency - 587.IBPluginDependency - 588.IBPluginDependency - 589.IBPluginDependency - 592.IBPluginDependency - 593.IBPluginDependency - 648.IBPluginDependency - 719.IBPluginDependency - 719.IBViewBoundsToFrameTransform - 720.IBPluginDependency - 725.IBPluginDependency - 726.IBPluginDependency - 745.IBPluginDependency - 746.IBPluginDependency - 747.IBPluginDependency - 748.IBPluginDependency - 749.IBPluginDependency - 750.IBPluginDependency - 753.IBPluginDependency - 768.IBPluginDependency - 770.IBPluginDependency - 771.IBPluginDependency - 772.IBPluginDependency - 773.IBPluginDependency - 774.IBPluginDependency - 775.IBPluginDependency - 776.IBPluginDependency - 777.IBPluginDependency - 778.IBPluginDependency - 779.IBPluginDependency - 780.IBPluginDependency - 781.IBPluginDependency - 782.IBPluginDependency - 783.IBPluginDependency - 786.IBPluginDependency - 787.IBPluginDependency - 788.IBPluginDependency - 894.IBEditorWindowLastContentRect - 894.IBPluginDependency - 896.IBPluginDependency - 899.IBPluginDependency - 900.IBPluginDependency - 901.IBPluginDependency - 915.IBPluginDependency - 916.IBPluginDependency - 918.IBPluginDependency - 919.IBPluginDependency - 953.IBPluginDependency - 954.IBPluginDependency - 955.IBPluginDependency - 956.IBPluginDependency - 957.IBPluginDependency - 958.IBPluginDependency - 965.IBPluginDependency - 966.IBPluginDependency - 967.IBNumberFormatterBehaviorMetadataKey - 967.IBNumberFormatterLocalizesFormatMetadataKey - 967.IBPluginDependency - 968.IBPluginDependency - 969.IBPluginDependency - 970.IBNumberFormatterBehaviorMetadataKey - 970.IBNumberFormatterLocalizesFormatMetadataKey - 970.IBPluginDependency - 971.IBPluginDependency - 972.IBPluginDependency - 973.IBNumberFormatterBehaviorMetadataKey - 973.IBNumberFormatterLocalizesFormatMetadataKey - 973.IBPluginDependency - 983.IBEditorWindowLastContentRect - 983.IBPluginDependency - 983.IBWindowTemplateEditedContentRect - 983.NSWindowTemplate.visibleAtLaunch - 984.IBPluginDependency - 985.IBPluginDependency - 986.IBPluginDependency - 987.IBPluginDependency - 988.IBPluginDependency - 989.IBPluginDependency - 990.IBPluginDependency - 995.IBPluginDependency - 996.IBPluginDependency - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{504, 350}, {815, 506}} - com.apple.InterfaceBuilder.CocoaPlugin - {{504, 350}, {815, 506}} - - - {752, 506} - com.apple.InterfaceBuilder.CocoaPlugin - SPOutlineView - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - InitialTabViewItem - - InitialTabViewItem - - - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - AUGIAABDEQAAA - - com.apple.InterfaceBuilder.CocoaPlugin - - AUOIgABDdQAAA - - com.apple.InterfaceBuilder.CocoaPlugin - - AUOIgABBEAAAA - - com.apple.InterfaceBuilder.CocoaPlugin - - AUGIAABChgAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABBgAAAwtgAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABDFQAAw28AAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABDFQAAw1sAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABDFQAAw0cAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABBYAAAwlQAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABCpAAAwigAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.brandonwalkin.BWToolkit - - ToolTip - - ToolTip - - Add User - - - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - - ToolTip - - ToolTip - - Remove User - - - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - {{202, 63}, {130, 81}} - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.brandonwalkin.BWToolkit - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - P4AAAL+AAABDFQAAwzMAAA - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - {{841, 716}, {141, 73}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - {{348, 393}, {480, 441}} - com.apple.InterfaceBuilder.CocoaPlugin - {{348, 393}, {480, 441}} - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - - - YES - - - YES - - - - - YES - - - YES - - - - 999 - - - - YES - - NSApplication - - IBProjectSource - Frameworks/PSMTabBar/PSMTabDragAssistant.h - - - - NSDictionary - - IBProjectSource - Source/NSDictionary_DeepMutableCopy.h - - - - NSMenu - - IBProjectSource - Source/SPMenuAdditions.h - - - - NSObject - - IBProjectSource - Frameworks/PSMTabBar/PSMTabBarCell.h - - - - NSObject - - IBProjectSource - Frameworks/PSMTabBar/PSMTabBarControl.h - - - - NSObject - - IBProjectSource - Frameworks/PSMTabBar/PSMTabBarController.h - - - - NSObject - - IBProjectSource - Source/SPConnectionController.h - - - - NSObject - - IBProjectSource - Source/SPContentFilterManager.h - - - - NSObject - - IBProjectSource - Source/SPImageView.h - - - - NSObject - - IBProjectSource - Source/SPMainThreadTrampoline.h - - - - NSObject - - IBProjectSource - Source/SPNotLoaded.h - - - - NSObject - - IBProjectSource - Source/SPObjectAdditions.h - - - - NSObject - - IBProjectSource - Source/SPQueryFavoriteManager.h - - - - NSObject - - toggleCollapse: - id - - - toggleCollapse: - - toggleCollapse: - id - - - - IBProjectSource - Source/SPTablesList.h - - - - NSTextView - - YES - - YES - doDecomposedStringWithCanonicalMapping: - doDecomposedStringWithCompatibilityMapping: - doPrecomposedStringWithCanonicalMapping: - doPrecomposedStringWithCompatibilityMapping: - doRemoveDiacritics: - doSelectionLowerCase: - doSelectionTitleCase: - doSelectionUpperCase: - doTranspose: - executeBundleItemForInputField: - insertNULLvalue: - moveSelectionLineDown: - moveSelectionLineUp: - selectCurrentLine: - selectCurrentWord: - selectEnclosingBrackets: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - doDecomposedStringWithCanonicalMapping: - doDecomposedStringWithCompatibilityMapping: - doPrecomposedStringWithCanonicalMapping: - doPrecomposedStringWithCompatibilityMapping: - doRemoveDiacritics: - doSelectionLowerCase: - doSelectionTitleCase: - doSelectionUpperCase: - doTranspose: - executeBundleItemForInputField: - insertNULLvalue: - moveSelectionLineDown: - moveSelectionLineUp: - selectCurrentLine: - selectCurrentWord: - selectEnclosingBrackets: - - - YES - - doDecomposedStringWithCanonicalMapping: - id - - - doDecomposedStringWithCompatibilityMapping: - id - - - doPrecomposedStringWithCanonicalMapping: - id - - - doPrecomposedStringWithCompatibilityMapping: - id - - - doRemoveDiacritics: - id - - - doSelectionLowerCase: - id - - - doSelectionTitleCase: - id - - - doSelectionUpperCase: - id - - - doTranspose: - id - - - executeBundleItemForInputField: - id - - - insertNULLvalue: - id - - - moveSelectionLineDown: - id - - - moveSelectionLineUp: - id - - - selectCurrentLine: - id - - - selectCurrentWord: - id - - - selectEnclosingBrackets: - id - - - - - IBProjectSource - Source/SPTextViewAdditions.h - - - - NSWindow - - IBProjectSource - Source/SPWindowAdditions.h - - - - SPOutlineView - NSOutlineView - - IBProjectSource - Source/SPOutlineView.h - - - - SPUserManager - NSWindowController - - YES - - YES - addHost: - addSchemaPriv: - addUser: - checkAllPrivileges: - closeErrorsSheet: - doApply: - doCancel: - doubleClickSchemaPriv: - refresh: - removeHost: - removeSchemaPriv: - removeUser: - uncheckAllPrivileges: - - - YES - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - YES - - YES - addHost: - addSchemaPriv: - addUser: - checkAllPrivileges: - closeErrorsSheet: - doApply: - doCancel: - doubleClickSchemaPriv: - refresh: - removeHost: - removeSchemaPriv: - removeUser: - uncheckAllPrivileges: - - - YES - - addHost: - id - - - addSchemaPriv: - id - - - addUser: - id - - - checkAllPrivileges: - id - - - closeErrorsSheet: - id - - - doApply: - id - - - doCancel: - id - - - doubleClickSchemaPriv: - id - - - refresh: - id - - - removeHost: - id - - - removeSchemaPriv: - id - - - removeUser: - id - - - uncheckAllPrivileges: - id - - - - - YES - - YES - addSchemaPrivButton - availableController - availableTableView - errorsSheet - errorsTextView - grantedController - grantedTableView - maxConnectionsTextField - maxQuestionsTextField - maxUpdatesTextField - outlineView - privsSupportedByServer - removeSchemaPrivButton - schemaController - schemasTableView - splitViewButtonBar - tabView - treeController - userNameTextField - - - YES - NSButton - NSArrayController - NSTableView - NSWindow - NSTextView - NSArrayController - NSTableView - NSTextField - NSTextField - NSTextField - NSOutlineView - NSMutableDictionary - NSButton - NSArrayController - NSTableView - BWAnchoredButtonBar - NSTabView - NSTreeController - NSTextField - - - - YES - - YES - addSchemaPrivButton - availableController - availableTableView - errorsSheet - errorsTextView - grantedController - grantedTableView - maxConnectionsTextField - maxQuestionsTextField - maxUpdatesTextField - outlineView - privsSupportedByServer - removeSchemaPrivButton - schemaController - schemasTableView - splitViewButtonBar - tabView - treeController - userNameTextField - - - YES - - addSchemaPrivButton - NSButton - - - availableController - NSArrayController - - - availableTableView - NSTableView - - - errorsSheet - NSWindow - - - errorsTextView - NSTextView - - - grantedController - NSArrayController - - - grantedTableView - NSTableView - - - maxConnectionsTextField - NSTextField - - - maxQuestionsTextField - NSTextField - - - maxUpdatesTextField - NSTextField - - - outlineView - NSOutlineView - - - privsSupportedByServer - NSMutableDictionary - - - removeSchemaPrivButton - NSButton - - - schemaController - NSArrayController - - - schemasTableView - NSTableView - - - splitViewButtonBar - BWAnchoredButtonBar - - - tabView - NSTabView - - - treeController - NSTreeController - - - userNameTextField - NSTextField - - - - - IBProjectSource - Source/SPUserManager.h - - - - - YES - - BWAnchoredButton - NSButton - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredButton.h - - - - BWAnchoredButtonBar - NSView - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h - - - - BWAnchoredButtonCell - NSButtonCell - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredButtonCell.h - - - - BWAnchoredPopUpButton - NSPopUpButton - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredPopUpButton.h - - - - BWAnchoredPopUpButtonCell - NSPopUpButtonCell - - IBFrameworkSource - BWToolkitFramework.framework/Headers/BWAnchoredPopUpButtonCell.h - - - - NSActionCell - NSCell - - IBFrameworkSource - AppKit.framework/Headers/NSActionCell.h - - - - NSApplication - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSApplication.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSApplicationScripting.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSColorPanel.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSHelpManager.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSPageLayout.h - - - - NSApplication - - IBFrameworkSource - AppKit.framework/Headers/NSUserInterfaceItemSearching.h - - - - NSApplication - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h - - - - NSArrayController - NSObjectController - - IBFrameworkSource - AppKit.framework/Headers/NSArrayController.h - - - - NSBox - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSBox.h - - - - NSButton - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSButton.h - - - - NSButtonCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSButtonCell.h - - - - NSCell - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSCell.h - - - - NSControl - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSControl.h - - - - NSController - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSController.h - - - - NSDictionary - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSDictionary.h - - - - NSDictionary - - IBFrameworkSource - Foundation.framework/Headers/NSFileManager.h - - - - NSDictionary - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueCoding.h - - - - NSFormatter - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSFormatter.h - - - - NSMenu - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenu.h - - - - NSMenuItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItem.h - - - - NSMenuItemCell - NSButtonCell - - IBFrameworkSource - AppKit.framework/Headers/NSMenuItemCell.h - - - - NSMutableDictionary - NSDictionary - - - - NSMutableDictionary - - - - NSNumberFormatter - NSFormatter - - IBFrameworkSource - Foundation.framework/Headers/NSNumberFormatter.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSAccessibility.h - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDictionaryController.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSDragging.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSFontPanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSKeyValueBinding.h - - - - NSObject - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSNibLoading.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSOutlineView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSPasteboard.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSSavePanel.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableView.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSToolbarItem.h - - - - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSView.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSError.h - - - - NSObject - - - - NSObject - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyValueObserving.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSKeyedArchiver.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObject.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSObjectScripting.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPortCoder.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSRunLoop.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptClassDescription.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptKeyValueCoding.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptObjectSpecifiers.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSScriptWhoseTests.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSThread.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURL.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLConnection.h - - - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSURLDownload.h - - - - NSObject - - IBFrameworkSource - Growl.framework/Headers/GrowlApplicationBridge.h - - - - NSObject - - IBFrameworkSource - PSMTabBar.framework/Headers/PSMTabBarCell.h - - - - NSObject - - IBFrameworkSource - PSMTabBar.framework/Headers/PSMTabBarControl.h - - - - NSObject - - IBFrameworkSource - Print.framework/Headers/PDEPluginInterface.h - - - - NSObject - - IBFrameworkSource - PrintCore.framework/Headers/PDEPluginInterface.h - - - - NSObject - - IBFrameworkSource - ShortcutRecorder.framework/Headers/SRRecorderCell.h - - - - NSObject - - IBFrameworkSource - ShortcutRecorder.framework/Headers/SRRecorderControl.h - - - - NSObject - - IBFrameworkSource - ShortcutRecorder.framework/Headers/SRValidator.h - - - - NSObject - - IBFrameworkSource - Sparkle.framework/Headers/SUAppcast.h - - - - NSObject - - IBFrameworkSource - Sparkle.framework/Headers/SUUpdater.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebDownload.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebEditingDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebFrameLoadDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebJavaPlugIn.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPlugin.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPluginContainer.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebPolicyDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebResourceLoadDelegate.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebScriptObject.h - - - - NSObject - - IBFrameworkSource - WebKit.framework/Headers/WebUIDelegate.h - - - - NSObjectController - NSController - - IBFrameworkSource - AppKit.framework/Headers/NSObjectController.h - - - - NSOutlineView - NSTableView - - - - NSPopUpButton - NSButton - - IBFrameworkSource - AppKit.framework/Headers/NSPopUpButton.h - - - - NSPopUpButtonCell - NSMenuItemCell - - IBFrameworkSource - AppKit.framework/Headers/NSPopUpButtonCell.h - - - - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSInterfaceStyle.h - - - - NSResponder - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSResponder.h - - - - NSScrollView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSScrollView.h - - - - NSScroller - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSScroller.h - - - - NSSecureTextField - NSTextField - - IBFrameworkSource - AppKit.framework/Headers/NSSecureTextField.h - - - - NSSecureTextFieldCell - NSTextFieldCell - - - - NSSplitView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSSplitView.h - - - - NSTabView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTabView.h - - - - NSTabViewItem - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTabViewItem.h - - - - NSTableColumn - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableColumn.h - - - - NSTableHeaderView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTableHeaderView.h - - - - NSTableView - NSControl - - - - NSText - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSText.h - - - - NSTextField - NSControl - - IBFrameworkSource - AppKit.framework/Headers/NSTextField.h - - - - NSTextFieldCell - NSActionCell - - IBFrameworkSource - AppKit.framework/Headers/NSTextFieldCell.h - - - - NSTextView - NSText - - IBFrameworkSource - AppKit.framework/Headers/NSTextView.h - - - - NSTreeController - NSObjectController - - IBFrameworkSource - AppKit.framework/Headers/NSTreeController.h - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSClipView.h - - - - NSView - - - - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSRulerView.h - - - - NSView - NSResponder - - - - NSView - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSView+BWAdditions.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSDrawer.h - - - - NSWindow - NSResponder - - IBFrameworkSource - AppKit.framework/Headers/NSWindow.h - - - - NSWindow - - IBFrameworkSource - AppKit.framework/Headers/NSWindowScripting.h - - - - NSWindow - - IBFrameworkSource - BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h - - - - NSWindowController - NSResponder - - showWindow: - id - - - showWindow: - - showWindow: - id - - - - IBFrameworkSource - AppKit.framework/Headers/NSWindowController.h - - - - - 0 - IBCocoaFramework - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - - - YES - ../../sequel-pro.xcodeproj - 3 - - YES - - YES - NSActionTemplate - NSAddTemplate - NSLeftFacingTriangleTemplate - NSMenuCheckmark - NSMenuMixedState - NSRemoveTemplate - NSRightFacingTriangleTemplate - NSSwitch - - - YES - {10, 10} - {8, 8} - {9, 9} - {11, 11} - {10, 3} - {8, 8} - {9, 9} - {15, 15} - - - + + LucidaGrande + 13 + 16 + + + + + + + + + 274 + + YES + + + 2304 + + YES + + + 2322 + {405, 6} + + + + + + + + + + + YES + + + 134 + + + + 405 + 1 + + + 2309 + 0 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSCursor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + {8, -8} + 13 + + + + + + + 6 + {463, 1e+07} + {223, 0} + + + + {{1, 1}, {405, 115}} + + + + + + {4, -5} + 1 + + 4 + + + + -2147483392 + {{424, 1}, {15, 257}} + + + _doScroller: + 1 + 0.85256409645080566 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + 1 + + _doScroller: + 1 + 0.94565218687057495 + + + {{20, 61}, {407, 117}} + + + 562 + + + + + + + 289 + {{308, 13}, {125, 32}} + + YES + + 67239424 + 134217728 + OK + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + {447, 300} + + + {{0, 0}, {1440, 878}} + {447, 322} + {3.40282e+38, 3.40282e+38} + + + + + YES + + + treeController + + + + 101 + + + + outlineView + + + + 102 + + + + tabView + + + + 103 + + + + delegate + + + + 168 + + + + managedObjectContext: managedObjectContext + + + + + + managedObjectContext: managedObjectContext + managedObjectContext + managedObjectContext + 2 + + + 355 + + + + doApply: + + + + 399 + + + + doCancel: + + + + 400 + + + + value: selection.select_priv + + + + + + value: selection.select_priv + value + selection.select_priv + 2 + + + 514 + + + + value: selection.insert_priv + + + + + + value: selection.insert_priv + value + selection.insert_priv + 2 + + + 516 + + + + value: selection.update_priv + + + + + + value: selection.update_priv + value + selection.update_priv + 2 + + + 518 + + + + value: selection.delete_priv + + + + + + value: selection.delete_priv + value + selection.delete_priv + 2 + + + 519 + + + + value: selection.references_priv + + + + + + value: selection.references_priv + value + selection.references_priv + 2 + + + 520 + + + + value: selection.create_priv + + + + + + value: selection.create_priv + value + selection.create_priv + 2 + + + 521 + + + + value: selection.drop_priv + + + + + + value: selection.drop_priv + value + selection.drop_priv + 2 + + + 522 + + + + value: selection.alter_priv + + + + + + value: selection.alter_priv + value + selection.alter_priv + 2 + + + 523 + + + + value: selection.index_priv + + + + + + value: selection.index_priv + value + selection.index_priv + 2 + + + 524 + + + + value: selection.create_view_priv + + + + + + value: selection.create_view_priv + value + selection.create_view_priv + 2 + + + 525 + + + + value: selection.show_view_priv + + + + + + value: selection.show_view_priv + value + selection.show_view_priv + 2 + + + 526 + + + + value: selection.create_routine_priv + + + + + + value: selection.create_routine_priv + value + selection.create_routine_priv + 2 + + + 527 + + + + value: selection.alter_routine_priv + + + + + + value: selection.alter_routine_priv + value + selection.alter_routine_priv + 2 + + + 528 + + + + value: selection.execute_priv + + + + + + value: selection.execute_priv + value + selection.execute_priv + 2 + + + 529 + + + + value: selection.reload_priv + + + + + + value: selection.reload_priv + value + selection.reload_priv + 2 + + + 530 + + + + value: selection.shutdown_priv + + + + + + value: selection.shutdown_priv + value + selection.shutdown_priv + 2 + + + 531 + + + + value: selection.file_priv + + + + + + value: selection.file_priv + value + selection.file_priv + 2 + + + 532 + + + + value: selection.process_priv + + + + + + value: selection.process_priv + value + selection.process_priv + 2 + + + 533 + + + + value: selection.super_priv + + + + + + value: selection.super_priv + value + selection.super_priv + 2 + + + 534 + + + + value: selection.lock_tables_priv + + + + + + value: selection.lock_tables_priv + value + selection.lock_tables_priv + 2 + + + 537 + + + + value: selection.show_databases_priv + + + + + + value: selection.show_databases_priv + value + selection.show_databases_priv + 2 + + + 538 + + + + value: selection.create_user_priv + + + + + + value: selection.create_user_priv + value + selection.create_user_priv + 2 + + + 539 + + + + value: selection.grant_option_priv + + + + + + value: selection.grant_option_priv + value + selection.grant_option_priv + 2 + + + 540 + + + + value: selection.replication_client_priv + + + + + + value: selection.replication_client_priv + value + selection.replication_client_priv + 2 + + + 541 + + + + value: selection.replication_slave_priv + + + + + + value: selection.replication_slave_priv + value + selection.replication_slave_priv + 2 + + + 542 + + + + addUser: + + + + 590 + + + + removeUser: + + + + 591 + + + + addHost: + + + + 594 + + + + removeHost: + + + + 595 + + + + enabled: selection.parent + + + + + + enabled: selection.parent + enabled + selection.parent + + NSValueTransformerName + NSIsNil + + 2 + + + 600 + + + + enabled: selection.parent + + + + + + enabled: selection.parent + enabled + selection.parent + + NSValueTransformerName + NSIsNil + + 2 + + + 603 + + + + value: selection.create_temporary_tables_priv + + + + + + value: selection.create_temporary_tables_priv + value + selection.create_temporary_tables_priv + 2 + + + 606 + + + + privsSupportedByServer + + + + 649 + + + + enabled: select_priv + + + + + + enabled: select_priv + enabled + select_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 653 + + + + enabled: insert_priv + + + + + + enabled: insert_priv + enabled + insert_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 657 + + + + enabled: update_priv + + + + + + enabled: update_priv + enabled + update_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 661 + + + + enabled: delete_priv + + + + + + enabled: delete_priv + enabled + delete_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 665 + + + + enabled: references_priv + + + + + + enabled: references_priv + enabled + references_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 669 + + + + enabled: create_priv + + + + + + enabled: create_priv + enabled + create_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 673 + + + + enabled: drop_priv + + + + + + enabled: drop_priv + enabled + drop_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 677 + + + + enabled: alter_priv + + + + + + enabled: alter_priv + enabled + alter_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 679 + + + + enabled: index_priv + + + + + + enabled: index_priv + enabled + index_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 683 + + + + enabled: reload_priv + + + + + + enabled: reload_priv + enabled + reload_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 685 + + + + enabled: shutdown_priv + + + + + + enabled: shutdown_priv + enabled + shutdown_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 687 + + + + enabled: file_priv + + + + + + enabled: file_priv + enabled + file_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 689 + + + + enabled: process_priv + + + + + + enabled: process_priv + enabled + process_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 691 + + + + enabled: super_priv + + + + + + enabled: super_priv + enabled + super_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 693 + + + + enabled: lock_tables_priv + + + + + + enabled: lock_tables_priv + enabled + lock_tables_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 697 + + + + enabled: show_databases_priv + + + + + + enabled: show_databases_priv + enabled + show_databases_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 699 + + + + enabled: create_user_priv + + + + + + enabled: create_user_priv + enabled + create_user_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 701 + + + + enabled: grant_option_priv + + + + + + enabled: grant_option_priv + enabled + grant_option_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 703 + + + + enabled: create_view_priv + + + + + + enabled: create_view_priv + enabled + create_view_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 705 + + + + enabled: show_view_priv + + + + + + enabled: show_view_priv + enabled + show_view_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 707 + + + + enabled: create_routine_priv + + + + + + enabled: create_routine_priv + enabled + create_routine_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 709 + + + + enabled: alter_routine_priv + + + + + + enabled: alter_routine_priv + enabled + alter_routine_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 711 + + + + enabled: execute_priv + + + + + + enabled: execute_priv + enabled + execute_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 713 + + + + enabled: replication_client_priv + + + + + + enabled: replication_client_priv + enabled + replication_client_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 715 + + + + enabled: replication_slave_priv + + + + + + enabled: replication_slave_priv + enabled + replication_slave_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 717 + + + + enabled: create_temporary_tables_priv + + + + + + enabled: create_temporary_tables_priv + enabled + create_temporary_tables_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 718 + + + + value: selection.trigger_priv + + + + + + value: selection.trigger_priv + value + selection.trigger_priv + 2 + + + 723 + + + + enabled: trigger_priv + + + + + + enabled: trigger_priv + enabled + trigger_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 724 + + + + enabled: event_priv + + + + + + enabled: event_priv + enabled + event_priv + + NSValueTransformerName + NSIsNotNil + + 2 + + + 729 + + + + value: selection.event_priv + + + + + + value: selection.event_priv + value + selection.event_priv + 2 + + + 730 + + + + checkAllPrivileges: + + + + 731 + + + + uncheckAllPrivileges: + + + + 732 + + + + window + + + + 733 + + + + delegate + + + + 734 + + + + delegate + + + + 735 + + + + value: selection.password + + + + + + value: selection.password + value + selection.password + + YES + + YES + NSConditionallySetsHidden + NSNoSelectionPlaceholder + NSNullPlaceholder + NSRaisesForNotApplicableKeys + NSValidatesImmediately + + + YES + + No Selection + Empty Password + + + + + 2 + + + 736 + + + + sortDescriptors: treeSortDescriptors + + + + + + sortDescriptors: treeSortDescriptors + sortDescriptors + treeSortDescriptors + 2 + + + 740 + + + + availableController + + + + 789 + + + + grantedController + + + + 790 + + + + schemaController + + + + 791 + + + + addSchemaPriv: + + + + 792 + + + + contentArray: schemas + + + + + + contentArray: schemas + contentArray + schemas + 2 + + + 809 + + + + dataSource + + + + 810 + + + + contentArray: availablePrivs + + + + + + contentArray: availablePrivs + contentArray + availablePrivs + 2 + + + 821 + + + + delegate + + + + 826 + + + + schemasTableView + + + + 827 + + + + dataSource + + + + 848 + + + + delegate + + + + 849 + + + + dataSource + + + + 850 + + + + delegate + + + + 851 + + + + grantedTableView + + + + 854 + + + + availableTableView + + + + 855 + + + + value: arrangedObjects.displayName + + + + + + value: arrangedObjects.displayName + value + arrangedObjects.displayName + + NSConditionallySetsEditable + + + 2 + + + 861 + + + + value: arrangedObjects.displayName + + + + + + value: arrangedObjects.displayName + value + arrangedObjects.displayName + + NSConditionallySetsEditable + + + 2 + + + 866 + + + + addSchemaPrivButton + + + + 883 + + + + value: arrangedObjects.displayName + + + + + + value: arrangedObjects.displayName + value + arrangedObjects.displayName + + YES + + YES + NSAllowsEditingMultipleValuesSelection + NSNullPlaceholder + NSValidatesImmediately + + + YES + + Anonymous + + + + 2 + + + 887 + + + + value: selection.displayName + + + + + + value: selection.displayName + value + selection.displayName + + YES + + YES + NSContinuouslyUpdatesValue + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + NSRaisesForNotApplicableKeys + NSValidatesImmediately + + + YES + + No Selection + User Not Selected + Anonymous + + + + + 2 + + + 892 + + + + userNameTextField + + + + 893 + + + + menu + + + + 902 + + + + refresh: + + + + 903 + + + + removeUser: + + + + 905 + + + + removeHost: + + + + 907 + + + + enabled: selection.parent + + + + + + enabled: selection.parent + enabled + selection.parent + + NSValueTransformerName + NSIsNil + + 2 + + + 913 + + + + delegate + + + + 914 + + + + splitViewButtonBar + + + + 917 + + + + removeSchemaPriv: + + + + 921 + + + + removeSchemaPrivButton + + + + 922 + + + + delegate + + + + 924 + + + + refresh: + + + + 925 + + + + contentArray: grantedSchemaPrivs + + + + + + contentArray: grantedSchemaPrivs + contentArray + grantedSchemaPrivs + + NSDeletesObjectsOnRemove + + + 2 + + + 929 + + + + value: selection.max_updates + + + + + + value: selection.max_updates + value + selection.max_updates + 2 + + + 975 + + + + value: selection.max_connections + + + + + + value: selection.max_connections + value + selection.max_connections + 2 + + + 977 + + + + value: selection.max_questions + + + + + + value: selection.max_questions + value + selection.max_questions + 2 + + + 979 + + + + maxUpdatesTextField + + + + 980 + + + + maxConnectionsTextField + + + + 981 + + + + maxQuestionsTextField + + + + 982 + + + + errorsSheet + + + + 993 + + + + errorsTextView + + + + 994 + + + + closeErrorsSheet: + + + + 998 + + + + value: arrangedObjects + + + + + + value: arrangedObjects + value + arrangedObjects + + NSConditionallySetsEditable + + + 2 + + + 999 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 3 + + + YES + + + + UserManagerView + + + 4 + + + YES + + + + + + 25 + + + YES + + + + + + + 48 + + + + + 26 + + + YES + + + + + + + 28 + + + YES + + + + + + + + + 31 + + + YES + + + + + + 33 + + + YES + + + + + + 36 + + + + + 30 + + + + + 29 + + + + + 579 + + + YES + + + + + + + + 580 + + + YES + + + + + + 581 + + + + + 582 + + + YES + + + + + + 583 + + + + + 584 + + + YES + + + + + + 585 + + + YES + + + + + + 586 + + + YES + + + + + + + + + + 587 + + + + + 588 + + + + + 589 + + + + + 648 + + + SupportedPrivileges + + + 27 + + + YES + + + + + + + + 37 + + + YES + + + + + + + + + 38 + + + YES + + + + + + 41 + + + YES + + + + + + 44 + + + YES + + + + + + + + + 112 + + + YES + + + + + + 113 + + + + + 116 + + + YES + + + + + + 117 + + + + + 114 + + + YES + + + + + + 115 + + + + + 110 + + + YES + + + + + + 111 + + + + + 42 + + + YES + + + + + + 43 + + + YES + + + + + + 593 + + + YES + + + + + + + + + + + 189 + + + YES + + + + + + 190 + + + YES + + + + + + 592 + + + YES + + + + + + + + + + + 509 + + + YES + + + + + + 510 + + + + + 452 + + + YES + + + + + + + + + + 479 + + + YES + + + + + + 480 + + + + + 481 + + + YES + + + + + + 482 + + + + + 473 + + + YES + + + + + + 474 + + + + + 475 + + + YES + + + + + + 476 + + + + + 477 + + + YES + + + + + + 478 + + + + + 451 + + + YES + + + + + + + + + + + + + + + 719 + + + YES + + + + + + 720 + + + + + 455 + + + YES + + + + + + 456 + + + + + 457 + + + YES + + + + + + 458 + + + + + 459 + + + YES + + + + + + 460 + + + + + 461 + + + YES + + + + + + 462 + + + + + 463 + + + YES + + + + + + 464 + + + + + 465 + + + YES + + + + + + 466 + + + + + 467 + + + YES + + + + + + 468 + + + + + 469 + + + YES + + + + + + 470 + + + + + 471 + + + YES + + + + + + 472 + + + + + 453 + + + YES + + + + + + + + + + + + + + + + 725 + + + YES + + + + + + 726 + + + + + 487 + + + YES + + + + + + 488 + + + + + 489 + + + YES + + + + + + 490 + + + + + 491 + + + YES + + + + + + 492 + + + + + 493 + + + YES + + + + + + 494 + + + + + 495 + + + YES + + + + + + 496 + + + + + 497 + + + YES + + + + + + 498 + + + + + 499 + + + YES + + + + + + 500 + + + + + 501 + + + YES + + + + + + 502 + + + + + 503 + + + YES + + + + + + 504 + + + + + 505 + + + YES + + + + + + 506 + + + + + 454 + + + YES + + + + + + + 485 + + + YES + + + + + + 486 + + + + + 483 + + + YES + + + + + + 484 + + + + + 122 + + + YES + + + + + + 123 + + + + + 124 + + + YES + + + + + + 125 + + + + + 743 + + + YES + + + + + + 744 + + + YES + + + + + + + + + + 745 + + + YES + + + + + + + + + 746 + + + + + 747 + + + + + 748 + + + YES + + + + + + 749 + + + + + 750 + + + YES + + + + + + 753 + + + + + 768 + + + YES + + + + + + + + + 770 + + + YES + + + + + + 771 + + + + + 772 + + + + + 773 + + + YES + + + + + + 774 + + + + + 775 + + + YES + + + + + + + + + 776 + + + + + 777 + + + YES + + + + + + 778 + + + + + 779 + + + + + 780 + + + YES + + + + + + 781 + + + + + 782 + + + YES + + + + + + 783 + + + + + 786 + + + Schemas + + + 787 + + + GrantedPrivs + + + 788 + + + AvailablePrivs + + + 867 + + + + + 894 + + + YES + + + + + + + Context Menu + + + 896 + + + + + 899 + + + + + 900 + + + + + 901 + + + + + 915 + + + + + 916 + + + + + 918 + + + YES + + + + + + 919 + + + + + 923 + + + + + 953 + + + YES + + + + + + 954 + + + + + 955 + + + YES + + + + + + 956 + + + + + 957 + + + YES + + + + + + 958 + + + + + 965 + + + YES + + + + + + 966 + + + YES + + + + + + 967 + + + + + 968 + + + YES + + + + + + 969 + + + YES + + + + + + 970 + + + + + 971 + + + YES + + + + + + 972 + + + YES + + + + + + 973 + + + + + 983 + + + YES + + + + Errors Sheet + + + 984 + + + YES + + + + + + + + 985 + + + YES + + + + + + 986 + + + + + 987 + + + YES + + + + + + + + 988 + + + + + 989 + + + + + 990 + + + + + 995 + + + YES + + + + + + 996 + + + + + 511 + + + YES + + + + + + 512 + + + + + + + YES + + YES + -3.IBPluginDependency + 110.IBPluginDependency + 111.IBPluginDependency + 112.IBPluginDependency + 113.IBPluginDependency + 114.IBPluginDependency + 115.IBPluginDependency + 116.IBPluginDependency + 117.IBPluginDependency + 122.IBPluginDependency + 123.IBPluginDependency + 124.IBPluginDependency + 125.IBPluginDependency + 189.IBPluginDependency + 190.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 28.IBPluginDependency + 29.IBPluginDependency + 3.IBEditorWindowLastContentRect + 3.IBPluginDependency + 3.IBWindowTemplateEditedContentRect + 3.NSWindowTemplate.visibleAtLaunch + 3.windowTemplate.hasMinSize + 3.windowTemplate.minSize + 30.IBPluginDependency + 31.CustomClassName + 31.IBPluginDependency + 33.IBPluginDependency + 36.IBPluginDependency + 37.IBAttributePlaceholdersKey + 37.IBPluginDependency + 38.IBPluginDependency + 4.IBPluginDependency + 41.IBPluginDependency + 42.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 451.IBPluginDependency + 451.IBViewBoundsToFrameTransform + 452.IBPluginDependency + 452.IBViewBoundsToFrameTransform + 453.IBPluginDependency + 453.IBViewBoundsToFrameTransform + 454.IBPluginDependency + 454.IBViewBoundsToFrameTransform + 455.IBPluginDependency + 456.IBPluginDependency + 457.IBPluginDependency + 458.IBPluginDependency + 459.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 464.IBPluginDependency + 465.IBPluginDependency + 465.IBViewBoundsToFrameTransform + 466.IBPluginDependency + 467.IBPluginDependency + 467.IBViewBoundsToFrameTransform + 468.IBPluginDependency + 469.IBPluginDependency + 469.IBViewBoundsToFrameTransform + 470.IBPluginDependency + 471.IBPluginDependency + 471.IBViewBoundsToFrameTransform + 472.IBPluginDependency + 473.IBPluginDependency + 474.IBPluginDependency + 475.IBPluginDependency + 476.IBPluginDependency + 477.IBPluginDependency + 478.IBPluginDependency + 479.IBPluginDependency + 48.IBPluginDependency + 480.IBPluginDependency + 481.IBPluginDependency + 482.IBPluginDependency + 483.IBPluginDependency + 484.IBPluginDependency + 485.IBPluginDependency + 486.IBPluginDependency + 487.IBPluginDependency + 488.IBPluginDependency + 489.IBPluginDependency + 490.IBPluginDependency + 491.IBPluginDependency + 492.IBPluginDependency + 493.IBPluginDependency + 494.IBPluginDependency + 495.IBPluginDependency + 496.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 500.IBPluginDependency + 501.IBPluginDependency + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 505.IBPluginDependency + 506.IBPluginDependency + 509.IBPluginDependency + 509.IBViewBoundsToFrameTransform + 510.IBPluginDependency + 511.IBPluginDependency + 511.IBViewBoundsToFrameTransform + 512.IBPluginDependency + 579.IBPluginDependency + 580.IBAttributePlaceholdersKey + 580.IBPluginDependency + 581.IBPluginDependency + 582.IBAttributePlaceholdersKey + 582.IBPluginDependency + 583.IBPluginDependency + 584.IBPluginDependency + 585.IBPluginDependency + 586.IBEditorWindowLastContentRect + 586.IBPluginDependency + 587.IBPluginDependency + 588.IBPluginDependency + 589.IBPluginDependency + 592.IBPluginDependency + 593.IBPluginDependency + 648.IBPluginDependency + 719.IBPluginDependency + 719.IBViewBoundsToFrameTransform + 720.IBPluginDependency + 725.IBPluginDependency + 726.IBPluginDependency + 745.IBPluginDependency + 746.IBPluginDependency + 747.IBPluginDependency + 748.IBPluginDependency + 749.IBPluginDependency + 750.IBPluginDependency + 753.IBPluginDependency + 768.IBPluginDependency + 770.IBPluginDependency + 771.IBPluginDependency + 772.IBPluginDependency + 773.IBPluginDependency + 774.IBPluginDependency + 775.IBPluginDependency + 776.IBPluginDependency + 777.IBPluginDependency + 778.IBPluginDependency + 779.IBPluginDependency + 780.IBPluginDependency + 781.IBPluginDependency + 782.IBPluginDependency + 783.IBPluginDependency + 786.IBPluginDependency + 787.IBPluginDependency + 788.IBPluginDependency + 894.IBEditorWindowLastContentRect + 894.IBPluginDependency + 896.IBPluginDependency + 899.IBPluginDependency + 900.IBPluginDependency + 901.IBPluginDependency + 915.IBPluginDependency + 916.IBPluginDependency + 918.IBPluginDependency + 919.IBPluginDependency + 953.IBPluginDependency + 954.IBPluginDependency + 955.IBPluginDependency + 956.IBPluginDependency + 957.IBPluginDependency + 958.IBPluginDependency + 965.IBPluginDependency + 966.IBPluginDependency + 967.IBNumberFormatterBehaviorMetadataKey + 967.IBNumberFormatterLocalizesFormatMetadataKey + 967.IBPluginDependency + 968.IBPluginDependency + 969.IBPluginDependency + 970.IBNumberFormatterBehaviorMetadataKey + 970.IBNumberFormatterLocalizesFormatMetadataKey + 970.IBPluginDependency + 971.IBPluginDependency + 972.IBPluginDependency + 973.IBNumberFormatterBehaviorMetadataKey + 973.IBNumberFormatterLocalizesFormatMetadataKey + 973.IBPluginDependency + 983.IBEditorWindowLastContentRect + 983.IBPluginDependency + 983.IBWindowTemplateEditedContentRect + 983.NSWindowTemplate.visibleAtLaunch + 983.windowTemplate.hasMinSize + 983.windowTemplate.minSize + 984.IBPluginDependency + 985.IBPluginDependency + 986.IBPluginDependency + 987.IBPluginDependency + 988.IBPluginDependency + 989.IBPluginDependency + 990.IBPluginDependency + 995.IBPluginDependency + 996.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{356, 218}, {815, 506}} + com.apple.InterfaceBuilder.CocoaPlugin + {{356, 218}, {815, 506}} + + + {752, 506} + com.apple.InterfaceBuilder.CocoaPlugin + SPOutlineView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + InitialTabViewItem + + InitialTabViewItem + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + AUGIAABDEQAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUOIgABDdQAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUOIgABBEAAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUGIAABChgAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBgAAAwtgAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDFQAAw28AAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDFQAAw1sAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDFQAAw0cAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBYAAAwlQAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABCpAAAwigAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.brandonwalkin.BWToolkit + + ToolTip + + ToolTip + + Add User + + + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + + ToolTip + + ToolTip + + Remove User + + + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + {{202, 63}, {130, 81}} + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.brandonwalkin.BWToolkit + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDFQAAwzMAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{841, 716}, {141, 73}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{431, 391}, {447, 300}} + com.apple.InterfaceBuilder.CocoaPlugin + {{431, 391}, {447, 300}} + + + {447, 300} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 999 + + + + YES + + NSApplication + + IBProjectSource + Frameworks/PSMTabBar/PSMTabDragAssistant.h + + + + NSDictionary + + IBProjectSource + Source/NSDictionary_DeepMutableCopy.h + + + + NSMenu + + IBProjectSource + Source/SPMenuAdditions.h + + + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarCell.h + + + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarControl.h + + + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarController.h + + + + NSObject + + IBProjectSource + Source/SPConnectionController.h + + + + NSObject + + IBProjectSource + Source/SPContentFilterManager.h + + + + NSObject + + IBProjectSource + Source/SPImageView.h + + + + NSObject + + IBProjectSource + Source/SPMainThreadTrampoline.h + + + + NSObject + + IBProjectSource + Source/SPNotLoaded.h + + + + NSObject + + IBProjectSource + Source/SPObjectAdditions.h + + + + NSObject + + IBProjectSource + Source/SPQueryFavoriteManager.h + + + + NSObject + + toggleCollapse: + id + + + toggleCollapse: + + toggleCollapse: + id + + + + IBProjectSource + Source/SPTablesList.h + + + + NSTextView + + YES + + YES + doDecomposedStringWithCanonicalMapping: + doDecomposedStringWithCompatibilityMapping: + doPrecomposedStringWithCanonicalMapping: + doPrecomposedStringWithCompatibilityMapping: + doRemoveDiacritics: + doSelectionLowerCase: + doSelectionTitleCase: + doSelectionUpperCase: + doTranspose: + executeBundleItemForInputField: + insertNULLvalue: + moveSelectionLineDown: + moveSelectionLineUp: + selectCurrentLine: + selectCurrentWord: + selectEnclosingBrackets: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + doDecomposedStringWithCanonicalMapping: + doDecomposedStringWithCompatibilityMapping: + doPrecomposedStringWithCanonicalMapping: + doPrecomposedStringWithCompatibilityMapping: + doRemoveDiacritics: + doSelectionLowerCase: + doSelectionTitleCase: + doSelectionUpperCase: + doTranspose: + executeBundleItemForInputField: + insertNULLvalue: + moveSelectionLineDown: + moveSelectionLineUp: + selectCurrentLine: + selectCurrentWord: + selectEnclosingBrackets: + + + YES + + doDecomposedStringWithCanonicalMapping: + id + + + doDecomposedStringWithCompatibilityMapping: + id + + + doPrecomposedStringWithCanonicalMapping: + id + + + doPrecomposedStringWithCompatibilityMapping: + id + + + doRemoveDiacritics: + id + + + doSelectionLowerCase: + id + + + doSelectionTitleCase: + id + + + doSelectionUpperCase: + id + + + doTranspose: + id + + + executeBundleItemForInputField: + id + + + insertNULLvalue: + id + + + moveSelectionLineDown: + id + + + moveSelectionLineUp: + id + + + selectCurrentLine: + id + + + selectCurrentWord: + id + + + selectEnclosingBrackets: + id + + + + + IBProjectSource + Source/SPTextViewAdditions.h + + + + NSWindow + + IBProjectSource + Source/SPWindowAdditions.h + + + + SPOutlineView + NSOutlineView + + IBProjectSource + Source/SPOutlineView.h + + + + SPUserManager + NSWindowController + + YES + + YES + addHost: + addSchemaPriv: + addUser: + checkAllPrivileges: + closeErrorsSheet: + doApply: + doCancel: + doubleClickSchemaPriv: + refresh: + removeHost: + removeSchemaPriv: + removeUser: + uncheckAllPrivileges: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + addHost: + addSchemaPriv: + addUser: + checkAllPrivileges: + closeErrorsSheet: + doApply: + doCancel: + doubleClickSchemaPriv: + refresh: + removeHost: + removeSchemaPriv: + removeUser: + uncheckAllPrivileges: + + + YES + + addHost: + id + + + addSchemaPriv: + id + + + addUser: + id + + + checkAllPrivileges: + id + + + closeErrorsSheet: + id + + + doApply: + id + + + doCancel: + id + + + doubleClickSchemaPriv: + id + + + refresh: + id + + + removeHost: + id + + + removeSchemaPriv: + id + + + removeUser: + id + + + uncheckAllPrivileges: + id + + + + + YES + + YES + addSchemaPrivButton + availableController + availableTableView + errorsSheet + errorsTextView + grantedController + grantedTableView + maxConnectionsTextField + maxQuestionsTextField + maxUpdatesTextField + outlineView + privsSupportedByServer + removeSchemaPrivButton + schemaController + schemasTableView + splitViewButtonBar + tabView + treeController + userNameTextField + + + YES + NSButton + NSArrayController + NSTableView + NSWindow + NSTextView + NSArrayController + NSTableView + NSTextField + NSTextField + NSTextField + NSOutlineView + NSMutableDictionary + NSButton + NSArrayController + NSTableView + BWAnchoredButtonBar + NSTabView + NSTreeController + NSTextField + + + + YES + + YES + addSchemaPrivButton + availableController + availableTableView + errorsSheet + errorsTextView + grantedController + grantedTableView + maxConnectionsTextField + maxQuestionsTextField + maxUpdatesTextField + outlineView + privsSupportedByServer + removeSchemaPrivButton + schemaController + schemasTableView + splitViewButtonBar + tabView + treeController + userNameTextField + + + YES + + addSchemaPrivButton + NSButton + + + availableController + NSArrayController + + + availableTableView + NSTableView + + + errorsSheet + NSWindow + + + errorsTextView + NSTextView + + + grantedController + NSArrayController + + + grantedTableView + NSTableView + + + maxConnectionsTextField + NSTextField + + + maxQuestionsTextField + NSTextField + + + maxUpdatesTextField + NSTextField + + + outlineView + NSOutlineView + + + privsSupportedByServer + NSMutableDictionary + + + removeSchemaPrivButton + NSButton + + + schemaController + NSArrayController + + + schemasTableView + NSTableView + + + splitViewButtonBar + BWAnchoredButtonBar + + + tabView + NSTabView + + + treeController + NSTreeController + + + userNameTextField + NSTextField + + + + + IBProjectSource + Source/SPUserManager.h + + + + + YES + + BWAnchoredButton + NSButton + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredButton.h + + + + BWAnchoredButtonBar + NSView + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h + + + + BWAnchoredButtonCell + NSButtonCell + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredButtonCell.h + + + + BWAnchoredPopUpButton + NSPopUpButton + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredPopUpButton.h + + + + BWAnchoredPopUpButtonCell + NSPopUpButtonCell + + IBFrameworkSource + BWToolkitFramework.framework/Headers/BWAnchoredPopUpButtonCell.h + + + + NSActionCell + NSCell + + IBFrameworkSource + AppKit.framework/Headers/NSActionCell.h + + + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSApplication + + IBFrameworkSource + BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h + + + + NSArrayController + NSObjectController + + IBFrameworkSource + AppKit.framework/Headers/NSArrayController.h + + + + NSBox + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSBox.h + + + + NSButton + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSButton.h + + + + NSButtonCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSButtonCell.h + + + + NSCell + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSCell.h + + + + NSControl + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSController + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSController.h + + + + NSDictionary + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSDictionary.h + + + + NSDictionary + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSDictionary + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSFormatter + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFormatter.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSMenuItemCell + NSButtonCell + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItemCell.h + + + + NSMutableDictionary + NSDictionary + + + + NSMutableDictionary + + + + NSNumberFormatter + NSFormatter + + IBFrameworkSource + Foundation.framework/Headers/NSNumberFormatter.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSObject + + IBFrameworkSource + Growl.framework/Headers/GrowlApplicationBridge.h + + + + NSObject + + IBFrameworkSource + PSMTabBar.framework/Headers/PSMTabBarCell.h + + + + NSObject + + IBFrameworkSource + PSMTabBar.framework/Headers/PSMTabBarControl.h + + + + NSObject + + IBFrameworkSource + Print.framework/Headers/PDEPluginInterface.h + + + + NSObject + + IBFrameworkSource + PrintCore.framework/Headers/PDEPluginInterface.h + + + + NSObject + + IBFrameworkSource + ShortcutRecorder.framework/Headers/SRRecorderCell.h + + + + NSObject + + IBFrameworkSource + ShortcutRecorder.framework/Headers/SRRecorderControl.h + + + + NSObject + + IBFrameworkSource + ShortcutRecorder.framework/Headers/SRValidator.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUAppcast.h + + + + NSObject + + IBFrameworkSource + Sparkle.framework/Headers/SUUpdater.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebDownload.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebEditingDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebFrameLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebJavaPlugIn.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPlugin.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPluginContainer.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebPolicyDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebResourceLoadDelegate.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebScriptObject.h + + + + NSObject + + IBFrameworkSource + WebKit.framework/Headers/WebUIDelegate.h + + + + NSObjectController + NSController + + IBFrameworkSource + AppKit.framework/Headers/NSObjectController.h + + + + NSOutlineView + NSTableView + + + + NSPopUpButton + NSButton + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButton.h + + + + NSPopUpButtonCell + NSMenuItemCell + + IBFrameworkSource + AppKit.framework/Headers/NSPopUpButtonCell.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSScrollView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSScrollView.h + + + + NSScroller + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSScroller.h + + + + NSSecureTextField + NSTextField + + IBFrameworkSource + AppKit.framework/Headers/NSSecureTextField.h + + + + NSSecureTextFieldCell + NSTextFieldCell + + + + NSSplitView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSSplitView.h + + + + NSTabView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSTabView.h + + + + NSTabViewItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTabViewItem.h + + + + NSTableColumn + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableColumn.h + + + + NSTableHeaderView + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSTableHeaderView.h + + + + NSTableView + NSControl + + + + NSText + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSText.h + + + + NSTextField + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSTextField.h + + + + NSTextFieldCell + NSActionCell + + IBFrameworkSource + AppKit.framework/Headers/NSTextFieldCell.h + + + + NSTextView + NSText + + IBFrameworkSource + AppKit.framework/Headers/NSTextView.h + + + + NSTreeController + NSObjectController + + IBFrameworkSource + AppKit.framework/Headers/NSTreeController.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSView + + IBFrameworkSource + BWToolkitFramework.framework/Headers/NSView+BWAdditions.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + NSWindow + + IBFrameworkSource + BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h + + + + NSWindowController + NSResponder + + showWindow: + id + + + showWindow: + + showWindow: + id + + + + IBFrameworkSource + AppKit.framework/Headers/NSWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../../sequel-pro.xcodeproj + 3 + + YES + + YES + NSActionTemplate + NSAddTemplate + NSLeftFacingTriangleTemplate + NSMenuCheckmark + NSMenuMixedState + NSRemoveTemplate + NSRightFacingTriangleTemplate + NSSwitch + + + YES + {10, 10} + {8, 8} + {9, 9} + {9, 8} + {7, 2} + {8, 8} + {9, 9} + {15, 15} + + + diff --git a/Resources/English.lproj/InfoPlist.strings b/Resources/English.lproj/InfoPlist.strings index 697fd814..c2750ad4 100644 --- a/Resources/English.lproj/InfoPlist.strings +++ b/Resources/English.lproj/InfoPlist.strings @@ -1,4 +1,4 @@ /* Localized versions of Info.plist keys */ -CFBundleGetInfoString = "Sequel Pro version 0.9.9.1, Copyright 2002-2011 Sequel Pro and CocoaMySQL team."; -NSHumanReadableCopyright = "Copyright 2002-2011 Sequel Pro and CocoaMySQL team."; \ No newline at end of file +CFBundleGetInfoString = "Sequel Pro version 0.9.9.1, Copyright 2002-2012 Sequel Pro and CocoaMySQL team."; +NSHumanReadableCopyright = "Copyright 2002-2012 Sequel Pro and CocoaMySQL team."; \ No newline at end of file diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings index 15865f90..6643741c 100644 Binary files a/Resources/English.lproj/Localizable.strings and b/Resources/English.lproj/Localizable.strings differ diff --git a/Resources/Plists/Info.plist b/Resources/Plists/Info.plist index a2fb1aed..0930e9ce 100644 --- a/Resources/Plists/Info.plist +++ b/Resources/Plists/Info.plist @@ -159,7 +159,7 @@ NSAppleScriptEnabled NSHumanReadableCopyright - Copyright 2002-2011 Sequel Pro and CocoaMySQL team. + Copyright 2002-2012 Sequel Pro and CocoaMySQL team. NSMainNibFile MainMenu NSPrincipalClass diff --git a/Resources/ru.lproj/Credits.rtf b/Resources/ru.lproj/Credits.rtf index 26d06081..fa432efb 100755 --- a/Resources/ru.lproj/Credits.rtf +++ b/Resources/ru.lproj/Credits.rtf @@ -1,10 +1,12 @@ -{\rtf1\ansi\ansicpg1251\cocoartf1038\cocoasubrtf360 +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 {\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fmodern\fcharset0 Courier;} {\colortbl;\red255\green255\blue255;\red25\green25\blue25;\red0\green27\blue199;} -\vieww8580\viewh12860\viewkind0 +\vieww9000\viewh8400\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural -\f0\b\fs22 \cf2 \uc0\u1056 \u1072 \u1079 \u1088 \u1072 \u1073 \u1086 \u1090 \u1095 \u1080 \u1082 \u1080 +\f0\b\fs30 \cf2 \uc0\u1056 \u1072 \u1079 \u1088 \u1072 \u1073 \u1086 \u1090 \u1095 \u1080 \u1082 \u1080 +\fs22 \cf2 \ + \b0 \cf0 \ {\field{\*\fldinst{HYPERLINK "http://www.abhibeckert.com/"}}{\fldrslt \uc0\u1040 \u1073 \u1093 \u1080 \u1041 \u1077 \u1082 \u1077 \u1088 \u1090 }} (Abhi Beckert)\ {\field{\*\fldinst{HYPERLINK "http://mattlangtree.com.au/"}}{\fldrslt \uc0\u1052 \u1101 \u1090 \u1051 \u1101 \u1085 \u1075 \u1090 \u1088 \u1080 }} (Matt Langtree)\ @@ -24,10 +26,14 @@ \ \pard\pardeftab720\qc -\b \cf0 \uc0\u1055 \u1077 \u1088 \u1077 \u1074 \u1086 \u1076 \u1099 : -\b0 \ +\b\fs30 \cf0 \uc0\u1055 \u1077 \u1088 \u1077 \u1074 \u1086 \u1076 \u1099 : +\fs22 \ +\pard\pardeftab720\qc + +\b0 \cf0 \ +\pard\pardeftab720\qc -\b \uc0\u1053 \u1077 \u1084 \u1077 \u1094 \u1082 \u1080 \u1081 \u1103 \u1079 \u1099 \u1082 +\b \cf0 \uc0\u1053 \u1077 \u1084 \u1077 \u1094 \u1082 \u1080 \u1081 \u1103 \u1079 \u1099 \u1082 \b0 \ \uc0\u1052 \u1072 \u1082 \u1089 \u1051 \u1086 \u1088 \u1084 \u1072 \u1085 (Max Lohrmann)\ \uc0\u1087 \u1086 \u1084 \u1086 \u1075 \u1072 \u1083 \ @@ -49,8 +55,11 @@ \uc0\u1051 \u1086 \u1088 \u1077 \u1085 \u1089 \u1058 \u1077 \u1082 \u1089 \u1090 \u1086 \u1088 (Lorenz Textor) \ \uc0\u1044 \u1078 \u1077 \u1092 \u1057 \u1082 \u1088 \u1080 \u1089 \u1072 \u1082 (Jeff Skrysak)\ \ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural + +\b\fs30 \cf2 \uc0\u1056 \u1072 \u1079 \u1088 \u1072 \u1073 \u1086 \u1090 \u1095 \u1080 \u1082 \u1080 \cf0 \uc0\u1076 \u1086 \u1087 \u1086 \u1083 \u1085 \u1077 \u1085 \u1080 \u1081 +\fs22 \ -\b \cf2 \uc0\u1056 \u1072 \u1079 \u1088 \u1072 \u1073 \u1086 \u1090 \u1095 \u1080 \u1082 \u1080 \cf0 \uc0\u1076 \u1086 \u1087 \u1086 \u1083 \u1085 \u1077 \u1085 \u1080 \u1081 \b0 \ \uc0\u1057 \u1077 \u1088 \u1078 \u1050 \u1086 \u1093 \u1077 \u1085 (Serge Cohen)\ \uc0\u1080 \u1041 \u1077 \u1088 \u1085 \u1072 \u1088 \u1076 \u1052 \u1101 \u1085 \u1096 \u1085 (Bertrand Mansion)\ @@ -161,8 +170,11 @@ Joachim M\'e5rtensson, Allan Odgaard\ \ \pard\pardeftab720\qc -\b \cf0 \uc0\u1054 \u1092 \u1086 \u1088 \u1084 \u1083 \u1077 \u1085 \u1080 \u1077 -\b0 \ +\b\fs30 \cf0 \uc0\u1054 \u1092 \u1086 \u1088 \u1084 \u1083 \u1077 \u1085 \u1080 \u1077 +\fs22 \ +\pard\pardeftab720\qc + +\b0 \cf0 \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural \cf0 \uc0\u1048 \u1082 \u1086 \u1085 \u1082 \u1080 \u1085 \u1072 \u1088 \u1080 \u1089 \u1086 \u1074 \u1072 \u1085 \u1099 {\field{\*\fldinst{HYPERLINK "http://nadesign.net/"}}{\fldrslt \uc0\u1053 \u1072 \u1042 \u1086 \u1085 \u1075 \u1086 \u1084 }} (Na Wong)\ \uc0\u1080 {\field{\*\fldinst{HYPERLINK "http://www.benperry.com.au/"}}{\fldrslt \uc0\u1041 \u1101 \u1085 \u1086 \u1084 \u1055 \u1101 \u1088 \u1080 }} (Ben Perry)\ diff --git a/Source/DMLocalizedNibBundle.m b/Source/DMLocalizedNibBundle.m index b9cbec28..86d6e671 100644 --- a/Source/DMLocalizedNibBundle.m +++ b/Source/DMLocalizedNibBundle.m @@ -179,6 +179,8 @@ static NSMutableArray *deliciousBindingKeys = nil; } else if ([view isKindOfClass:[NSTableView class]]) { for (NSTableColumn *column in [(NSTableView*)view tableColumns]) { [self _localizeStringValueOfObject:[column headerCell] table:table]; + NSString *localizedHeaderTip = [self _localizedStringForString:[column headerToolTip] table:table]; + if (localizedHeaderTip) [column setHeaderToolTip:localizedHeaderTip]; } } else if ([view isKindOfClass:[NSTextField class]]) { diff --git a/Source/DeepMutableCopy.h b/Source/DeepMutableCopy.h deleted file mode 100644 index a1c92e21..00000000 --- a/Source/DeepMutableCopy.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * DeepMutableCopy.h - * - * Created by Matt Gemmell on 02/05/2008. - * Copyright 2008 Instinctive Code. All rights reserved. - * - */ - -#import "NSArray_DeepMutableCopy.h" -#import "NSDictionary_DeepMutableCopy.h" diff --git a/Source/MGTemplateEngine.m b/Source/MGTemplateEngine.m index 1cf483f8..b735e939 100644 --- a/Source/MGTemplateEngine.m +++ b/Source/MGTemplateEngine.m @@ -8,7 +8,8 @@ #import "MGTemplateEngine.h" #import "MGTemplateStandardMarkers.h" #import "MGTemplateStandardFilters.h" -#import "DeepMutableCopy.h" +#import "NSArray_DeepMutableCopy.h" +#import "NSDictionary_DeepMutableCopy.h" #define DEFAULT_MARKER_START @"{%" diff --git a/Source/SPAppController.h b/Source/SPAppController.h index 5d12be48..87ae8e9e 100644 --- a/Source/SPAppController.h +++ b/Source/SPAppController.h @@ -24,7 +24,9 @@ // More info at #import +#ifndef SP_REFACTOR #import +#endif @class SPPreferenceController, SPAboutController, SPDatabaseDocument, SPBundleEditorController; @@ -115,5 +117,6 @@ - (NSDictionary*)shellEnvironmentForDocument:(NSString*)docUUID; - (void)addHTMLOutputController:(id)controller; +- (void)removeHTMLOutputController:(id)controller; @end diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 7bdef1a2..da25b07f 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -1515,13 +1515,19 @@ YY_BUFFER_STATE yy_scan_string (const char *); [bundleHTMLOutputController addObject:controller]; } +- (void)removeHTMLOutputController:(id)controller +{ + [bundleHTMLOutputController removeObject:controller]; +} + - (IBAction)reloadBundles:(id)sender { - // Force releasing of any HTML output windows - for(id c in bundleHTMLOutputController) { - if(![[c window] isVisible]) { - [c release]; + // Force releasing of any hidden HTML output windows, which will automatically remove them from the array. + // Keep the visible windows. + for (id c in bundleHTMLOutputController) { + if (![[c window] isVisible]) { + [[c window] performClose:self]; } } @@ -1529,7 +1535,6 @@ YY_BUFFER_STATE yy_scan_string (const char *); [bundleItems removeAllObjects]; [bundleUsedScopes removeAllObjects]; - [bundleHTMLOutputController removeAllObjects]; [bundleCategories removeAllObjects]; [bundleTriggers removeAllObjects]; [bundleKeyEquivalents removeAllObjects]; diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index 9243741c..cff150c0 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -59,9 +59,6 @@ { if ((self = [super initWithWindowNibName:@"BundleHTMLOutput"])) { - - [[self window] setReleasedWhenClosed:YES]; - [webView setContinuousSpellCheckingEnabled:NO]; [webView setGroupName:@"SequelProBundleHTMLOutput"]; [webView setDrawsBackground:YES]; @@ -286,6 +283,7 @@ [self setInitHTMLSourceString:@""]; windowUUID = @""; docUUID = @""; + [[NSApp delegate] removeHTMLOutputController:self]; [self release]; } diff --git a/Source/SPCSVExporter.m b/Source/SPCSVExporter.m index a552db78..7850e7ec 100644 --- a/Source/SPCSVExporter.m +++ b/Source/SPCSVExporter.m @@ -28,7 +28,7 @@ #import "SPTableData.h" #import "SPExportUtilities.h" #import "SPExportFile.h" -#import "SPMySQL.h" +#import @implementation SPCSVExporter diff --git a/Source/SPCSVParser.m b/Source/SPCSVParser.m index 431c89a8..be71b13e 100644 --- a/Source/SPCSVParser.m +++ b/Source/SPCSVParser.m @@ -281,7 +281,7 @@ // Update the total parsed length (differs from parserPosition following trims) totalLengthParsed += parserPosition - startingParserPosition; - // Skip empty rows + // Skip empty rows. Note the NSNull pointer comparison; as [NSNull null] is a singleton this works correctly. if ([csvRowArray count] == 0 || ([csvRowArray count] == 1 && ([csvRowArray objectAtIndex:0] == [NSNull null] diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h index dcf1c6d7..d6599b55 100644 --- a/Source/SPConnectionController.h +++ b/Source/SPConnectionController.h @@ -24,6 +24,7 @@ // More info at #import "SPConnectionControllerDelegateProtocol.h" +#import #ifndef SP_REFACTOR /* headers */ #endif @@ -51,7 +52,7 @@ #endif -@interface SPConnectionController : NSViewController +@interface SPConnectionController : NSViewController { id delegate; diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 75752c1d..1a7668fd 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -40,7 +40,8 @@ #import "SPTreeNode.h" #import "SPFavoritesExporter.h" #import "SPFavoritesImporter.h" -#import "SPMySQL.h" + +#import // Constants static NSString *SPRemoveNode = @"RemoveNode"; @@ -1440,6 +1441,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, if (connectionSSHKeychainItemName) [connectionSSHKeychainItemName release]; if (connectionSSHKeychainItemAccount) [connectionSSHKeychainItemAccount release]; if (currentFavorite) [currentFavorite release], currentFavorite = nil; + if (favoritesRoot) [favoritesRoot release], favoritesRoot = nil; [super dealloc]; } diff --git a/Source/SPConnectionDelegate.h b/Source/SPConnectionDelegate.h index 04bee877..923f5a97 100644 --- a/Source/SPConnectionDelegate.h +++ b/Source/SPConnectionDelegate.h @@ -25,7 +25,7 @@ #import "SPDatabaseDocument.h" -#import "SPMySQLConnectionDelegate.h" +#import @interface SPDatabaseDocument (SPConnectionDelegate) diff --git a/Source/SPConnectionDelegate.m b/Source/SPConnectionDelegate.m index 9480a99e..74f1d407 100644 --- a/Source/SPConnectionDelegate.m +++ b/Source/SPConnectionDelegate.m @@ -28,7 +28,7 @@ #import "SPQueryController.h" #import "SPKeychain.h" #import "SPAlertSheets.h" -#import "SPMySQLConstants.h" +#import @implementation SPDatabaseDocument (SPConnectionDelegate) @@ -40,6 +40,7 @@ */ - (void)willQueryString:(NSString *)query connection:(id)connection { +#ifndef SP_REFACTOR if ([prefs boolForKey:SPConsoleEnableLogging]) { if ((_queryMode == SPInterfaceQueryMode && [prefs boolForKey:SPConsoleEnableInterfaceLogging]) || (_queryMode == SPCustomQueryQueryMode && [prefs boolForKey:SPConsoleEnableCustomQueryLogging]) @@ -48,6 +49,7 @@ [[SPQueryController sharedQueryController] showMessageInConsole:query connection:[self name]]; } } +#endif } /** @@ -55,9 +57,11 @@ */ - (void)queryGaveError:(NSString *)error connection:(id)connection { +#ifndef SP_REFACTOR if ([prefs boolForKey:SPConsoleEnableLogging] && [prefs boolForKey:SPConsoleEnableErrorLogging]) { [[SPQueryController sharedQueryController] showErrorInConsole:error connection:[self name]]; } +#endif } /** @@ -127,8 +131,10 @@ // Ensure the window isn't miniaturized if ([[self parentWindow] isMiniaturized]) [[self parentWindow] deminiaturize:self]; +#ifndef SP_REFACTOR // Ensure the window and tab are frontmost [self makeKeyDocument]; +#endif // Display the connection error dialog and wait for the return code [NSApp beginSheet:connectionErrorDialog modalForWindow:[self parentWindow] modalDelegate:self didEndSelector:nil contextInfo:nil]; @@ -169,6 +175,7 @@ */ - (void) closeAndDisconnect { +#ifndef SP_REFACTOR NSWindow *theParentWindow = [self parentWindow]; _isConnected = NO; if ([[[self parentTabViewItem] tabView] numberOfTabViewItems] == 1) { @@ -180,6 +187,7 @@ [theParentWindow performSelector:@selector(makeKeyAndOrderFront:) withObject:nil afterDelay:0.6]; } [self parentTabDidClose]; +#endif } @end diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m index 8c9f911c..bd03a8e0 100644 --- a/Source/SPConnectionHandler.m +++ b/Source/SPConnectionHandler.m @@ -29,7 +29,8 @@ #import "SPSSHTunnel.h" #import "SPKeychain.h" #import "RegexKitLite.h" -#import "SPMySQL.h" + +#import static NSString *SPLocalhostAddress = @"127.0.0.1"; diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 01750e95..c2775716 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -396,6 +396,8 @@ extern NSString *SPLastImportIntoNewTableType; extern NSString *SPGlobalValueHistory; extern NSString *SPBundleDeletedDefaultBundlesKey; extern NSString *SPHiddenKeyFileVisibilityKey; +extern NSString *SPSelectionDetailTypeIndexed; +extern NSString *SPSelectionDetailTypePrimaryKeyed; // URLs extern NSString *SPDonationsURL; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 01adcab2..4f41531c 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -201,6 +201,8 @@ NSString *SPLastImportIntoNewTableType = @"LastImportIntoNewTableType" NSString *SPGlobalValueHistory = @"GlobalValueHistory"; NSString *SPBundleDeletedDefaultBundlesKey = @"deletedDefaultBundles"; NSString *SPHiddenKeyFileVisibilityKey = @"KeySelectionHiddenFilesVisibility"; +NSString *SPSelectionDetailTypeIndexed = @"SelectionDetailTypeNSIndexSet"; +NSString *SPSelectionDetailTypePrimaryKeyed = @"SelectionDetailTypePrimaryKeyedDetails"; // URLs NSString *SPDonationsURL = @"http://www.sequelpro.com/donate/"; diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index 7c6213b2..e5eec285 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -307,6 +307,7 @@ */ - (IBAction)exportContentFilter:(id)sender { +#ifndef SP_REFACTOR NSSavePanel *panel = [NSSavePanel savePanel]; [panel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionDefault]]; @@ -317,6 +318,7 @@ [panel setCanCreateDirectories:YES]; [panel beginSheetForDirectory:nil file:nil modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"exportFilter"]; +#endif } /** @@ -324,6 +326,7 @@ */ - (IBAction)importContentFilterByAdding:(id)sender { +#ifndef SP_REFACTOR NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setCanSelectHiddenExtension:YES]; [panel setDelegate:self]; @@ -338,6 +341,7 @@ modalDelegate:self didEndSelector:@selector(importPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL]; +#endif } /** @@ -828,6 +832,7 @@ */ - (void)importPanelDidEnd:(NSOpenPanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { +#ifndef SP_REFACTOR if (returnCode == NSOKButton) { NSString *filename = [[panel filenames] objectAtIndex:0]; @@ -885,6 +890,7 @@ } } } +#endif } @@ -894,6 +900,7 @@ - (void)savePanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { +#ifndef SP_REFACTOR if([contextInfo isEqualToString:@"exportFilter"]) { if (returnCode == NSOKButton) { @@ -941,6 +948,7 @@ } } +#endif } @end diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 3cdf4213..4460630c 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -31,12 +31,16 @@ #import "SPTextAndLinkCell.h" #import "SPTooltip.h" #import "SPAlertSheets.h" +#ifndef SP_REFACTOR /* headers */ #import "SPBundleHTMLOutputController.h" +#endif #import "SPGeometryDataView.h" +#ifndef SP_REFACTOR /* headers */ #import "SPBundleEditorController.h" #import "SPAppController.h" +#endif #import "SPTablesList.h" -#import "SPMySQL.h" +#import NSInteger MENU_EDIT_COPY = 2001; NSInteger MENU_EDIT_COPY_WITH_COLUMN = 2002; @@ -121,6 +125,15 @@ NSInteger kBlobAsImageFile = 4; #endif } +#ifdef SP_REFACTOR + +- (void)delete:(id)sender +{ + [tableInstance removeRow:self]; +} + +#endif + /** * Get selected rows a string of newline separated lines of tab separated fields * the value in each field is from the objects description method @@ -425,7 +438,6 @@ NSInteger kBlobAsImageFile = 4; NSUInteger rowCounter = 0; NSUInteger penultimateRowIndex = [selectedRows count]; NSUInteger c; - NSUInteger valueLength = 0; NSMutableString *result = [NSMutableString stringWithCapacity:2000]; @@ -472,7 +484,10 @@ NSInteger kBlobAsImageFile = 4; [value appendString:@"\t("]; cellData = nil; rowCounter++; - for ( c = 0; c < numColumns; c++ ) + + NSMutableArray *rowValues = [[NSMutableArray alloc] initWithCapacity:numColumns]; + + for (c = 0; c < numColumns; c++) { cellData = SPDataStorageObjectAtRowAndColumn(tableStorage, rowIndex, columnMappings[c]); @@ -498,7 +513,7 @@ NSInteger kBlobAsImageFile = 4; // Check for NULL value if ([cellData isNSNull]) { - [value appendString:@"NULL, "]; + [rowValues addObject:@"NULL"]; continue; } else if (cellData) { @@ -508,28 +523,29 @@ NSInteger kBlobAsImageFile = 4; // Convert numeric types to unquoted strings case 0: - [value appendFormat:@"%@, ", [cellData description]]; + [rowValues addObject:[cellData description]]; break; // Quote string, text and blob types appropriately case 1: case 2: if ([cellData isKindOfClass:nsDataClass]) { - [value appendString:[mySQLConnection escapeAndQuoteData:cellData]]; + [rowValues addObject:[mySQLConnection escapeAndQuoteData:cellData]]; } else { - [value appendString:[mySQLConnection escapeAndQuoteString:[cellData description]]]; + [rowValues addObject:[mySQLConnection escapeAndQuoteString:[cellData description]]]; } break; // GEOMETRY case 3: - [value appendString:[mySQLConnection escapeAndQuoteData:[cellData data]]]; + [rowValues addObject:[mySQLConnection escapeAndQuoteData:[cellData data]]]; break; // Unhandled cases - abort default: NSBeep(); free(columnMappings); free(columnTypes); + [rowValues release]; return nil; } @@ -538,27 +554,27 @@ NSInteger kBlobAsImageFile = 4; NSBeep(); free(columnMappings); free(columnTypes); + + [rowValues release]; + return nil; } } - // Remove the trailing ', ' from the query - if ( [value length] > 2 ) - [value deleteCharactersInRange:NSMakeRange([value length]-2, 2)]; - - valueLength += [value length]; + // Add to the string in comma-separated form, and increment the string length + [value appendString:[rowValues componentsJoinedByString:@", "]]; + [rowValues release]; // Close this VALUES group and set up the next one if appropriate if ( rowCounter != penultimateRowIndex ) { // Add a new INSERT starter command every ~250k of data. - if ( valueLength > 250000 ) { + if ([value length] > 250000) { [result appendFormat:@"%@);\n\nINSERT INTO %@ (%@)\nVALUES\n", value, [(selectedTable == nil) ? @"" : selectedTable backtickQuotedString], [tbHeader componentsJoinedAndBacktickQuoted]]; [value setString:@""]; - valueLength = 0; } else { [value appendString:@"),\n"]; } @@ -988,6 +1004,16 @@ NSInteger kBlobAsImageFile = 4; if (menuItemTag == MENU_EDIT_COPY_AS_SQL) { return (columnDefinitions != nil && [self numberOfSelectedRows] > 0); } +#endif +#ifdef SP_REFACTOR + if ( [anItem action] == @selector(selectAll:) ) + return YES; + + if ( [anItem action] == @selector(delete:) ) + { + if ( [self numberOfSelectedRows] > 0 ) + return YES; + } #endif return NO; } @@ -1170,7 +1196,18 @@ NSInteger kBlobAsImageFile = 4; { // Retrieve the column definition +#if SP_REFACTOR + NSDictionary *columnDefinition; + + if ( [[self delegate] isKindOfClass:[SPTableContent class]] ) + columnDefinition = [[(SPTableContent*)[self delegate] dataColumnDefinitions] objectAtIndex:colIndex]; + + else if ( [[self delegate] isKindOfClass:[SPCustomQuery class]] ) + columnDefinition = [[(SPCustomQuery*)[self delegate] dataColumnDefinitions] objectAtIndex:colIndex]; +#else NSDictionary *columnDefinition = [[[self delegate] dataColumnDefinitions] objectAtIndex:colIndex]; +#endif + NSString *columnType = [columnDefinition objectForKey:@"typegrouping"]; // Return YES if the multiple line editing button is enabled - triggers sheet editing on all cells. diff --git a/Source/SPCustomQuery.h b/Source/SPCustomQuery.h index 1e330682..943c307d 100644 --- a/Source/SPCustomQuery.h +++ b/Source/SPCustomQuery.h @@ -237,7 +237,7 @@ // Accessors - (NSArray *)currentResult; -- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs; +- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs truncateDataFields:(BOOL)truncate; - (void)processResultIntoDataStorage:(SPMySQLFastStreamingResult *)theResult; // Retrieving and setting table state diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index f69db3b7..f7f31088 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -25,10 +25,10 @@ #import "SPCustomQuery.h" #import "SPSQLParser.h" -#import "SPMySQL.h" #ifndef SP_REFACTOR /* headers */ #import "SPGrowlController.h" #endif +#import #import "SPDataCellFormatter.h" #import "SPDatabaseDocument.h" #import "SPTablesList.h" @@ -44,8 +44,10 @@ #import "SPAlertSheets.h" #import "SPCopyTable.h" #import "SPGeometryDataView.h" +#ifndef SP_REFACTOR /* headers */ #import "SPAppController.h" #import "SPBundleHTMLOutputController.h" +#endif #include #ifndef SP_REFACTOR /* headers */ @@ -55,7 +57,7 @@ @interface SPCustomQuery (PrivateAPI) - (id)_resultDataItemAtRow:(NSInteger)row columnIndex:(NSUInteger)column; -- (id)_convertResultDataValueToDisplayableRepresentation:(id)value whilePreservingNULLs:(BOOL)preserveNULLs; +- (id)_convertResultDataValueToDisplayableRepresentation:(id)value whilePreservingNULLs:(BOOL)preserveNULLs truncateDataFields:(BOOL)truncate; @end @@ -793,6 +795,7 @@ // if(!queriesSeparatedByDelimiter) // TODO: How to combine queries delimited by DELIMITER? usedQuery = [[NSString stringWithString:[tempQueries componentsJoinedByString:@";\n"]] retain]; + if (lastExecutedQuery) [lastExecutedQuery release]; lastExecutedQuery = [[tempQueries lastObject] retain]; // Perform empty query if no query is given @@ -858,7 +861,9 @@ ]; } } +#ifndef SP_REFACTOR [[affectedRowsText onMainThread] setStringValue:statusString]; +#endif // Restore automatic query retries [mySQLConnection setRetryQueriesOnConnectionFailure:YES]; @@ -1289,9 +1294,11 @@ // If errors occur, display them if ( [mySQLConnection lastQueryWasCancelled] || ([errorsString length] && !queryIsTableSorter)) { +#ifndef SP_REFACTOR // set the error text [errorText setString:[errorsString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; [[errorTextScrollView verticalScroller] setFloatValue:1.0f]; +#endif // try to select the line x of the first error if error message with ID 1064 contains "at line x" // by capturing the last number of the error string @@ -1365,6 +1372,9 @@ [queryInfoButton setState:NSOffState]; [self toggleQueryInfoPaneCollapse:queryInfoButton]; } +#else + if ( [errorsString length] > 0 ) + NSRunAlertPanel(LOCAL(@"Query Error"), @"%@", LOCAL(@"OK"), nil, nil, errorsString); #endif } @@ -1452,7 +1462,7 @@ */ - (NSArray *)currentResult { - return [self currentDataResultWithNULLs:NO]; + return [self currentDataResultWithNULLs:NO truncateDataFields:YES]; } /** @@ -1461,8 +1471,9 @@ * * @param includeNULLs Indicates whether to include NULLs as a native type * or use the user's NULL string representation preference. + * @param truncate Indicates whether to truncate data fields for display purposes. */ -- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs +- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs truncateDataFields:(BOOL)truncate { NSInteger i; id tableColumn; @@ -1485,7 +1496,7 @@ while ( (tableColumn = [enumerator nextObject]) ) { id value = [self _resultDataItemAtRow:i columnIndex:[[tableColumn identifier] integerValue]]; - [tempRow addObject:[self _convertResultDataValueToDisplayableRepresentation:value whilePreservingNULLs:YES]]; + [tempRow addObject:[self _convertResultDataValueToDisplayableRepresentation:value whilePreservingNULLs:includeNULLs truncateDataFields:truncate]]; } [currentResult addObject:[NSArray arrayWithArray:tempRow]]; } @@ -1520,11 +1531,11 @@ [autouppercaseKeywordsMenuItem setState:(YES?NSOnState:NSOffState)]; #endif +#ifndef SP_REFACTOR if ( [[SPQueryController sharedQueryController] historyForFileURL:[tableDocumentInstance fileURL]] ) [self performSelectorOnMainThread:@selector(historyItemsHaveBeenUpdated:) withObject:self waitUntilDone:YES]; // Populate query favorites -#ifndef SP_REFACTOR [self queryFavoritesHaveBeenUpdated:nil]; #endif @@ -2044,7 +2055,7 @@ { if (aTableView == customQueryView) { - return [self _convertResultDataValueToDisplayableRepresentation:[self _resultDataItemAtRow:rowIndex columnIndex:[[tableColumn identifier] integerValue]] whilePreservingNULLs:NO]; + return [self _convertResultDataValueToDisplayableRepresentation:[self _resultDataItemAtRow:rowIndex columnIndex:[[tableColumn identifier] integerValue]] whilePreservingNULLs:NO truncateDataFields:YES]; } return @""; @@ -2514,15 +2525,15 @@ // Retrieve the original index of the column from the identifier NSInteger columnIndex = [[[[aNotification userInfo] objectForKey:@"NSTableColumn"] identifier] integerValue]; NSDictionary *columnDefinition = NSArrayObjectAtIndex(cqColumnDefinition, columnIndex); + NSString *table = [columnDefinition objectForKey:@"org_table"]; + NSString *col = [columnDefinition objectForKey:@"org_name"]; // Don't save if the column doesn't map to an underlying SQL field - if (![columnDefinition objectForKey:@"org_name"] || ![(NSString *)[columnDefinition objectForKey:@"org_name"] length]) + if (!table || ![table length] || !col || ![col length]) return; NSMutableDictionary *tableColumnWidths; NSString *host_db = [NSString stringWithFormat:@"%@@%@", [columnDefinition objectForKey:@"db"], [tableDocumentInstance host]]; - NSString *table = [columnDefinition objectForKey:@"org_table"]; - NSString *col = [columnDefinition objectForKey:@"org_name"]; // Retrieve or instantiate the tableColumnWidths object #ifndef SP_REFACTOR @@ -3689,6 +3700,7 @@ if ((self = [super init])) { usedQuery = [[NSString stringWithString:@""] retain]; + lastExecutedQuery = nil; fieldIDQueryString = nil; sortField = nil; isDesc = NO; @@ -3988,13 +4000,14 @@ * @param value The value to convert * @param preserveNULLs Whether or not NULLs should be preserved or converted to the * user's NULL placeholder preference. + * @param truncate Whether or not data fields should be truncates for display purposes. * * @return The converted value */ -- (id)_convertResultDataValueToDisplayableRepresentation:(id)value whilePreservingNULLs:(BOOL)preserveNULLs +- (id)_convertResultDataValueToDisplayableRepresentation:(id)value whilePreservingNULLs:(BOOL)preserveNULLs truncateDataFields:(BOOL)truncate { if ([value isKindOfClass:[NSData class]]) { - value = [value shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]; + value = truncate ? [value shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]] : [value stringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]; } if ([value isNSNull] && !preserveNULLs) { @@ -4023,6 +4036,7 @@ [self clearQueryLoadTimer]; [usedQuery release]; + [lastExecutedQuery release]; [resultData release]; [favoritesManager release]; diff --git a/Source/SPDataAdditions.h b/Source/SPDataAdditions.h index 956e5b64..5ebbc356 100644 --- a/Source/SPDataAdditions.h +++ b/Source/SPDataAdditions.h @@ -24,11 +24,13 @@ @interface NSData (SPDataAdditions) -- (NSString *)dataToFormattedHexString; -- (NSString *)shortStringRepresentationUsingEncoding:(NSStringEncoding)encoding; - (NSData *)dataEncryptedWithPassword:(NSString *)password; - (NSData *)dataDecryptedWithPassword:(NSString *)password; - (NSData *)compress; - (NSData *)decompress; +- (NSString *)dataToFormattedHexString; +- (NSString *)stringRepresentationUsingEncoding:(NSStringEncoding)encoding; +- (NSString *)shortStringRepresentationUsingEncoding:(NSStringEncoding)encoding; + @end diff --git a/Source/SPDataAdditions.m b/Source/SPDataAdditions.m index 0329395c..b1aad389 100644 --- a/Source/SPDataAdditions.m +++ b/Source/SPDataAdditions.m @@ -76,7 +76,6 @@ - (NSData *)dataDecryptedWithPassword:(NSString *)password { - // Create the key from the password hash unsigned char passwordDigest[20]; SHA1((const unsigned char *)[password UTF8String], strlen([password UTF8String]), passwordDigest); @@ -190,10 +189,10 @@ return [NSData dataWithData: zipData]; } -- (NSString *)dataToFormattedHexString -/* - returns the hex representation of the given data +/** + * Returns the hex representation of the given data. */ +- (NSString *)dataToFormattedHexString { NSUInteger i, j; NSUInteger totalLength = [self length]; @@ -258,26 +257,33 @@ return retVal; } +/** + * Converts data instances to their string representation. + */ +- (NSString *)stringRepresentationUsingEncoding:(NSStringEncoding)encoding +{ + NSString *string = [[[NSString alloc] initWithData:self encoding:encoding] autorelease]; + + return !string ? [[[NSString alloc] initWithData:self encoding:NSASCIIStringEncoding] autorelease] : string; +} + /* * Convert data objects to their string representation (max 255 chars) * in the current encoding, falling back to ascii. (Mainly used for displaying * large blob data in a tableView) */ -- (NSString *) shortStringRepresentationUsingEncoding:(NSStringEncoding)encoding +- (NSString *)shortStringRepresentationUsingEncoding:(NSStringEncoding)encoding { - NSString *tmp = [[[NSString alloc] initWithData:self encoding:encoding] autorelease]; - - if (tmp == nil) - tmp = [[[NSString alloc] initWithData:self encoding:NSASCIIStringEncoding] autorelease]; - if (tmp == nil) - return @"- cannot be displayed -"; - else { - if([tmp length] > 255) - return [tmp substringToIndex:255]; - else - return tmp; + NSString *string = [self stringRepresentationUsingEncoding:encoding]; + + if (!string) { + string = @"-- cannot display --"; + } + else if ([string length] > 255) { + string = [string substringToIndex:255]; } - return @"- cannot be displayed -"; + + return string; } @end diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index 97c6d0f6..6d8f701d 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -39,8 +39,8 @@ #import "SPFieldMapperController.h" #import "SPFileHandle.h" #import "SPEncodingPopupAccessory.h" -#import "SPMySQL.h" +#import #import #define SP_FILE_READ_ERROR_STRING NSLocalizedString(@"File read error", @"File read error title (Import Dialog)") @@ -1394,7 +1394,7 @@ NSInteger colIndex = [[globalVar substringWithRange:[globalVar rangeOfRegex:re capture:1L]] integerValue]; if (colIndex > 0 && colIndex <= (NSInteger)[csvRowArray count]) { id colStr = NSArrayObjectAtIndex(csvRowArray, colIndex-1); - if(colStr == [NSNull null]) + if([colStr isNSNull]) [globalVar replaceCharactersInRange:aRange withString:@"NULL"]; else if([colStr isSPNotLoaded]) [globalVar replaceCharactersInRange:aRange withString:@""]; @@ -1414,7 +1414,7 @@ if ([cellData isSPNotLoaded]) cellData = NSArrayObjectAtIndex(fieldMappingTableDefaultValues, i); - if (cellData == [NSNull null]) { + if ([cellData isNSNull]) { [setString appendString:@"NULL"]; } else { [setString appendString:[mySQLConnection escapeAndQuoteString:cellData]]; @@ -1446,7 +1446,7 @@ NSInteger colIndex = [[globalVar substringWithRange:[globalVar rangeOfRegex:re capture:1L]] integerValue]; if(colIndex > 0 && colIndex <= (NSInteger)[csvRowArray count]) { id colStr = NSArrayObjectAtIndex(csvRowArray, colIndex-1); - if(colStr == [NSNull null]) + if([colStr isNSNull]) [globalVar replaceCharactersInRange:aRange withString:@"NULL"]; else if([colStr isSPNotLoaded]) [globalVar replaceCharactersInRange:aRange withString:@""]; @@ -1466,7 +1466,7 @@ if ([cellData isSPNotLoaded]) cellData = NSArrayObjectAtIndex(fieldMappingTableDefaultValues, i); - if (cellData == [NSNull null]) { + if ([cellData isNSNull]) { [whereString appendString:@" IS NULL"]; } else { [whereString appendString:@"="]; @@ -1521,7 +1521,7 @@ NSInteger colIndex = [[globalVar substringWithRange:[globalVar rangeOfRegex:re capture:1L]] integerValue]; if(colIndex > 0 && colIndex <= (NSInteger)[csvRowArray count]) { id colStr = NSArrayObjectAtIndex(csvRowArray, colIndex-1); - if(colStr == [NSNull null]) + if([colStr isNSNull]) [globalVar replaceCharactersInRange:aRange withString:@"NULL"]; else if([colStr isSPNotLoaded]) [globalVar replaceCharactersInRange:aRange withString:@""]; @@ -1542,7 +1542,7 @@ cellData = NSArrayObjectAtIndex(fieldMappingTableDefaultValues, i); // Insert a NULL if the cell is an NSNull, or is a nullable numeric field and empty - if (cellData == [NSNull null] || ([nullableNumericFieldsMapIndex containsIndex:i] && [[cellData description] isEqualToString:@""])) { + if ([cellData isNSNull] || ([nullableNumericFieldsMapIndex containsIndex:i] && [[cellData description] isEqualToString:@""])) { [valueString appendString:@"NULL"]; } else { diff --git a/Source/SPDatabaseCopy.m b/Source/SPDatabaseCopy.m index 2c9e11ad..4dcb4966 100644 --- a/Source/SPDatabaseCopy.m +++ b/Source/SPDatabaseCopy.m @@ -25,7 +25,7 @@ #import "SPDBActionCommons.h" #import "SPDatabaseCopy.h" #import "SPTableCopy.h" -#import "SPMySQL.h" +#import @implementation SPDatabaseCopy diff --git a/Source/SPDatabaseData.m b/Source/SPDatabaseData.m index 2317902e..cc782b5e 100644 --- a/Source/SPDatabaseData.m +++ b/Source/SPDatabaseData.m @@ -26,13 +26,13 @@ #import "SPDatabaseData.h" #import "SPServerSupport.h" #import "SPDatabaseCharacterSets.h" -#import "SPMySQL.h" +#import @interface SPDatabaseData (PrivateAPI) - (NSArray *)_getDatabaseDataForQuery:(NSString *)query; - NSInteger _sortMySQL4CharsetEntry(NSDictionary *itemOne, NSDictionary *itemTwo, void *context); +NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo, void *context); @end @@ -228,7 +228,7 @@ NSInteger _sortMySQL4CharsetEntry(NSDictionary *itemOne, NSDictionary *itemTwo, } } - return storageEngines; + return [storageEngines sortedArrayUsingFunction:_sortStorageEngineEntry context:nil]; } /** @@ -327,4 +327,12 @@ NSInteger _sortMySQL4CharsetEntry(NSDictionary *itemOne, NSDictionary *itemTwo, return [[itemOne objectForKey:@"Charset"] compare:[itemTwo objectForKey:@"Charset"]]; } +/** + * Sorts a storage engine array by the Engine key. + */ +NSInteger _sortStorageEngineEntry(NSDictionary *itemOne, NSDictionary *itemTwo, void *context) +{ + return [[itemOne objectForKey:@"Engine"] compare:[itemTwo objectForKey:@"Engine"]]; +} + @end diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h index 1c6fe296..b1d19600 100644 --- a/Source/SPDatabaseDocument.h +++ b/Source/SPDatabaseDocument.h @@ -247,6 +247,7 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS @property (assign) id databaseNameField; @property (assign) id databaseEncodingButton; @property (assign) id addDatabaseButton; +@property (assign) id chooseDatabaseButton; @property (assign) id databaseRenameNameField; @property (assign) id renameDatabaseButton; @@ -293,8 +294,8 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS - (void)selectDatabase:(NSString *)aDatabase item:(NSString *)anItem; - (IBAction)addDatabase:(id)sender; - (IBAction)removeDatabase:(id)sender; -#ifndef SP_REFACTOR /* method decls */ - (IBAction)refreshTables:(id)sender; +#ifndef SP_REFACTOR /* method decls */ - (IBAction)copyDatabase:(id)sender; #endif - (IBAction)renameDatabase:(id)sender; @@ -349,11 +350,10 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS - (IBAction)focusOnTableContentFilter:(id)sender; - (IBAction)focusOnTableListFilter:(id)sender; - (IBAction)export:(id)sender; - - (IBAction)exportSelectedTablesAs:(id)sender; // Other methods -- (void) setQueryMode:(NSInteger)theQueryMode; +- (void)setQueryMode:(NSInteger)theQueryMode; - (IBAction)closeSheet:(id)sender; - (IBAction)closePanelSheet:(id)sender; - (void)doPerformQueryService:(NSString *)query; @@ -375,7 +375,6 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS - (void)setIsSavedInBundle:(BOOL)savedInBundle; - (void)setFileURL:(NSURL *)fileURL; - (void)connect; - - (void)showConsole:(id)sender; - (IBAction)showNavigator:(id)sender; - (IBAction)toggleNavigator:(id)sender; @@ -396,7 +395,11 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS - (NSString *)displayName; #ifndef SP_REFACTOR /* method decls */ - (NSUndoManager *)undoManager; +#endif +- (NSArray *)allTableNames; +- (SPTablesList *)tablesListInstance; +#ifndef SP_REFACTOR /* method decls */ // Notification center methods - (void)willPerformQuery:(NSNotification *)notification; - (void)hasPerformedQuery:(NSNotification *)notification; @@ -451,7 +454,7 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS - (NSDictionary*)shellVariables; // State saving and setting -- (NSDictionary *) stateIncludingDetails:(NSDictionary *)detailsToReturn; +- (NSDictionary *)stateIncludingDetails:(NSDictionary *)detailsToReturn; - (BOOL)setState:(NSDictionary *)stateDetails; - (void)setStateFromConnectionFile:(NSString *)path; - (void)restoreSession; @@ -460,8 +463,6 @@ SPDatabaseData, SPTablesList, SPTableStructure, SPTableContent, SPTableData, SPS #ifdef SP_REFACTOR /* method decls */ - (SPConnectionController*)createConnectionController; - (void)connect; -- (NSArray*)allTableNames; -- (SPTablesList*)tablesListInstance; - (void)setTableSourceInstance:(SPTableStructure*)source; - (void)setTableContentInstance:(SPTableContent*)content; diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 38027ac8..d43be841 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -36,7 +36,7 @@ enum { #import "SPConnectionController.h" #import "SPConnectionControllerInitializer.h" -#import "SPMySQL.h" +#import #import "SPTablesList.h" #import "SPTableStructure.h" @@ -92,7 +92,7 @@ enum { #ifdef SP_REFACTOR /* headers */ #import "SPAlertSheets.h" -#import "NSNotificationAdditions.h" +#import "NSNotificationCenterThreadingAdditions.h" #import "SPCustomQuery.h" #import "SPDatabaseRename.h" #endif @@ -101,6 +101,7 @@ enum { #ifndef SP_REFACTOR static NSString *SPCreateSyntx = @"SPCreateSyntax"; #endif +static NSString *SPRenameDatabaseAction = @"SPRenameDatabase"; @interface SPDatabaseDocument () @@ -111,6 +112,9 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; - (void)_renameDatabase; - (void)_removeDatabase; - (void)_selectDatabaseAndItem:(NSDictionary *)selectionDetails; +#ifndef SP_REFACTOR /* method decls */ +- (void)_processDatabaseChangedBundleTriggerActions; +#endif @end @@ -141,6 +145,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; @synthesize databaseRenameSheet; @synthesize databaseRenameNameField; @synthesize renameDatabaseButton; +@synthesize chooseDatabaseButton; #endif - (id)init @@ -568,7 +573,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; * * @return The document's connection */ -- (SPMySQLConnection *) getConnection +- (SPMySQLConnection *)getConnection { return mySQLConnection; } @@ -659,10 +664,11 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; return; } - if ( [chooseDatabaseButton indexOfSelectedItem] == 0 ) { + if ([chooseDatabaseButton indexOfSelectedItem] == 0) { if ([self database]) { [chooseDatabaseButton selectItemWithTitle:[self database]]; } + return; } @@ -677,30 +683,32 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; /** * Select the specified database and, optionally, table. */ -- (void)selectDatabase:(NSString *)aDatabase item:(NSString *)anItem +- (void)selectDatabase:(NSString *)database item:(NSString *)item { #ifndef SP_REFACTOR /* update navigator controller */ // Do not update the navigator since nothing is changed [[SPNavigatorController sharedNavigatorController] setIgnoreUpdate:NO]; // If Navigator runs in syncMode let it follow the selection - if([[SPNavigatorController sharedNavigatorController] syncMode]) { + if ([[SPNavigatorController sharedNavigatorController] syncMode]) { NSMutableString *schemaPath = [NSMutableString string]; + [schemaPath setString:[self connectionID]]; - if([chooseDatabaseButton titleOfSelectedItem] && [[chooseDatabaseButton titleOfSelectedItem] length]) { + + if ([chooseDatabaseButton titleOfSelectedItem] && [[chooseDatabaseButton titleOfSelectedItem] length]) { [schemaPath appendString:SPUniqueSchemaDelimiter]; [schemaPath appendString:[chooseDatabaseButton titleOfSelectedItem]]; } + [[SPNavigatorController sharedNavigatorController] selectPath:schemaPath]; } #endif // Start a task [self startTaskWithDescription:[NSString stringWithFormat:NSLocalizedString(@"Loading database '%@'...", @"Loading database task string"), [chooseDatabaseButton titleOfSelectedItem]]]; - NSDictionary *selectionDetails = [NSDictionary dictionaryWithObjectsAndKeys: - aDatabase, @"database", - anItem, @"item", - nil]; + + NSDictionary *selectionDetails = [NSDictionary dictionaryWithObjectsAndKeys:database, @"database", item, @"item", nil]; + if ([NSThread isMainThread]) { [NSThread detachNewThreadSelector:@selector(_selectDatabaseAndItem:) toTarget:self withObject:selectionDetails]; } @@ -793,7 +801,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; modalForWindow:parentWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:@"renameDatabase"]; + contextInfo:SPRenameDatabaseAction]; } /** @@ -816,17 +824,21 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; NSArray *buttons = [alert buttons]; +#ifndef SP_REFACTOR // Change the alert's cancel button to have the key equivalent of return [[buttons objectAtIndex:0] setKeyEquivalent:@"d"]; [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; +#else + [[buttons objectAtIndex:1] setKeyEquivalent:@"\e"]; // Esc = Cancel + [[buttons objectAtIndex:0] setKeyEquivalent:@"\r"]; // Return = OK +#endif [alert setAlertStyle:NSCriticalAlertStyle]; [alert beginSheetModalForWindow:parentWindow modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"removeDatabase"]; } -#ifndef SP_REFACTOR /** * Refreshes the tables list by calling SPTablesList's updateTables. */ @@ -835,6 +847,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [tablesListInstance updateTables:self]; } +#ifndef SP_REFACTOR /** * Displays the database server variables sheet. */ @@ -897,7 +910,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; - (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { #ifndef SP_REFACTOR - if([contextInfo isEqualToString:@"saveDocPrefSheetStatus"]) { + if ([contextInfo isEqualToString:@"saveDocPrefSheetStatus"]) { saveDocPrefSheetStatus = returnCode; return; } @@ -914,6 +927,17 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if (returnCode == NSAlertDefaultReturn) { [self _removeDatabase]; } +#ifdef SP_REFACTOR + else { + // Reset chooseDatabaseButton + if ([[self database] length]) { + [chooseDatabaseButton selectItemWithTitle:[self database]]; + } + else { + [chooseDatabaseButton selectItemAtIndex:0]; + } + } +#endif } // Add a new database else if ([contextInfo isEqualToString:@"addDatabase"]) { @@ -923,12 +947,15 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; // Query the structure of all databases in the background (mainly for completion) [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:databaseStructureRetrieval withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; - } else { - // reset chooseDatabaseButton - if([[self database] length]) + } + else { + // Reset chooseDatabaseButton + if ([[self database] length]) { [chooseDatabaseButton selectItemWithTitle:[self database]]; - else + } + else { [chooseDatabaseButton selectItemAtIndex:0]; + } } } #ifndef SP_REFACTOR @@ -938,10 +965,21 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; } } #endif - else if ([contextInfo isEqualToString:@"renameDatabase"]) { + else if ([contextInfo isEqualToString:SPRenameDatabaseAction]) { if (returnCode == NSOKButton) { [self _renameDatabase]; } +#ifdef SP_REFACTOR + else { + // Reset chooseDatabaseButton + if ([[self database] length]) { + [chooseDatabaseButton selectItemWithTitle:[self database]]; + } + else { + [chooseDatabaseButton selectItemAtIndex:0]; + } + } +#endif } #ifndef SP_REFACTOR // Close error status sheet for OPTIMIZE, CHECK, REPAIR etc. @@ -1265,7 +1303,6 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; */ - (void) endTask { - // Ensure a call on the main thread if (![NSThread isMainThread]) return [[self onMainThread] endTask]; @@ -2285,7 +2322,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; { userManagerInstance = [[SPUserManager alloc] init]; - [userManagerInstance setMySqlConnection:mySQLConnection]; + [userManagerInstance setConnection:mySQLConnection]; [userManagerInstance setServerSupport:serverSupport]; } @@ -2581,6 +2618,16 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; return _isSavedInBundle; } +- (NSArray *)allTableNames +{ + return [tablesListInstance allTableNames]; +} + +- (SPTablesList *)tablesListInstance +{ + return tablesListInstance; +} + #pragma mark - #pragma mark Notification center methods @@ -4297,16 +4344,9 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if ([tableContentInstance filterSettings]) [sessionState setObject:[tableContentInstance filterSettings] forKey:@"contentFilter"]; - NSIndexSet *contentSelectedIndexSet = [tableContentInstance selectedRowIndexes]; - if (contentSelectedIndexSet && [contentSelectedIndexSet count]) { - NSMutableArray *indices = [NSMutableArray array]; - NSUInteger indexBuffer[[contentSelectedIndexSet count]]; - NSUInteger limit = [contentSelectedIndexSet getIndexes:indexBuffer maxCount:[contentSelectedIndexSet count] inIndexRange:NULL]; - NSUInteger idx; - for (idx = 0; idx < limit; idx++) { - [indices addObject:[NSNumber numberWithInteger:indexBuffer[idx]]]; - } - [sessionState setObject:indices forKey:@"contentSelectedIndexSet"]; + NSDictionary *contentSelectedRows = [tableContentInstance selectionDetailsAllowingIndexSelection:YES]; + if (contentSelectedRows) { + [sessionState setObject:contentSelectedRows forKey:@"contentSelection"]; } } @@ -4734,14 +4774,8 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [tablesListInstance selectTableAtIndex:[NSNumber numberWithInteger:[tables indexOfObject:[spfSession objectForKey:@"table"]]]]; // Restore table selection indexes - if([spfSession objectForKey:@"contentSelectedIndexSet"]) { - NSMutableIndexSet *anIndexSet = [NSMutableIndexSet indexSet]; - NSArray *items = [spfSession objectForKey:@"contentSelectedIndexSet"]; - NSUInteger i; - for(i=0; i<[items count]; i++) - [anIndexSet addIndex:[NSArrayObjectAtIndex(items, i) integerValue]]; - - [tableContentInstance setSelectedRowIndexesToRestore:anIndexSet]; + if([spfSession objectForKey:@"contentSelection"]) { + [tableContentInstance setSelectionToRestore:[spfSession objectForKey:@"contentSelection"]]; } [[tablesListInstance valueForKeyPath:@"tablesListView"] scrollRowToVisible:[tables indexOfObject:[spfSession objectForKey:@"selectedTable"]]]; @@ -5578,7 +5612,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; #pragma mark - -#pragma mark status accessory view +#pragma mark Status accessory view - (IBAction)copyChecksumFromSheet:(id)sender { @@ -5611,7 +5645,6 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; #endif - #pragma mark - /** @@ -5693,15 +5726,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [super dealloc]; } -- (NSArray*)allTableNames -{ - return [tablesListInstance allTableNames]; -} - -- (SPTablesList*)tablesListInstance -{ - return tablesListInstance; -} +#pragma mark - #ifndef SP_REFACTOR /* whole database operations */ @@ -5737,7 +5762,9 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; - (void)_renameDatabase { - if ([[databaseRenameNameField stringValue] isEqualToString:@""]) { + NSString *newDatabaseName = [databaseRenameNameField stringValue]; + + if ([newDatabaseName isEqualToString:@""]) { SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, NSLocalizedString(@"Database must have a name.", @"message of panel when no db name is given")); return; } @@ -5747,30 +5774,26 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [dbActionRename setConnection:[self getConnection]]; [dbActionRename setMessageWindow:parentWindow]; - if ([dbActionRename renameDatabaseFrom:[self database] to:[databaseRenameNameField stringValue]]) { - [self selectDatabase:[databaseRenameNameField stringValue] item:nil]; + if ([dbActionRename renameDatabaseFrom:[self database] to:newDatabaseName]) { + [self setDatabases:self]; + [self selectDatabase:newDatabaseName item:nil]; } else { SPBeginAlertSheet(NSLocalizedString(@"Unable to rename database", @"unable to rename database message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, parentWindow, self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to rename the database '%@' to '%@'.", @"unable to rename database message informative message"), [self database], [databaseRenameNameField stringValue]]); + [NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to rename the database '%@' to '%@'.", @"unable to rename database message informative message"), [self database], newDatabaseName]); } [dbActionRename release]; - - // Update DB list - [self setDatabases:self]; #ifdef SP_REFACTOR - if ( delegate && [delegate respondsToSelector:@selector(refreshDatabasePopup)] ) + if (delegate && [delegate respondsToSelector:@selector(refreshDatabasePopup)]) { [delegate performSelector:@selector(refreshDatabasePopup) withObject:nil]; + } - if ( delegate && [delegate respondsToSelector:@selector(selectDatabaseInPopup:)] ) - { - if ( [allDatabases count] > 0 ) - { - NSString* db = [databaseRenameNameField stringValue]; - [delegate performSelector:@selector(selectDatabaseInPopup:) withObject:db]; + if (delegate && [delegate respondsToSelector:@selector(selectDatabaseInPopup:)]) { + if ([allDatabases count] > 0 ) { + [delegate performSelector:@selector(selectDatabaseInPopup:) withObject:newDatabaseName]; } } #endif @@ -5873,7 +5896,6 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; // that's why we can run this on main thread [databaseStructureRetrieval queryDbStructureWithUserInfo:nil]; - // Delete was successful if (selectedDatabase) [selectedDatabase release], selectedDatabase = nil; [self setDatabases:self]; @@ -5881,9 +5903,10 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; [tablesListInstance setConnection:mySQLConnection]; [tableDumpInstance setConnection:mySQLConnection]; -#ifndef SP_REFACTOR +#ifndef SP_REFACTOR /* ui */ [self updateWindowTitle:self]; #endif + #ifdef SP_REFACTOR /* glue */ if ( delegate && [delegate respondsToSelector:@selector(refreshDatabasePopup)] ) [delegate performSelector:@selector(refreshDatabasePopup) withObject:nil]; @@ -5911,6 +5934,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; // Save existing scroll position and details, and ensure no duplicate entries are created as table list changes BOOL historyStateChanging = [spHistoryControllerInstance modifyingState]; + if (!historyStateChanging) { [spHistoryControllerInstance updateHistoryEntries]; [spHistoryControllerInstance setModifyingState:YES]; @@ -5921,13 +5945,11 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; // Attempt to select the specified database, and abort on failure #ifndef SP_REFACTOR /* patch */ - if ([chooseDatabaseButton indexOfItemWithTitle:targetDatabaseName] == NSNotFound - || ![mySQLConnection selectDatabase:targetDatabaseName]) + if ([chooseDatabaseButton indexOfItemWithTitle:targetDatabaseName] == NSNotFound || ![mySQLConnection selectDatabase:targetDatabaseName]) #else - if ( ![mySQLConnection selectDB:targetDatabaseName] ) + if (![mySQLConnection selectDatabase:targetDatabaseName]) #endif { - // End the task first to ensure the database dropdown can be reselected [self endTask]; @@ -5996,7 +6018,8 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if (![targetItemName isEqualToString:[self table]]) { if (targetItemName) { [tablesListInstance selectItemWithName:targetItemName]; - } else { + } + else { [[tablesListInstance onMainThread] setTableListSelectability:YES]; [[[tablesListInstance valueForKey:@"tablesListView"] onMainThread] deselectAll:self]; [[tablesListInstance onMainThread] setTableListSelectability:NO]; @@ -6005,52 +6028,67 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; #endif [self endTask]; #ifndef SP_REFACTOR /* triggered commands */ + [self _processDatabaseChangedBundleTriggerActions]; +#endif + +#ifdef SP_REFACTOR /* glue */ + if (delegate && [delegate respondsToSelector:@selector(databaseDidChange:)]) { + [delegate performSelectorOnMainThread:@selector(databaseDidChange:) withObject:self waitUntilDone:NO]; + } +#endif + [taskPool drain]; +} + +#ifndef SP_REFACTOR +- (void)_processDatabaseChangedBundleTriggerActions +{ NSArray *triggeredCommands = [[NSApp delegate] bundleCommandsForTrigger:SPBundleTriggerActionDatabaseChanged]; - for(NSString* cmdPath in triggeredCommands) { + + for (NSString* cmdPath in triggeredCommands) + { NSArray *data = [cmdPath componentsSeparatedByString:@"|"]; NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; + [aMenuItem setTag:0]; [aMenuItem setToolTip:[data objectAtIndex:0]]; - + // For HTML output check if corresponding window already exists BOOL stopTrigger = NO; + if ([(NSString *)[data objectAtIndex:2] length]) { BOOL correspondingWindowFound = NO; NSString *uuid = [data objectAtIndex:2]; - for(id win in [NSApp windows]) { - if([[[[win delegate] class] description] isEqualToString:@"SPBundleHTMLOutputController"]) { - if([[[win delegate] windowUUID] isEqualToString:uuid]) { + + for (id win in [NSApp windows]) + { + if ([[[[win delegate] class] description] isEqualToString:@"SPBundleHTMLOutputController"]) { + if ([[[win delegate] windowUUID] isEqualToString:uuid]) { correspondingWindowFound = YES; break; } } } - if(!correspondingWindowFound) stopTrigger = YES; + + if (!correspondingWindowFound) stopTrigger = YES; } - if(!stopTrigger) { - if([[data objectAtIndex:1] isEqualToString:SPBundleScopeGeneral]) { + if (!stopTrigger) { + if ([[data objectAtIndex:1] isEqualToString:SPBundleScopeGeneral]) { [[[NSApp delegate] onMainThread] executeBundleItemForApp:aMenuItem]; } - else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeDataTable]) { - if([[[[[NSApp mainWindow] firstResponder] class] description] isEqualToString:@"SPCopyTable"]) + else if ([[data objectAtIndex:1] isEqualToString:SPBundleScopeDataTable]) { + if ([[[[[NSApp mainWindow] firstResponder] class] description] isEqualToString:@"SPCopyTable"]) { [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForDataTable:aMenuItem]; + } } - else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeInputField]) { - if([[[NSApp mainWindow] firstResponder] isKindOfClass:[NSTextView class]]) + else if ([[data objectAtIndex:1] isEqualToString:SPBundleScopeInputField]) { + if ([[[NSApp mainWindow] firstResponder] isKindOfClass:[NSTextView class]]) { [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForInputField:aMenuItem]; + } } } } -#endif - -#ifdef SP_REFACTOR /* glue */ - if (delegate && [delegate respondsToSelector:@selector(databaseDidChange:)]) { - [delegate performSelectorOnMainThread:@selector(databaseDidChange:) withObject:self waitUntilDone:NO]; - } -#endif - - [taskPool drain]; } +#endif @end diff --git a/Source/SPDatabaseInfo.m b/Source/SPDatabaseInfo.m index fc487718..ea43f403 100644 --- a/Source/SPDatabaseInfo.m +++ b/Source/SPDatabaseInfo.m @@ -24,7 +24,7 @@ #import "SPDBActionCommons.h" #import "SPDatabaseInfo.h" -#import "SPMySQL.h" +#import @implementation SPDatabaseInfo diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m index 1877e955..61186678 100644 --- a/Source/SPDatabaseRename.m +++ b/Source/SPDatabaseRename.m @@ -26,7 +26,7 @@ #import "SPDatabaseRename.h" #import "SPTableCopy.h" #import "SPDatabaseInfo.h" -#import "SPMySQL.h" +#import @implementation SPDatabaseRename diff --git a/Source/SPDatabaseStructure.h b/Source/SPDatabaseStructure.h index 52e43ec8..32435a01 100644 --- a/Source/SPDatabaseStructure.h +++ b/Source/SPDatabaseStructure.h @@ -23,9 +23,12 @@ // // More info at + +#import + @class SPMySQLConnection, SPDatabaseDocument; -@interface SPDatabaseStructure : NSObject { +@interface SPDatabaseStructure : NSObject { SPDatabaseDocument *delegate; SPMySQLConnection *mySQLConnection; diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m index 3579e269..79e2cc5d 100644 --- a/Source/SPDatabaseStructure.m +++ b/Source/SPDatabaseStructure.m @@ -28,7 +28,7 @@ #import "SPConnectionDelegate.h" #import "SPTablesList.h" #import "RegexKitLite.h" -#import "SPMySQL.h" +#import #import @interface SPDatabaseStructure (Private_API) diff --git a/Source/SPDatabaseViewController.m b/Source/SPDatabaseViewController.m index dcea5cdc..4d0548d5 100644 --- a/Source/SPDatabaseViewController.m +++ b/Source/SPDatabaseViewController.m @@ -23,8 +23,10 @@ // // More info at +#ifndef SP_REFACTOR /* headers */ #import "SPAppController.h" #import "SPBundleHTMLOutputController.h" +#endif #import "SPCopyTable.h" #import "SPDatabaseViewController.h" #import "SPHistoryController.h" @@ -32,7 +34,7 @@ #import "SPTableData.h" #import "SPTablesList.h" #import "SPTableTriggers.h" -#import "SPMySQL.h" +#import #ifdef SP_REFACTOR /* headers */ #import "SPTableStructure.h" #endif diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m index 3c948e74..b84e41ba 100644 --- a/Source/SPEditorPreferencePane.m +++ b/Source/SPEditorPreferencePane.m @@ -329,7 +329,6 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined"; NSFont *font = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]; [editorFontName setFont:font]; - [editorFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [font displayName], [font pointSize]]]; [colorSettingTableView reloadData]; } diff --git a/Source/SPExportController.h b/Source/SPExportController.h index 9c084334..72a12a85 100644 --- a/Source/SPExportController.h +++ b/Source/SPExportController.h @@ -23,7 +23,13 @@ // // More info at -@class SPMySQLConnection, BWAnchoredButtonBar; +@class SPDatabaseDocument, + SPTableContent, + SPCustomQuery, + SPTablesList, + SPTableData, + SPMySQLConnection, + BWAnchoredButtonBar; /** * @class SPExportController SPExportController.h @@ -35,11 +41,11 @@ @interface SPExportController : NSWindowController { // Controllers - IBOutlet id tableDocumentInstance; - IBOutlet id tableContentInstance; - IBOutlet id customQueryInstance; - IBOutlet id tablesListInstance; - IBOutlet id tableDataInstance; + IBOutlet SPDatabaseDocument *tableDocumentInstance; + IBOutlet SPTableContent *tableContentInstance; + IBOutlet SPCustomQuery *customQueryInstance; + IBOutlet SPTablesList *tablesListInstance; + IBOutlet SPTableData *tableDataInstance; // Export window IBOutlet NSView *exporterView; @@ -94,9 +100,6 @@ IBOutlet NSPopUpButton *exportSQLInsertDividerPopUpButton; IBOutlet NSButton *exportSQLIncludeAutoIncrementValueButton; - // Excel - IBOutlet NSMatrix *exportExcelSheetOrFilePerTableMatrix; - // CSV IBOutlet NSButton *exportCSVIncludeFieldNamesCheck; IBOutlet NSComboBox *exportCSVFieldsTerminatedField; @@ -263,6 +266,4 @@ - (IBAction)toggleSQLIncludeDropSyntax:(NSButton *)sender; - (IBAction)toggleNewFilePerTable:(NSButton *)sender; -- (void)savePanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; - @end diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 17720928..ace630b6 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -34,7 +34,7 @@ #import "SPExportFilenameUtilities.h" #import "SPExportFileNameTokenObject.h" #import "SPDatabaseDocument.h" -#import "SPMySQL.h" +#import // Constants static const NSUInteger SPExportUIPadding = 20; @@ -615,6 +615,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; - (IBAction)toggleNewFilePerTable:(NSButton *)sender { [self _updateExportFormatInformation]; + [self updateAvailableExportFilenameTokens]; } /** @@ -835,7 +836,7 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; } if (j > i) { - NSUInteger diff = (j - i); + NSUInteger diff = j - i; SPBeginAlertSheet(NSLocalizedString(@"The list of tables has changed", @"table list change alert message"), NSLocalizedString(@"Continue", @"continue button"), @@ -975,9 +976,9 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; BOOL isHTML = (exportType == SPHTMLExport); BOOL isPDF = (exportType == SPPDFExport); - BOOL structureEnabled = [[uiStateDict objectForKey:SPSQLExportStructureEnabled] integerValue]; - BOOL contentEnabled = [[uiStateDict objectForKey:SPSQLExportContentEnabled] integerValue]; - BOOL dropEnabled = [[uiStateDict objectForKey:SPSQLExportDropEnabled] integerValue]; + BOOL structureEnabled = [[uiStateDict objectForKey:SPSQLExportStructureEnabled] boolValue]; + BOOL contentEnabled = [[uiStateDict objectForKey:SPSQLExportContentEnabled] boolValue]; + BOOL dropEnabled = [[uiStateDict objectForKey:SPSQLExportDropEnabled] boolValue]; if (isCSV || isXML || isHTML || isPDF || (isSQL && ((!structureEnabled) || (!dropEnabled)))) { enable = NO; @@ -1012,8 +1013,8 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; } } } - // Disable if structure is unchecked, but content and drop are as dropping a table then trying to insert - // into it is obviously an error. + // Disable if structure is unchecked, but content and drop are as dropping a + // table then trying to insert into it is obviously an error. else if (contentEnabled && (!structureEnabled) && (dropEnabled)) { enable = NO; } @@ -1053,119 +1054,4 @@ static const NSString *SPSQLExportDropEnabled = @"SQLExportDropEnabled"; [exportButton setEnabled:[enable boolValue]]; } -/** - * Resizes the export window's height by the supplied delta, while retaining the position of - * all interface controls to accommodate the custom filename view. - * - * @param delta The height delta for which the height should be adjusted for. - */ -- (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta -{ - NSUInteger popUpMask = [exportInputPopUpButton autoresizingMask]; - NSUInteger fileCheckMask = [exportFilePerTableCheck autoresizingMask]; - NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask]; - NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask]; - NSUInteger buttonMask = [exportCustomFilenameViewButton autoresizingMask]; - NSUInteger textFieldMask = [exportCustomFilenameViewLabelButton autoresizingMask]; - NSUInteger customFilenameViewMask = [exportCustomFilenameView autoresizingMask]; - NSUInteger tabBarMask = [exportOptionsTabBar autoresizingMask]; - - NSRect frame = [[self window] frame]; - - if (frame.size.height > 600 && delta > heightOffset1) { - frame.origin.y += [exportCustomFilenameView frame].size.height; - frame.size.height -= [exportCustomFilenameView frame].size.height; - - [[self window] setFrame:frame display:YES animate:YES]; - } - - [exportInputPopUpButton setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; - [exportFilePerTableCheck setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; - [exportTablelistScrollView setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; - [exportTableListButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; - [exportOptionsTabBar setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; - [exportCustomFilenameViewButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportCustomFilenameViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportCustomFilenameView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - - NSInteger newMinHeight = (windowMinHeigth - heightOffset1 + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset1 + delta; - - [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; - - frame.origin.y += heightOffset1; - frame.size.height -= heightOffset1; - - heightOffset1 = delta; - - frame.origin.y -= heightOffset1; - frame.size.height += heightOffset1; - - [[self window] setFrame:frame display:YES animate:YES]; - - [exportInputPopUpButton setAutoresizingMask:popUpMask]; - [exportFilePerTableCheck setAutoresizingMask:fileCheckMask]; - [exportTablelistScrollView setAutoresizingMask:scrollMask]; - [exportTableListButtonBar setAutoresizingMask:buttonBarMask]; - [exportCustomFilenameViewButton setAutoresizingMask:buttonMask]; - [exportCustomFilenameViewLabelButton setAutoresizingMask:textFieldMask]; - [exportCustomFilenameView setAutoresizingMask:customFilenameViewMask]; - [exportOptionsTabBar setAutoresizingMask:tabBarMask]; -} - -/** - * Resizes the export window's height by the supplied delta, while retaining the position of - * all interface controls to accommodate the advanced options view. - * - * @param delta The height delta for which the height should be adjusted for. - */ -- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta -{ - NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask]; - NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask]; - NSUInteger tabBarMask = [exportTypeTabBar autoresizingMask]; - NSUInteger optionsTabBarMask = [exportOptionsTabBar autoresizingMask]; - NSUInteger buttonMask = [exportAdvancedOptionsViewButton autoresizingMask]; - NSUInteger textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask]; - NSUInteger advancedViewMask = [exportAdvancedOptionsView autoresizingMask]; - - NSRect frame = [[self window] frame]; - - if (frame.size.height > 600 && delta > heightOffset2) { - frame.origin.y += [exportAdvancedOptionsView frame].size.height; - frame.size.height -= [exportAdvancedOptionsView frame].size.height; - - [[self window] setFrame:frame display:YES animate:YES]; - } - - [exportTablelistScrollView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportTableListButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportTypeTabBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportOptionsTabBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportAdvancedOptionsViewButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportAdvancedOptionsViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - [exportAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - - NSInteger newMinHeight = (windowMinHeigth - heightOffset2 + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset2 + delta; - - [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; - - frame.origin.y += heightOffset2; - frame.size.height -= heightOffset2; - - heightOffset2 = delta; - - frame.origin.y -= heightOffset2; - frame.size.height += heightOffset2; - - [[self window] setFrame:frame display:YES animate:YES]; - - [exportTablelistScrollView setAutoresizingMask:scrollMask]; - [exportTableListButtonBar setAutoresizingMask:buttonBarMask]; - [exportTypeTabBar setAutoresizingMask:tabBarMask]; - [exportOptionsTabBar setAutoresizingMask:optionsTabBarMask]; - [exportAdvancedOptionsViewButton setAutoresizingMask:buttonMask]; - [exportAdvancedOptionsViewLabelButton setAutoresizingMask:textFieldMask]; - [exportAdvancedOptionsView setAutoresizingMask:advancedViewMask]; -} - @end diff --git a/Source/SPExportControllerDelegate.m b/Source/SPExportControllerDelegate.m index e8e9f1c6..23821d12 100644 --- a/Source/SPExportControllerDelegate.m +++ b/Source/SPExportControllerDelegate.m @@ -31,6 +31,7 @@ @interface SPExportController (SPExportControllerPrivateAPI) - (void)_toggleExportButtonOnBackgroundThread; +- (void)_toggleSQLExportTableNameTokenAvailability; - (void)_updateExportFormatInformation; - (void)_switchTab; @@ -55,6 +56,7 @@ { [[tables objectAtIndex:rowIndex] replaceObjectAtIndex:[exportTableList columnWithIdentifier:[tableColumn identifier]] withObject:anObject]; + [self updateAvailableExportFilenameTokens]; [self _toggleExportButtonOnBackgroundThread]; [self _updateExportFormatInformation]; } @@ -67,9 +69,9 @@ return (tableView == exportTableList); } -- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex { - [aCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + [cell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; } #pragma mark - @@ -102,23 +104,29 @@ */ - (NSArray *)tokenField:(NSTokenField *)tokenField shouldAddObjects:(NSArray *)tokens atIndex:(NSUInteger)index { - NSMutableArray *processedTokens = [NSMutableArray array]; NSUInteger i, j; + NSMutableArray *processedTokens = [NSMutableArray array]; NSCharacterSet *alphanumericSet = [NSCharacterSet alphanumericCharacterSet]; - for (NSString *inputToken in tokens) { + for (NSString *inputToken in tokens) + { j = 0; - for (i = 0; i < [inputToken length]; i++) { + + for (i = 0; i < [inputToken length]; i++) + { if (![alphanumericSet characterIsMember:[inputToken characterAtIndex:i]]) { if (i > j) { - [processedTokens addObject:[self tokenObjectForString:[inputToken substringWithRange:NSMakeRange(j, i-j)]]]; + [processedTokens addObject:[self tokenObjectForString:[inputToken substringWithRange:NSMakeRange(j, i - j)]]]; } + [processedTokens addObject:[inputToken substringWithRange:NSMakeRange(i, 1)]]; - j = i+1; + + j = i + 1; } } + if (j < i) { - [processedTokens addObject:[self tokenObjectForString:[inputToken substringWithRange:NSMakeRange(j, i-j)]]]; + [processedTokens addObject:[self tokenObjectForString:[inputToken substringWithRange:NSMakeRange(j, i - j)]]]; } } @@ -146,9 +154,9 @@ * During text entry into the token field, update the displayed filename and also * trigger tokenization after a short delay. */ -- (void)controlTextDidChange:(NSNotification *)aNotification +- (void)controlTextDidChange:(NSNotification *)notification { - if ([aNotification object] == exportCustomFilenameTokenField) { + if ([notification object] == exportCustomFilenameTokenField) { [self updateDisplayedExportFilename]; [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(tokenizeCustomFilenameTokenField) object:nil]; [self performSelector:@selector(tokenizeCustomFilenameTokenField) withObject:nil afterDelay:0.5]; diff --git a/Source/SPExportFile.m b/Source/SPExportFile.m index 10570a71..09d3b6af 100644 --- a/Source/SPExportFile.m +++ b/Source/SPExportFile.m @@ -26,7 +26,7 @@ #import "SPExportFile.h" #import "SPFileHandle.h" -@interface SPExportFile (PrivateAPI) +@interface SPExportFile () - (SPExportFileHandleStatus)_createFileHandle; @@ -104,6 +104,7 @@ if ([fileManager fileExistsAtPath:[self exportFilePath]]) { return [[NSFileManager defaultManager] removeItemAtPath:[self exportFilePath] error:nil]; } + return NO; } diff --git a/Source/SPExportFileUtilities.m b/Source/SPExportFileUtilities.m index 325ddb60..561c5340 100644 --- a/Source/SPExportFileUtilities.m +++ b/Source/SPExportFileUtilities.m @@ -29,7 +29,7 @@ #import "SPExportFile.h" #import "SPDatabaseDocument.h" #import "SPCustomQuery.h" -#import "SPMySQL.h" +#import typedef enum { diff --git a/Source/SPExportFilenameUtilities.m b/Source/SPExportFilenameUtilities.m index 31625a4c..ad5ab36b 100644 --- a/Source/SPExportFilenameUtilities.m +++ b/Source/SPExportFilenameUtilities.m @@ -54,11 +54,61 @@ } /** - * Updates the available export filename tokens. + * Updates the available export filename tokens based on the currently selected options. */ - (void)updateAvailableExportFilenameTokens { - [exportCustomFilenameTokensField setStringValue:((exportSource == SPQueryExport) || (exportType == SPDotExport)) ? NSLocalizedString(@"host,database,date,year,month,day,time", @"custom export filename tokens without table") : NSLocalizedString(@"host,database,table,date,year,month,day,time", @"default custom export filename tokens")]; + NSUInteger i = 0; + BOOL removeTable = NO; + + BOOL isSQL = exportType == SPSQLExport; + BOOL isCSV = exportType == SPCSVExport; + BOOL isDot = exportType == SPDotExport; + BOOL isXML = exportType == SPXMLExport; + + NSString *tokens = NSLocalizedString(@"host,database,table,date,year,month,day,time", @"default custom export filename tokens");; + NSString *tokensWithoutTable = NSLocalizedString(@"host,database,date,year,month,day,time", @"custom export filename tokens without table"); + + if (exportSource == SPQueryExport || isDot) { + tokens = tokensWithoutTable; + } + else if (isSQL || isCSV || isXML) { + for (NSArray *table in tables) + { + if ([NSArrayObjectAtIndex(table, 2) boolValue]) { + i++; + removeTable = YES; + + if (i == 2) break; + } + } + + if (i > 1) { + removeTable = isSQL ? YES : ![exportFilePerTableCheck state]; + + tokens = isSQL ? tokensWithoutTable : ([exportFilePerTableCheck state] ? tokens : tokensWithoutTable); + } + } + + if (removeTable) { + NSArray *tokenParts = [exportCustomFilenameTokenField objectValue]; + + for (id token in [exportCustomFilenameTokenField objectValue]) + { + if ([token isKindOfClass:[SPExportFileNameTokenObject class]]) { + if ([[token tokenContent] isEqualToString:NSLocalizedString(@"table", @"table")]) { + NSMutableArray *newTokens = [NSMutableArray arrayWithArray:tokenParts]; + + [newTokens removeObjectAtIndex:[tokenParts indexOfObject:token]]; + + [exportCustomFilenameTokenField setObjectValue:newTokens]; + break; + } + } + } + } + + [exportCustomFilenameTokensField setStringValue:tokens]; } /** @@ -69,7 +119,9 @@ { if ([[exportCustomFilenameTokensField objectValue] containsObject:stringToTokenize]) { SPExportFileNameTokenObject *newToken = [[SPExportFileNameTokenObject alloc] init]; + [newToken setTokenContent:stringToTokenize]; + return [newToken autorelease]; } @@ -78,6 +130,7 @@ /** * Tokenize the filename field. + * * This is called on a delay after text entry to update the tokens during text entry. * There's no API to perform tokenizing, but the same result can be achieved by using the return key; * however, this only works if the cursor is after text, not after a token. @@ -90,6 +143,7 @@ if ([exportCustomFilenameTokenField currentEditor] == nil) return; NSRange selectedRange = [[exportCustomFilenameTokenField currentEditor] selectedRange]; + if (selectedRange.location == NSNotFound) return; if (selectedRange.length > 0) return; @@ -98,10 +152,15 @@ // Walk through the strings - not the tokens - and determine whether any need tokenizing BOOL tokenizingRequired = NO; - for (id representedObject in representedObjects) { + + for (id representedObject in representedObjects) + { if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]]) continue; + NSArray *tokenParts = [representedObject componentsSeparatedByCharactersInSet:nonAlphanumericSet]; - for (NSString *tokenPart in tokenParts) { + + for (NSString *tokenPart in tokenParts) + { if ([validTokens containsObject:tokenPart]) { tokenizingRequired = YES; break; @@ -115,12 +174,16 @@ // Detect where the cursor is currently located. If it's at the end of a token, also return - // or the enter key would result in closing the sheet. NSUInteger stringPosition = 0; - for (id representedObject in representedObjects) { + + for (id representedObject in representedObjects) + { if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]]) { stringPosition++; - } else { + } + else { stringPosition += [(NSString *)representedObject length]; } + if (selectedRange.location <= stringPosition) { if ([representedObject isKindOfClass:[SPExportFileNameTokenObject class]]) return; break; @@ -128,7 +191,17 @@ } // All conditions met - synthesize the return key to trigger tokenization. - NSEvent *tokenizingEvent = [NSEvent keyEventWithType:NSKeyDown location:NSMakePoint(0,0) modifierFlags:0 timestamp:0 windowNumber:[[exportCustomFilenameTokenField window] windowNumber] context:[NSGraphicsContext currentContext] characters:nil charactersIgnoringModifiers:nil isARepeat:NO keyCode:0x24]; + NSEvent *tokenizingEvent = [NSEvent keyEventWithType:NSKeyDown + location:NSMakePoint(0,0) + modifierFlags:0 + timestamp:0 + windowNumber:[[exportCustomFilenameTokenField window] windowNumber] + context:[NSGraphicsContext currentContext] + characters:nil + charactersIgnoringModifiers:nil + isARepeat:NO + keyCode:0x24]; + [[NSApplication sharedApplication] postEvent:tokenizingEvent atStart:NO]; // Update the filename preview @@ -235,7 +308,6 @@ } else if ([tokenContent isEqualToString:NSLocalizedString(@"table", @"table")]) { [string appendString:(table) ? table : @""]; - } else if ([tokenContent isEqualToString:NSLocalizedString(@"date", @"export filename date token")]) { [dateFormatter setDateStyle:NSDateFormatterShortStyle]; @@ -259,7 +331,6 @@ [dateFormatter setDateStyle:NSDateFormatterNoStyle]; [dateFormatter setTimeStyle:NSDateFormatterShortStyle]; [string appendString:[dateFormatter stringFromDate:[NSDate date]]]; - } } else { diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m index 69a282b4..a0c0ef41 100644 --- a/Source/SPExportInitializer.m +++ b/Source/SPExportInitializer.m @@ -25,13 +25,13 @@ #import "SPExportInitializer.h" #import "SPTableData.h" +#import "SPTableContent.h" #import "SPDatabaseDocument.h" #import "SPTablesList.h" #import "SPGrowlController.h" #import "SPDatabaseDocument.h" #import "SPCustomQuery.h" #import "SPAlertSheets.h" - #import "SPCSVExporter.h" #import "SPSQLExporter.h" #import "SPXMLExporter.h" @@ -41,7 +41,8 @@ #import "SPExportFileUtilities.h" #import "SPExportFilenameUtilities.h" #import "SPExportFileNameTokenObject.h" -#import "SPMySQL.h" + +#import @implementation SPExportController (SPExportInitializer) @@ -97,10 +98,10 @@ switch (exportSource) { case SPFilteredExport: - dataArray = [tableContentInstance currentResult]; + dataArray = [tableContentInstance currentDataResultWithNULLs:YES hideBLOBs:NO]; break; case SPQueryExport: - dataArray = [customQueryInstance currentResult]; + dataArray = [customQueryInstance currentDataResultWithNULLs:YES truncateDataFields:NO]; break; case SPTableExport: // Create an array of tables to export @@ -210,9 +211,10 @@ // export, create the single file now and assign it to all subsequently created exporters. if ((![self exportToMultipleFiles]) || (exportSource == SPFilteredExport) || (exportSource == SPQueryExport)) { NSString *selectedTableName = nil; + if (exportSource == SPTableExport && [exportTables count] == 1) selectedTableName = [exportTables objectAtIndex:0]; - [exportFilename setString:(createCustomFilename) ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]]; + [exportFilename setString:createCustomFilename ? [self expandCustomFilenameFormatUsingTableName:selectedTableName] : [self generateDefaultExportFilename]]; // Only append the extension if necessary if (![[exportFilename pathExtension] length]) { diff --git a/Source/SPExportInterfaceController.h b/Source/SPExportInterfaceController.h new file mode 100644 index 00000000..dfcf8448 --- /dev/null +++ b/Source/SPExportInterfaceController.h @@ -0,0 +1,44 @@ +// +// $Id$ +// +// SPExportInterfaceController.h +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 31, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPExportController.h" + +/** + * @category SPExportInterfaceController SPExportInterfaceController.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * Export interface category. + */ +@interface SPExportController (SPExportInterfaceController) + +@end diff --git a/Source/SPExportInterfaceController.m b/Source/SPExportInterfaceController.m new file mode 100644 index 00000000..7c2615a4 --- /dev/null +++ b/Source/SPExportInterfaceController.m @@ -0,0 +1,152 @@ +// +// $Id$ +// +// SPExportInterfaceController.m +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 31, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPExportInterfaceController.h" + +@implementation SPExportController (SPExportInterfaceController) + +/** + * Resizes the export window's height by the supplied delta, while retaining the position of + * all interface controls to accommodate the custom filename view. + * + * @param delta The height delta for which the height should be adjusted for. + */ +- (void)_resizeWindowForCustomFilenameViewByHeightDelta:(NSInteger)delta +{ + NSUInteger popUpMask = [exportInputPopUpButton autoresizingMask]; + NSUInteger fileCheckMask = [exportFilePerTableCheck autoresizingMask]; + NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask]; + NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask]; + NSUInteger buttonMask = [exportCustomFilenameViewButton autoresizingMask]; + NSUInteger textFieldMask = [exportCustomFilenameViewLabelButton autoresizingMask]; + NSUInteger customFilenameViewMask = [exportCustomFilenameView autoresizingMask]; + NSUInteger tabBarMask = [exportOptionsTabBar autoresizingMask]; + + NSRect frame = [[self window] frame]; + + if (frame.size.height > 600 && delta > heightOffset1) { + frame.origin.y += [exportCustomFilenameView frame].size.height; + frame.size.height -= [exportCustomFilenameView frame].size.height; + + [[self window] setFrame:frame display:YES animate:YES]; + } + + [exportInputPopUpButton setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; + [exportFilePerTableCheck setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; + [exportTablelistScrollView setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; + [exportTableListButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; + [exportOptionsTabBar setAutoresizingMask:NSViewNotSizable | NSViewMaxYMargin]; + [exportCustomFilenameViewButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportCustomFilenameViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportCustomFilenameView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + + NSInteger newMinHeight = (windowMinHeigth - heightOffset1 + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset1 + delta; + + [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; + + frame.origin.y += heightOffset1; + frame.size.height -= heightOffset1; + + heightOffset1 = delta; + + frame.origin.y -= heightOffset1; + frame.size.height += heightOffset1; + + [[self window] setFrame:frame display:YES animate:YES]; + + [exportInputPopUpButton setAutoresizingMask:popUpMask]; + [exportFilePerTableCheck setAutoresizingMask:fileCheckMask]; + [exportTablelistScrollView setAutoresizingMask:scrollMask]; + [exportTableListButtonBar setAutoresizingMask:buttonBarMask]; + [exportCustomFilenameViewButton setAutoresizingMask:buttonMask]; + [exportCustomFilenameViewLabelButton setAutoresizingMask:textFieldMask]; + [exportCustomFilenameView setAutoresizingMask:customFilenameViewMask]; + [exportOptionsTabBar setAutoresizingMask:tabBarMask]; +} + +/** + * Resizes the export window's height by the supplied delta, while retaining the position of + * all interface controls to accommodate the advanced options view. + * + * @param delta The height delta for which the height should be adjusted for. + */ +- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta +{ + NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask]; + NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask]; + NSUInteger tabBarMask = [exportTypeTabBar autoresizingMask]; + NSUInteger optionsTabBarMask = [exportOptionsTabBar autoresizingMask]; + NSUInteger buttonMask = [exportAdvancedOptionsViewButton autoresizingMask]; + NSUInteger textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask]; + NSUInteger advancedViewMask = [exportAdvancedOptionsView autoresizingMask]; + + NSRect frame = [[self window] frame]; + + if (frame.size.height > 600 && delta > heightOffset2) { + frame.origin.y += [exportAdvancedOptionsView frame].size.height; + frame.size.height -= [exportAdvancedOptionsView frame].size.height; + + [[self window] setFrame:frame display:YES animate:YES]; + } + + [exportTablelistScrollView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportTableListButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportTypeTabBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportOptionsTabBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportAdvancedOptionsViewButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportAdvancedOptionsViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + + NSInteger newMinHeight = (windowMinHeigth - heightOffset2 + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset2 + delta; + + [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; + + frame.origin.y += heightOffset2; + frame.size.height -= heightOffset2; + + heightOffset2 = delta; + + frame.origin.y -= heightOffset2; + frame.size.height += heightOffset2; + + [[self window] setFrame:frame display:YES animate:YES]; + + [exportTablelistScrollView setAutoresizingMask:scrollMask]; + [exportTableListButtonBar setAutoresizingMask:buttonBarMask]; + [exportTypeTabBar setAutoresizingMask:tabBarMask]; + [exportOptionsTabBar setAutoresizingMask:optionsTabBarMask]; + [exportAdvancedOptionsViewButton setAutoresizingMask:buttonMask]; + [exportAdvancedOptionsViewLabelButton setAutoresizingMask:textFieldMask]; + [exportAdvancedOptionsView setAutoresizingMask:advancedViewMask]; +} + +@end diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index 9baaecab..23f3c426 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -33,7 +33,7 @@ #import "SPAlertSheets.h" #import "SPTableStructure.h" #import "SPServerSupport.h" -#import "SPMySQL.h" +#import static NSString *SPUpdateTableTypeCurrentType = @"SPUpdateTableTypeCurrentType"; static NSString *SPUpdateTableTypeNewType = @"SPUpdateTableTypeNewType"; @@ -90,12 +90,18 @@ static NSString *SPUpdateTableTypeNewType = @"SPUpdateTableTypeNewType"; // Check if the user selected the same type if ([currentType isEqualToString:newType]) return; - + + // If the table is empty, perform the change directly + if ([[[tableDataInstance statusValues] objectForKey:@"Rows"] isEqualToString:@"0"]) { + [self _changeCurrentTableTypeFrom:currentType to:newType]; + return; + } + NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Change table type", @"change table type message") defaultButton:NSLocalizedString(@"Change", @"change button") alternateButton:NSLocalizedString(@"Cancel", @"cancel button") otherButton:nil - informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to change this table's type to %@?\n\nPlease be aware that changing a table's type has the potential to cause the loss of some or all of it's data. This action cannot be undone.", @"change table type informative message"), newType]; + informativeTextWithFormat:NSLocalizedString(@"Are you sure you want to change this table's type to %@?\n\nPlease be aware that changing a table's type has the potential to cause the loss of some or all of its data. This action cannot be undone.", @"change table type informative message"), newType]; [alert setAlertStyle:NSCriticalAlertStyle]; @@ -610,16 +616,17 @@ static NSString *SPUpdateTableTypeNewType = @"SPUpdateTableTypeNewType"; if ([connection queryErrored]) { - // Reload the table's data - [tableDocumentInstance loadTable:selectedTable ofType:[tableDocumentInstance tableType]]; - } - else { [tableTypePopUpButton selectItemWithTitle:currentType]; SPBeginAlertSheet(NSLocalizedString(@"Error changing table type", @"error changing table type message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table type to '%@'.\n\nMySQL said: %@", @"error changing table type informative message"), newType, [connection lastErrorMessage]]); + + return; } + + // Reload the table's data + [tableDocumentInstance loadTable:selectedTable ofType:[tableDocumentInstance tableType]]; } /** diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index 549c994e..3a4ee14c 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -35,7 +35,7 @@ #include #import "SPCustomQuery.h" #import "SPTableContent.h" -#import "SPMySQLGeometryData.h" +#import @interface SPFieldEditorController (SPFieldEditorControllerDelegate) @@ -43,6 +43,10 @@ @end +#ifdef SP_REFACTOR +/* Suppress deprecation warning for beginSheetForDirectory: until Sequel Pro team can migrate */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif @implementation SPFieldEditorController @@ -1135,7 +1139,7 @@ NSUInteger bitValue = 0x1; for(i=0; i0; i--) { - [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]]; + [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]]; } [[self valueForKeyPath:@"bitSheetBitButton0"] setState:NSOffState]; break; case 4: // shift right for(i=0; i0; i--) { - [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]]; + [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]]; } [[self valueForKeyPath:@"bitSheetBitButton0"] setState:aBit]; break; case 6: // rotate right - aBit = [[self valueForKeyPath:@"bitSheetBitButton0"] state]; + aBit = [(NSButton*)[self valueForKeyPath:@"bitSheetBitButton0"] state]; for(i=0; i 64) ? 64 : maxTextLength); - if([sender state] == NSOnState) { + if([(NSButton*)sender state] == NSOnState) { for(i=0; i #define SP_NUMBER_OF_RECORDS_STRING NSLocalizedString(@"%ld of %@%lu records", @"Label showing the index of the selected CSV row") @@ -192,7 +192,7 @@ static NSString *SPTableViewSqlColumnID = @"sql"; showAdvancedView = NO; targetTableHasPrimaryKey = NO; - primaryKeyField = nil; + primaryKeyFields = nil; heightOffset = 0; [advancedReplaceView setHidden:YES]; [advancedUpdateView setHidden:YES]; @@ -225,7 +225,7 @@ static NSString *SPTableViewSqlColumnID = @"sql"; if (fieldMappingGlobalValues) [fieldMappingGlobalValues release]; if (fieldMappingGlobalValuesSQLMarked) [fieldMappingGlobalValuesSQLMarked release]; if (fieldMappingTableDefaultValues) [fieldMappingTableDefaultValues release]; - if (primaryKeyField) [primaryKeyField release]; + if (primaryKeyFields) [primaryKeyFields release]; if (toBeEditedRowIndexes) [toBeEditedRowIndexes release]; [super dealloc]; } @@ -293,7 +293,7 @@ static NSString *SPTableViewSqlColumnID = @"sql"; NSMutableArray *globals = [NSMutableArray array]; for(NSUInteger i=0; i < [fieldMappingGlobalValues count]; i++) { id glob = NSArrayObjectAtIndex(fieldMappingGlobalValues, i); - if([NSArrayObjectAtIndex(fieldMappingGlobalValuesSQLMarked, i) boolValue] || glob == [NSNull null]) + if([NSArrayObjectAtIndex(fieldMappingGlobalValuesSQLMarked, i) boolValue] || [glob isNSNull]) [globals addObject:glob]; else [globals addObject:[NSString stringWithFormat:@"'%@'", [(NSString*)glob stringByReplacingOccurrencesOfString:@"'" withString:@"\\'"]]]; @@ -567,8 +567,8 @@ static NSString *SPTableViewSqlColumnID = @"sql"; [fieldMappingTableDefaultValues addObject:@"0"]; } targetTableHasPrimaryKey = YES; - if (primaryKeyField) [primaryKeyField release]; - primaryKeyField = [[tableDetails objectForKey:@"primarykeyfield"] retain]; + if (primaryKeyFields) [primaryKeyFields release]; + primaryKeyFields = [[tableDetails objectForKey:@"primarykeyfield"] retain]; } else { if([column objectForKey:@"unique"]) { [type appendFormat:@",%@",@"UNIQUE"]; @@ -841,7 +841,7 @@ static NSString *SPTableViewSqlColumnID = @"sql"; } columnCounter = 0; for(id col in row) { - if(col && col != [NSNull null]) { + if(col && ![col isNSNull]) { if([col isKindOfClass:[NSString class]] && maxLengthOfSourceColumns[columnCounter] < (NSInteger)[(NSString*)col length]) { maxLengthOfSourceColumns[columnCounter] = [(NSString*)col length]; } @@ -1248,7 +1248,11 @@ static NSString *SPTableViewSqlColumnID = @"sql"; [onupdateCheckBox setEnabled:NO]; [onupdateTextView setEditable:YES]; [onupdateTextView setSelectedRange:NSMakeRange(0,[[onupdateTextView string] length])]; - [onupdateTextView insertText:[NSString stringWithFormat:@"%@ = %@", [primaryKeyField backtickQuotedString], [primaryKeyField backtickQuotedString]]]; + NSMutableArray *queryParts = [NSMutableArray arrayWithCapacity:[primaryKeyFields count]]; + for (NSString *eachFieldName in primaryKeyFields) { + [queryParts addObject:[NSString stringWithFormat:@"%@ = %@", [eachFieldName backtickQuotedString], [eachFieldName backtickQuotedString]]]; + } + [onupdateTextView insertText:[queryParts componentsJoinedByString:@" AND "]]; [onupdateTextView setBackgroundColor:[NSColor lightGrayColor]]; [onupdateTextView setEditable:NO]; } else { @@ -1487,7 +1491,7 @@ static NSString *SPTableViewSqlColumnID = @"sql"; fieldMappingArray = [[NSMutableArray alloc] init]; for (i = 0; i < [fieldMappingTableColumnNames count]; i++) { if (i < [NSArrayObjectAtIndex(fieldMappingImportArray, fieldMappingCurrentRow) count] - && NSArrayObjectAtIndex(NSArrayObjectAtIndex(fieldMappingImportArray, fieldMappingCurrentRow), i) != [NSNull null]) { + && ![NSArrayObjectAtIndex(NSArrayObjectAtIndex(fieldMappingImportArray, fieldMappingCurrentRow), i) isNSNull]) { value = i; } else { value = 0; diff --git a/Source/SPFileHandle.m b/Source/SPFileHandle.m index 3701fc8c..94c26211 100644 --- a/Source/SPFileHandle.m +++ b/Source/SPFileHandle.m @@ -414,7 +414,7 @@ } // Copy the data into a local buffer - NSData *dataToBeWritten = [NSData dataWithData:buffer]; + NSData *dataToBeWritten = [buffer copy]; [buffer setLength:0]; bufferDataLength = 0; pthread_mutex_unlock(&bufferLock); @@ -453,6 +453,8 @@ allDataWritten = YES; } pthread_mutex_unlock(&bufferLock); + + [dataToBeWritten release]; } [writePool drain]; diff --git a/Source/SPFontPreviewTextField.h b/Source/SPFontPreviewTextField.h index f6383f77..edadbab0 100644 --- a/Source/SPFontPreviewTextField.h +++ b/Source/SPFontPreviewTextField.h @@ -4,9 +4,6 @@ // SPFontPreviewTextField.h // sequel-pro // -// This is a heavily modified version of JVFontPreviewField from -// the Colloquy Project -// // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or @@ -24,9 +21,6 @@ // More info at @interface SPFontPreviewTextField : NSTextField -{ - NSFont *_actualFont; -} - (void)setFont:(NSFont *)font; diff --git a/Source/SPFontPreviewTextField.m b/Source/SPFontPreviewTextField.m index 90e9f93f..60243233 100644 --- a/Source/SPFontPreviewTextField.m +++ b/Source/SPFontPreviewTextField.m @@ -4,9 +4,6 @@ // SPFontPreviewTextField.m // sequel-pro // -// This is a heavily modified version of JVFontPreviewField from -// the Colloquy Project -// // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or @@ -27,37 +24,39 @@ @implementation SPFontPreviewTextField -- (void)setFont:(NSFont *)font +/** + * Add a method to set the font to use for the preview. The font metrics + * are applied to the textField, and the font name is displayed in the textField + * for an easy preview. + */ +- (void)setFont:(NSFont *)theFont { - if (!font) return; - - if (_actualFont) [_actualFont release]; - - _actualFont = [font retain]; - [super setFont:[[NSFontManager sharedFontManager] convertFont:font toSize:11.0f]]; + // If no font was supplied, clear the preview + if (!theFont) { + [self setObjectValue:@""]; + return; + } - NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[_actualFont displayName]]; - NSMutableParagraphStyle *paraStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; + // Take the supplied font and apply all its traits except for a standardised + // font size to the text field + NSFont *displayFont = [[NSFontManager sharedFontManager] convertFont:theFont toSize:11.0f]; + [super setFont:displayFont]; - [paraStyle setMinimumLineHeight:NSHeight([self bounds])]; - [paraStyle setMaximumLineHeight:NSHeight([self bounds])]; - - [text addAttribute:NSParagraphStyleAttributeName value:paraStyle range:NSMakeRange(0, [text length])]; + // Set up a paragraph style for display, setting bounds and display settings + NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle new] autorelease]; + [paragraphStyle setAlignment:NSNaturalTextAlignment]; + [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingMiddle]; + [paragraphStyle setMaximumLineHeight:NSHeight([self bounds]) + [displayFont descender]]; - [self setObjectValue:text]; - - [text release]; - [paraStyle release]; -} + // Set up the text to display - the font display name and the point size. + NSMutableAttributedString *displayString = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@, %.1f pt", [theFont displayName], [theFont pointSize]]]; -#pragma mark - + // Apply the paragraph style + [displayString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [displayString length])]; -- (void)dealloc -{ - if (_actualFont) [_actualFont release], _actualFont = nil; - - [super dealloc]; + // Update the display + [self setObjectValue:displayString]; } @end diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m index 3bd3b0b3..2729397c 100644 --- a/Source/SPHistoryController.m +++ b/Source/SPHistoryController.m @@ -267,7 +267,7 @@ NSString *contentSortCol = [tableContentInstance sortColumnName]; BOOL contentSortColIsAsc = [tableContentInstance sortColumnIsAscending]; NSUInteger contentPageNumber = [tableContentInstance pageNumber]; - NSIndexSet *contentSelectedIndexSet = [tableContentInstance selectedRowIndexes]; + NSDictionary *contentSelectedRows = [tableContentInstance selectionDetailsAllowingIndexSelection:YES]; NSRect contentViewport = [tableContentInstance viewport]; NSDictionary *contentFilter = [tableContentInstance filterSettings]; NSData *filterTableData = [tableContentInstance filterTableData]; @@ -283,7 +283,7 @@ [NSNumber numberWithBool:contentSortColIsAsc], @"sortIsAsc", nil]; if (contentSortCol) [contentState setObject:contentSortCol forKey:@"sortCol"]; - if (contentSelectedIndexSet) [contentState setObject:contentSelectedIndexSet forKey:@"selection"]; + if (contentSelectedRows) [contentState setObject:contentSelectedRows forKey:@"selection"]; if (contentFilter) [contentState setObject:contentFilter forKey:@"filter"]; if (filterTableData) [contentState setObject:filterTableData forKey:@"filterTable"]; @@ -322,7 +322,7 @@ || ![[currentHistoryEntry objectForKey:@"contentFilter"] isEqualToDictionary:contentFilter]))) { [currentHistoryEntry setObject:[NSValue valueWithRect:contentViewport] forKey:@"contentViewport"]; - if (contentSelectedIndexSet) [currentHistoryEntry setObject:contentSelectedIndexSet forKey:@"contentSelectedIndexSet"]; + if (contentSelectedRows) [currentHistoryEntry setObject:contentSelectedRows forKey:@"contentSelection"]; // Special case: if the last history item is currently active, and has no table, // but the new selection does - delete the last entry, in order to replace it. @@ -344,7 +344,7 @@ [NSValue valueWithRect:contentViewport], @"contentViewport", nil]; if (contentSortCol) [newEntry setObject:contentSortCol forKey:@"contentSortCol"]; - if (contentSelectedIndexSet) [newEntry setObject:contentSelectedIndexSet forKey:@"contentSelectedIndexSet"]; + if (contentSelectedRows) [newEntry setObject:contentSelectedRows forKey:@"contentSelection"]; if (contentFilter) [newEntry setObject:contentFilter forKey:@"contentFilter"]; [history addObject:newEntry]; @@ -397,7 +397,7 @@ // Set table content details for restore [tableContentInstance setSortColumnNameToRestore:[historyEntry objectForKey:@"contentSortCol"] isAscending:[[historyEntry objectForKey:@"contentSortColIsAsc"] boolValue]]; [tableContentInstance setPageToRestore:[[historyEntry objectForKey:@"contentPageNumber"] integerValue]]; - [tableContentInstance setSelectedRowIndexesToRestore:[historyEntry objectForKey:@"contentSelectedIndexSet"]]; + [tableContentInstance setSelectionToRestore:[historyEntry objectForKey:@"contentSelection"]]; [tableContentInstance setViewportToRestore:[[historyEntry objectForKey:@"contentViewport"] rectValue]]; [tableContentInstance setFiltersToRestore:[historyEntry objectForKey:@"contentFilter"]]; @@ -514,7 +514,7 @@ // Restore the content view state [tableContentInstance setSortColumnNameToRestore:[contentState objectForKey:@"sortCol"] isAscending:[[contentState objectForKey:@"sortIsAsc"] boolValue]]; [tableContentInstance setPageToRestore:[[contentState objectForKey:@"page"] unsignedIntegerValue]]; - [tableContentInstance setSelectedRowIndexesToRestore:[contentState objectForKey:@"selection"]]; + [tableContentInstance setSelectionToRestore:[contentState objectForKey:@"selection"]]; [tableContentInstance setViewportToRestore:[[contentState objectForKey:@"viewport"] rectValue]]; [tableContentInstance setFiltersToRestore:[contentState objectForKey:@"filter"]]; } diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m index def31ea2..44de06c8 100644 --- a/Source/SPIndexesController.m +++ b/Source/SPIndexesController.m @@ -28,7 +28,7 @@ #import "SPServerSupport.h" #import "SPTableContent.h" #import "SPTableData.h" -#import "SPMySQL.h" +#import #import "SPDatabaseDocument.h" #import "SPTablesList.h" #import "SPTableView.h" @@ -176,22 +176,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize"; // Check to see whether a primary key already exists for the table, and if so select INDEX instead for (NSDictionary *field in fields) { - BOOL hasCompositePrimaryKey = NO; - BOOL isPrimaryKey = [[field objectForKey:@"isprimarykey"] boolValue]; - - // The 'isprimarykey' key of a field is only present for single column primary keys, not composite keys, - // so we need to check the indexes manually. - if (!isPrimaryKey) { - for (NSDictionary *index in indexes) - { - if ([[index objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"]) { - hasCompositePrimaryKey = YES; - break; - } - } - } - - if (isPrimaryKey || hasCompositePrimaryKey) { + if ([[field objectForKey:@"isprimarykey"] boolValue]) { // Hide primary key option [[[indexTypePopUpButton menu] itemWithTag:SPPrimaryKeyMenuTag] setHidden:YES]; diff --git a/Source/SPLogger.m b/Source/SPLogger.m index 40bcaa69..8b808d39 100644 --- a/Source/SPLogger.m +++ b/Source/SPLogger.m @@ -33,10 +33,11 @@ static SPLogger *logger = nil; -@interface SPLogger (PrivateAPI) +@interface SPLogger () - (void)_initLogFile; - (void)_outputTimeString; + int _isSPLeaksLog(struct direct *entry); @end diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index 4dc2711d..db3f5e3a 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -153,11 +153,11 @@ - (void)dealloc { [NSObject cancelPreviousPerformRequestsWithTarget:self]; - if(stateTimer != nil) { + if (stateTimer != nil) { [stateTimer invalidate]; [stateTimer release]; + stateTimer = nil; } - stateTimer = nil; if (staticPrefix) [staticPrefix release]; [mutablePrefix release]; [textualInputCharacters release]; @@ -178,6 +178,7 @@ if (stateTimer != nil) { [stateTimer invalidate]; [stateTimer release]; + stateTimer = nil; } closeMe = YES; diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m index 2b27a598..54f817cc 100644 --- a/Source/SPNavigatorController.m +++ b/Source/SPNavigatorController.m @@ -33,7 +33,7 @@ #import "SPTooltip.h" #import "SPAppController.h" #import "SPDatabaseViewController.h" -#import "SPMySQL.h" +#import #import "SPDatabaseStructure.h" #import @@ -581,10 +581,10 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte { // Reset everything for current active doc connection - id doc = [[NSApp delegate] frontDocument]; - if(!doc) return; + SPDatabaseDocument *doc = [[NSApp delegate] frontDocument]; + if (!doc) return; NSString *connectionID = [doc connectionID]; - if(!connectionID || [connectionID length] < 2) return; + if (!connectionID || [connectionID length] < 2) return; [searchField setStringValue:@""]; [schemaDataFiltered removeAllObjects]; @@ -600,8 +600,8 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte [syncButton setState:NSOffState]; isFiltered = NO; - if(![[doc valueForKeyPath:@"mySQLConnection"] isConnected]) return; - [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[doc valueForKeyPath:@"mySQLConnection"] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; + if (![[doc getConnection] isConnected]) return; + [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[doc databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; } diff --git a/Source/SPPrintController.m b/Source/SPPrintController.m index ad297fee..a3a0a343 100644 --- a/Source/SPPrintController.m +++ b/Source/SPPrintController.m @@ -251,7 +251,7 @@ // Table content view else if ([tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]] == 1) { - NSArray *data = [tableContentInstance currentDataResultWithNULLs:NO]; + NSArray *data = [tableContentInstance currentDataResultWithNULLs:NO hideBLOBs:YES]; heading = NSLocalizedString(@"Table Content", @"table content print heading"); diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m index c8e1f312..5b68586d 100644 --- a/Source/SPProcessListController.m +++ b/Source/SPProcessListController.m @@ -27,7 +27,7 @@ #import "SPDatabaseDocument.h" #import "SPAlertSheets.h" #import "SPAppController.h" -#import "SPMySQL.h" +#import // Constants static NSString *SPKillProcessQueryMode = @"SPKillProcessQueryMode"; @@ -799,12 +799,12 @@ static NSString *SPTableViewIDColumnIdentifier = @"Id"; // Perform filtering for (NSDictionary *process in processes) { - if (([[process objectForKey:@"Id"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || + if (([[[process objectForKey:@"Id"] stringValue] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || ([[process objectForKey:@"User"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || ([[process objectForKey:@"Host"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || ((![[process objectForKey:@"db"] isNSNull]) && ([[process objectForKey:@"db"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound)) || ([[process objectForKey:@"Command"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || - ([[process objectForKey:@"Time"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || + ([[[process objectForKey:@"Time"] stringValue] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound) || ((![[process objectForKey:@"State"] isNSNull]) && ([[process objectForKey:@"State"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound)) || ((![[process objectForKey:@"Info"] isNSNull]) && ([[process objectForKey:@"Info"] rangeOfString:filterString options:NSCaseInsensitiveSearch].location != NSNotFound))) { diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m index 6c425bc7..8a2a5902 100644 --- a/Source/SPQueryController.m +++ b/Source/SPQueryController.m @@ -403,6 +403,7 @@ static SPQueryController *sharedQueryController = nil; #endif } +#ifndef SP_REFACTOR /** * Return the AutoSaveName of the Query Console. */ @@ -410,6 +411,7 @@ static SPQueryController *sharedQueryController = nil; { return SPQueryConsoleWindowAutoSaveName; } +#endif /** * Updates the filtered result set based on any filter string and whether or not diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m index 1b5ce3dc..625f9855 100644 --- a/Source/SPQueryFavoriteManager.m +++ b/Source/SPQueryFavoriteManager.m @@ -38,6 +38,8 @@ #define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]") #define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]") +#define SP_Int(x) [NSNumber numberWithInteger:x] + @interface SPQueryFavoriteManager (Private) - (void)_initWithNoSelection; @@ -285,6 +287,7 @@ */ - (IBAction)saveFavoriteToFile:(id)sender { +#ifndef SP_REFACTOR NSSavePanel *panel = [NSSavePanel savePanel]; [panel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionSQL]]; @@ -294,17 +297,17 @@ [panel setCanSelectHiddenExtension:YES]; [panel setCanCreateDirectories:YES]; -#ifndef SP_REFACTOR [panel setAccessoryView:[SPEncodingPopupAccessory encodingAccessory:[prefs integerForKey:SPLastSQLFileEncoding] includeDefaultEntry:NO encodingPopUp:&encodingPopUp]]; -#endif [encodingPopUp setEnabled:YES]; [panel beginSheetForDirectory:nil file:[favoriteNameTextField stringValue] modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"saveQuery"]; +#endif } - (IBAction)exportFavorites:(id)sender { +#ifndef SP_REFACTOR NSSavePanel *panel = [NSSavePanel savePanel]; [panel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionDefault]]; @@ -315,10 +318,12 @@ [panel setCanCreateDirectories:YES]; [panel beginSheetForDirectory:nil file:nil modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:@"exportFavorites"]; +#endif } - (IBAction)importFavoritesByAdding:(id)sender { +#ifndef SP_REFACTOR NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setCanSelectHiddenExtension:YES]; [panel setDelegate:self]; @@ -333,6 +338,7 @@ modalDelegate:self didEndSelector:@selector(importPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL]; +#endif } - (IBAction)importFavoritesByReplacing:(id)sender @@ -345,7 +351,70 @@ */ - (IBAction)insertPlaceholder:(id)sender { - NSString *placeholder = [[[sender selectedItem] toolTip] substringToIndex:[[[sender selectedItem] toolTip] rangeOfString:@" – "].location]; + + // Look up the sender's tag to determine the placeholder to insert. + // Note that tag values alter behaviour slightly - see below. + NSDictionary *lookupTable = [NSDictionary dictionaryWithObjectsAndKeys: + NSLocalizedString(@"default_value", @"Query snippet default value placeholder"), SP_Int(100), + NSLocalizedString(@"$(shell_command)", @"Query snippet shell command syntax and placeholder"), SP_Int(101), + @"$1", SP_Int(501), + @"¦a¦b¦", SP_Int(102), + @"¦¦a¦b¦¦", SP_Int(103), + @"¦", SP_Int(104), + @"$SP_SELECTED_TABLE", SP_Int(105), + @"$SP_SELECTED_TABLES", SP_Int(106), + @"$SP_SELECTED_DATABASE", SP_Int(107), + @"¦$SP_ASLIST_ALL_FIELDS¦", SP_Int(108), + @"¦¦$SP_ASLIST_ALL_FIELDS¦¦", SP_Int(109), + @"¦$SP_ASLIST_ALL_TABLES¦", SP_Int(110), + @"¦¦$SP_ASLIST_ALL_TABLES¦¦", SP_Int(111), + @"¦$SP_ASLIST_ALL_DATABASES¦", SP_Int(112), + @"¦¦$SP_ASLIST_ALL_DATABASES¦¦", SP_Int(113), + nil]; + NSString *placeholder = [lookupTable objectForKey:SP_Int([[sender selectedItem] tag])]; + if (!placeholder) [NSException raise:NSInternalInconsistencyException format:@"Inserted placeholder (%lld) not found", (long long)[[sender selectedItem] tag]]; + + // Iterate through the current snippets, to get the lowest unused tab counter, and + // to determine whether the current selection is inside a tab snippet or not + NSMutableDictionary *snippetNumbers = [NSMutableDictionary dictionary]; + BOOL selectionInsideSnippet = NO; + NSUInteger rangeStart = 0; + NSString *queryString = [[favoriteQueryTextView textStorage] string]; + NSRange selRange = [favoriteQueryTextView selectedRange]; + NSString *snipRegex = @"(?s)(? matchedRange.location + 1 + && selRange.location + selRange.length < matchedRange.location + matchedRange.length) + { + selectionInsideSnippet = YES; + } + + // Identify the tab completion index + NSRange snippetNumberRange = [queryString rangeOfRegex:snipRegex options:RKLNoOptions inRange:matchedRange capture:1L error:NULL]; + NSInteger snippetNumber = [[queryString substringWithRange:snippetNumberRange] integerValue]; + [snippetNumbers setObject:[NSNumber numberWithBool:YES] forKey:[NSNumber numberWithInteger:snippetNumber]]; + + rangeStart = matchedRange.location + matchedRange.length; + } + + // If the selection is not inside a snippet, wrap it inside the snippet syntax. + // Never do this for items with a tag above 500: these are not permitted inside a snippet. + if (!selectionInsideSnippet && [[sender selectedItem] tag] < 500) { + + // Work out the lowest unused tab counter to use + NSInteger snippetNumber = 0; + while ([snippetNumbers objectForKey:[NSNumber numberWithInteger:snippetNumber]]) { + snippetNumber++; + } + + placeholder = [NSString stringWithFormat:@"${%lld:%@}", (long long)snippetNumber, placeholder]; + } + [favoriteQueryTextView insertText:placeholder]; } @@ -740,6 +809,7 @@ */ - (void)importPanelDidEnd:(NSOpenPanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { +#ifndef SP_REFACTOR if (returnCode == NSOKButton) { @@ -798,6 +868,7 @@ } } } +#endif } @@ -806,15 +877,14 @@ */ - (void)savePanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { +#ifndef SP_REFACTOR if([contextInfo isEqualToString:@"saveQuery"]) { if (returnCode == NSOKButton) { NSError *error = nil; -#ifndef SP_REFACTOR [prefs setInteger:[[encodingPopUp selectedItem] tag] forKey:SPLastSQLFileEncoding]; [prefs synchronize]; -#endif [[favoriteQueryTextView string] writeToURL:[panel URL] atomically:YES encoding:[[encodingPopUp selectedItem] tag] error:&error]; @@ -866,6 +936,7 @@ } } +#endif } - (void)_initWithNoSelection diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index 607f34d5..dab27872 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -29,7 +29,7 @@ #import "SPExportUtilities.h" #import "SPExportFile.h" #import "SPTableData.h" -#import "SPMySQL.h" +#import @interface SPSQLExporter (PrivateAPI) @@ -106,7 +106,6 @@ NSMutableArray *funcs = [NSMutableArray array]; NSMutableString *metaString = [NSMutableString string]; - NSMutableString *cellValue = [NSMutableString string]; NSMutableString *errors = [[NSMutableString alloc] init]; NSMutableString *sqlString = [[NSMutableString alloc] init]; @@ -280,6 +279,8 @@ { // Check for cancellation flag if ([self isCancelled]) { + [errors release]; + [sqlString release]; [pool release]; return; } @@ -338,50 +339,58 @@ [streamingResult cancelResultLoad]; [streamingResult release]; [sqlExportPool release]; + [errors release]; + [sqlString release]; [pool release]; - + return; } - + j++; k++; - + [sqlString setString:@""]; - - // Update the progress + + // Update the progress NSUInteger progress = (NSUInteger)(j * ([self exportMaxProgress] / rowCount)); - + if (progress > lastProgressValue) { [self setExportProgressValue:progress]; lastProgressValue = progress; - + // Inform the delegate that the export's progress has been updated [delegate performSelectorOnMainThread:@selector(sqlExportProcessProgressUpdated:) withObject:self waitUntilDone:NO]; } - - for (t = 0; t < colCount; t++) + + for (t = 0; t < colCount; t++) { // Check for cancellation flag if ([self isCancelled]) { + [connection cancelCurrentQuery]; + [streamingResult cancelResultLoad]; + [streamingResult release]; [sqlExportPool release]; + [errors release]; + [sqlString release]; [pool release]; - + return; } - + id object = NSArrayObjectAtIndex(row, t); - - // Add NULL values directly to the output row + + // Add NULL values directly to the output row; use a pointer comparison to the singleton + // instance for speed. if (object == [NSNull null]) { [sqlString appendString:@"NULL"]; - } + } // If the field is off type BIT, the values need a binary prefix of b'x'. else if ([[NSArrayObjectAtIndex([tableDetails objectForKey:@"columns"], t) objectForKey:@"type"] isEqualToString:@"BIT"]) { [sqlString appendFormat:@"b'%@'", [object description]]; } // Add data types directly as hex data else if ([object isKindOfClass:[NSData class]]) { - + if ([self sqlOutputEncodeBLOBasHex]) { [sqlString appendString:[connection escapeAndQuoteData:object]]; } @@ -407,19 +416,18 @@ [sqlString appendString:[connection escapeAndQuoteData:[object data]]]; } else { - [cellValue setString:[object description]]; // Add empty strings as a pair of quotes - if ([cellValue length] == 0) { + if ([object length] == 0) { [sqlString appendString:@"''"]; } else { if ([NSArrayObjectAtIndex(tableColumnNumericStatus, t) boolValue]) { - [sqlString appendString:cellValue]; + [sqlString appendString:object]; } // Otherwise add a quoted string with special characters escaped else { - [sqlString appendString:[connection escapeAndQuoteString:cellValue]]; + [sqlString appendString:[connection escapeAndQuoteString:object]]; } } } @@ -486,56 +494,59 @@ } } } + + // Add triggers if the structure export was enabled + if (sqlOutputIncludeStructure) { + queryResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW TRIGGERS WHERE `Table` = %@ */", [tableName tickQuotedString]]]; - queryResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW TRIGGERS WHERE `Table` = %@ */;", [tableName tickQuotedString]]]; - - [queryResult setReturnDataAsStrings:YES]; - - if ([queryResult numberOfRows]) { - - [metaString setString:@"\n"]; - [metaString appendString:@"DELIMITER ;;\n"]; + [queryResult setReturnDataAsStrings:YES]; - for (s = 0; s < [queryResult numberOfRows]; s++) - { - // Check for cancellation flag - if ([self isCancelled]) { - [errors release]; - [sqlString release]; - [pool release]; - return; + if ([queryResult numberOfRows]) { + + [metaString setString:@"\n"]; + [metaString appendString:@"DELIMITER ;;\n"]; + + for (s = 0; s < [queryResult numberOfRows]; s++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [errors release]; + [sqlString release]; + [pool release]; + return; + } + + NSDictionary *triggers = [[NSDictionary alloc] initWithDictionary:[queryResult getRowAsDictionary]]; + + // Definer is user@host but we need to escape it to `user`@`host` + NSArray *triggersDefiner = [[triggers objectForKey:@"Definer"] componentsSeparatedByString:@"@"]; + + [metaString appendFormat:@"/*!50003 SET SESSION SQL_MODE=\"%@\" */;;\n/*!50003 CREATE */ ", [triggers objectForKey:@"sql_mode"]]; + [metaString appendFormat:@"/*!50017 DEFINER=%@@%@ */ /*!50003 TRIGGER %@ %@ %@ ON %@ FOR EACH ROW %@ */;;\n", + [NSArrayObjectAtIndex(triggersDefiner, 0) backtickQuotedString], + [NSArrayObjectAtIndex(triggersDefiner, 1) backtickQuotedString], + [[triggers objectForKey:@"Trigger"] backtickQuotedString], + [triggers objectForKey:@"Timing"], + [triggers objectForKey:@"Event"], + [[triggers objectForKey:@"Table"] backtickQuotedString], + [triggers objectForKey:@"Statement"] + ]; + + [triggers release]; } - NSDictionary *triggers = [[NSDictionary alloc] initWithDictionary:[queryResult getRowAsDictionary]]; + [metaString appendString:@"DELIMITER ;\n/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;\n"]; - // Definer is user@host but we need to escape it to `user`@`host` - NSArray *triggersDefiner = [[triggers objectForKey:@"Definer"] componentsSeparatedByString:@"@"]; - - [metaString appendFormat:@"/*!50003 SET SESSION SQL_MODE=\"%@\" */;;\n/*!50003 CREATE */ ", [triggers objectForKey:@"sql_mode"]]; - [metaString appendFormat:@"/*!50017 DEFINER=%@@%@ */ /*!50003 TRIGGER %@ %@ %@ ON %@ FOR EACH ROW %@ */;;\n", - [NSArrayObjectAtIndex(triggersDefiner, 0) backtickQuotedString], - [NSArrayObjectAtIndex(triggersDefiner, 1) backtickQuotedString], - [[triggers objectForKey:@"Trigger"] backtickQuotedString], - [triggers objectForKey:@"Timing"], - [triggers objectForKey:@"Event"], - [[triggers objectForKey:@"Table"] backtickQuotedString], - [triggers objectForKey:@"Statement"] - ]; - - [triggers release]; + [[self exportOutputFile] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; } - [metaString appendString:@"DELIMITER ;\n/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;\n"]; - - [[self exportOutputFile] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; - } - - if ([connection queryErrored]) { - [errors appendFormat:@"%@\n", [connection lastErrorMessage]]; - - if ([self sqlOutputIncludeErrors]) { - [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"# Error: %@\n", [connection lastErrorMessage]] - dataUsingEncoding:NSUTF8StringEncoding]]; + if ([connection queryErrored]) { + [errors appendFormat:@"%@\n", [connection lastErrorMessage]]; + + if ([self sqlOutputIncludeErrors]) { + [[self exportOutputFile] writeData:[[NSString stringWithFormat:@"# Error: %@\n", [connection lastErrorMessage]] + dataUsingEncoding:NSUTF8StringEncoding]]; + } } } @@ -583,7 +594,7 @@ if ([items count] == 0) continue; // Retrieve the definitions - queryResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW %@ STATUS WHERE `Db` = %@ */;", procedureType, + queryResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW %@ STATUS WHERE `Db` = %@ */", procedureType, [[self sqlDatabaseName] tickQuotedString]]]; [queryResult setReturnDataAsStrings:YES]; @@ -658,7 +669,7 @@ [NSArrayObjectAtIndex(procedureDefiner, 1) backtickQuotedString] ]; - SPMySQLResult *createProcedureResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW CREATE %@ %@ */;;", procedureType, + SPMySQLResult *createProcedureResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW CREATE %@ %@ */", procedureType, [procedureName backtickQuotedString]]]; [createProcedureResult setReturnDataAsStrings:YES]; if ([connection queryErrored]) { @@ -824,7 +835,8 @@ // Provide the field default if appropriate if ([column objectForKey:@"default"]) { - // Some MySQL server versions show a default of NULL for NOT NULL columns - don't export those + // Some MySQL server versions show a default of NULL for NOT NULL columns - don't export those. + // Check against the NSNull singleton instance for speed. if ([column objectForKey:@"default"] == [NSNull null]) { if ([[column objectForKey:@"null"] integerValue]) { [fieldString appendString:@" DEFAULT NULL"]; @@ -862,6 +874,7 @@ [sqlDatabaseName release], sqlDatabaseName = nil; [sqlExportCurrentTable release], sqlExportCurrentTable = nil; [sqlDatabaseVersion release], sqlDatabaseVersion = nil; + [sqlExportErrors release], sqlExportErrors = nil; [super dealloc]; } diff --git a/Source/SPSSHTunnel.h b/Source/SPSSHTunnel.h index 231a41a6..0984cd43 100644 --- a/Source/SPSSHTunnel.h +++ b/Source/SPSSHTunnel.h @@ -23,8 +23,8 @@ // // More info at -#import "SPMySQLConnectionProxy.h" -#import "SPMySQLConstants.h" +#import +#import @interface SPSSHTunnel : NSObject { diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m index 1d4870b2..aae71891 100644 --- a/Source/SPSSHTunnel.m +++ b/Source/SPSSHTunnel.m @@ -27,7 +27,7 @@ #import "RegexKitLite.h" #import "SPKeychain.h" #import "SPAlertSheets.h" -#import "SPMySQL.h" +#import #import diff --git a/Source/SPServerSupport.h b/Source/SPServerSupport.h index fd4535a2..ee75af31 100644 --- a/Source/SPServerSupport.h +++ b/Source/SPServerSupport.h @@ -59,6 +59,7 @@ // User account related BOOL supportsCreateUser; + BOOL supportsRenameUser; BOOL supportsDropUser; BOOL supportsFullDropUser; BOOL supportsUserMaxVars; @@ -152,6 +153,11 @@ */ @property (readonly) BOOL supportsCreateUser; +/** + * @property supportsRenameUser Indicates if the server supports the RENAME USER statement + */ +@property (readonly) BOOL supportsRenameUser; + /** * @property supportsDropUser Indicates if the server supports the DROP USER statement */ diff --git a/Source/SPServerSupport.m b/Source/SPServerSupport.m index 3d38ff79..5ddfbaf6 100644 --- a/Source/SPServerSupport.m +++ b/Source/SPServerSupport.m @@ -50,6 +50,7 @@ @synthesize supportsCharacterSetDatabaseVar; @synthesize supportsPost41CharacterSetHandling; @synthesize supportsCreateUser; +@synthesize supportsRenameUser; @synthesize supportsDropUser; @synthesize supportsFullDropUser; @synthesize supportsUserMaxVars; @@ -141,6 +142,9 @@ // The CREATE USER statement wasn't added until MySQL 5.0.2 supportsCreateUser = [self isEqualToOrGreaterThanMajorVersion:5 minor:0 release:2]; + // The RENAME USER statement wasn't added until MySQL 5.0.2 + supportsRenameUser = [self isEqualToOrGreaterThanMajorVersion:5 minor:0 release:2]; + // The DROP USER statement wasn't added until MySQL 4.1.1 supportsDropUser = [self isEqualToOrGreaterThanMajorVersion:4 minor:1 release:1]; @@ -249,6 +253,7 @@ supportsCharacterSetDatabaseVar = NO; supportsPost41CharacterSetHandling = NO; supportsCreateUser = NO; + supportsRenameUser = NO; supportsDropUser = NO; supportsFullDropUser = NO; supportsUserMaxVars = NO; diff --git a/Source/SPServerVariablesController.m b/Source/SPServerVariablesController.m index 50f03e31..4cb85e5c 100644 --- a/Source/SPServerVariablesController.m +++ b/Source/SPServerVariablesController.m @@ -26,7 +26,7 @@ #import "SPServerVariablesController.h" #import "SPDatabaseDocument.h" #import "SPAppController.h" -#import "SPMySQL.h" +#import @interface SPServerVariablesController (PrivateAPI) diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h index a95dbae3..7e77c749 100644 --- a/Source/SPTableContent.h +++ b/Source/SPTableContent.h @@ -25,8 +25,22 @@ // // More info at -@class SPDatabaseDocument, SPCopyTable, SPTextAndLinkCell, SPHistoryController, SPTableInfo, SPDataStorage, SPTextView, SPFieldEditorController, SPMySQLConnection, SPMySQLFastStreamingResult; -@class SPTableData, SPDatabaseDocument, SPTablesList, SPTableStructure, SPTableList, SPContentFilterManager; +@class SPDatabaseDocument, + SPCopyTable, + SPTextAndLinkCell, + SPHistoryController, + SPTableInfo, + SPDataStorage, + SPTextView, + SPFieldEditorController, + SPMySQLConnection, + SPMySQLFastStreamingResult, + SPTableData, + SPDatabaseDocument, + SPTablesList, + SPTableStructure, + SPTableList, + SPContentFilterManager; @interface SPTableContent : NSObject #ifdef SP_REFACTOR @@ -129,7 +143,7 @@ BOOL tableRowsSelectable; NSString *sortColumnToRestore; NSUInteger pageToRestore; - NSIndexSet *selectionIndexToRestore; + NSDictionary *selectionToRestore; NSRect selectionViewportToRestore; NSString *filterFieldToRestore, *filterComparisonToRestore, *filterValueToRestore, *firstBetweenValueToRestore, *secondBetweenValueToRestore; @@ -155,35 +169,57 @@ NSRange fieldEditorSelectedRange; } +#ifdef SP_REFACTOR /* glue */ +@property (assign) id filterButton; +@property (assign) id fieldField; +@property (assign) id compareField; +@property (assign) id betweenTextField; +@property (assign) id firstBetweenField; +@property (assign) id secondBetweenField; +@property (assign) id argumentField; +@property (assign) NSButton* addButton; +@property (assign) NSButton* duplicateButton; +@property (assign) NSButton* removeButton; +@property (assign) NSButton* reloadButton; +@property (assign) NSButton* paginationNextButton; +@property (assign) NSButton* paginationPreviousButton; +@property (assign) NSTextField* paginationPageField; +@property (assign) SPDatabaseDocument* tableDocumentInstance; +@property (assign) SPTablesList* tablesListInstance; +@property (assign) SPCopyTable* tableContentView; +@property (assign) SPTableData* tableDataInstance; +@property (assign) SPTableStructure* tableSourceInstance; +#endif + - (void)setFieldEditorSelectedRange:(NSRange)aRange; - (NSRange)fieldEditorSelectedRange; // Table loading methods and information -- (void) loadTable:(NSString *)aTable; -- (void) clearTableValues; -- (void) loadTableValues; -- (NSString *) tableFilterString; -- (void) updateCountText; -- (void) initTableLoadTimer; -- (void) clearTableLoadTimer; -- (void) tableLoadUpdate:(NSTimer *)theTimer; +- (void)loadTable:(NSString *)aTable; +- (void)clearTableValues; +- (void)loadTableValues; +- (NSString *)tableFilterString; +- (void)updateCountText; +- (void)initTableLoadTimer; +- (void)clearTableLoadTimer; +- (void)tableLoadUpdate:(NSTimer *)theTimer; // Table interface actions -- (IBAction) reloadTable:(id)sender; -- (void) reloadTableTask; -- (IBAction) filterTable:(id)sender; +- (IBAction)reloadTable:(id)sender; +- (void)reloadTableTask; +- (IBAction)filterTable:(id)sender; - (void)filterTableTask; -- (IBAction) toggleFilterField:(id)sender; -- (NSString *) usedQuery; -- (void) setUsedQuery:(NSString *)query; +- (IBAction)toggleFilterField:(id)sender; +- (NSString *)usedQuery; +- (void)setUsedQuery:(NSString *)query; // Pagination -- (IBAction) navigatePaginationFromButton:(id)sender; +- (IBAction)navigatePaginationFromButton:(id)sender; #ifndef SP_REFACTOR -- (IBAction) togglePagination:(NSButton *)sender; +- (IBAction)togglePagination:(NSButton *)sender; #endif -- (void) setPaginationViewVisibility:(BOOL)makeVisible; -- (void) updatePaginationState; +- (void)setPaginationViewVisibility:(BOOL)makeVisible; +- (void)updatePaginationState; // Edit methods - (IBAction)addRow:(id)sender; @@ -204,11 +240,11 @@ // Data accessors - (NSArray *)currentResult; -- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs; +- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs hideBLOBs:(BOOL)hide; // Task interaction -- (void) startDocumentTaskForTab:(NSNotification *)aNotification; -- (void) endDocumentTaskForTab:(NSNotification *)aNotification; +- (void)startDocumentTaskForTab:(NSNotification *)aNotification; +- (void)endDocumentTaskForTab:(NSNotification *)aNotification; // Additional methods - (void)setConnection:(SPMySQLConnection *)theConnection; @@ -233,23 +269,23 @@ - (void)saveViewCellValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSUInteger)rowIndex; // Retrieving and setting table state -- (NSString *) sortColumnName; -- (BOOL) sortColumnIsAscending; -- (NSUInteger) pageNumber; -- (NSIndexSet *) selectedRowIndexes; -- (NSRect) viewport; -- (CGFloat) tablesListWidth; -- (NSDictionary *) filterSettings; +- (NSString *)sortColumnName; +- (BOOL)sortColumnIsAscending; +- (NSUInteger)pageNumber; +- (NSDictionary *)selectionDetailsAllowingIndexSelection:(BOOL)allowIndexFallback; +- (NSRect)viewport; +- (CGFloat)tablesListWidth; +- (NSDictionary *)filterSettings; - (NSArray *)dataColumnDefinitions; -- (void) setSortColumnNameToRestore:(NSString *)theSortColumnName isAscending:(BOOL)isAscending; -- (void) setPageToRestore:(NSUInteger)thePage; -- (void) setSelectedRowIndexesToRestore:(NSIndexSet *)theIndexSet; -- (void) setViewportToRestore:(NSRect)theViewport; -- (void) setFiltersToRestore:(NSDictionary *)filterSettings; -- (void) storeCurrentDetailsForRestoration; -- (void) clearDetailsToRestore; -- (void) setFilterTableData:(NSData*)arcData; -- (NSData*) filterTableData; +- (void)setSortColumnNameToRestore:(NSString *)theSortColumnName isAscending:(BOOL)isAscending; +- (void)setPageToRestore:(NSUInteger)thePage; +- (void)setSelectionToRestore:(NSDictionary *)theSelection; +- (void)setViewportToRestore:(NSRect)theViewport; +- (void)setFiltersToRestore:(NSDictionary *)filterSettings; +- (void)storeCurrentDetailsForRestoration; +- (void)clearDetailsToRestore; +- (void)setFilterTableData:(NSData*)arcData; +- (NSData*)filterTableData; - (NSString *)escapeFilterArgument:(NSString *)argument againstClause:(NSString *)clause; - (void)openContentFilterManager; @@ -260,26 +296,4 @@ - (void)updateFilterTableClause:(id)currentValue; - (NSString*)escapeFilterTableDefaultOperator:(NSString*)anOperator; -#ifdef SP_REFACTOR /* glue */ -@property (assign) id filterButton; -@property (assign) id fieldField; -@property (assign) id compareField; -@property (assign) id betweenTextField; -@property (assign) id firstBetweenField; -@property (assign) id secondBetweenField; -@property (assign) id argumentField; -@property (assign) NSButton* addButton; -@property (assign) NSButton* duplicateButton; -@property (assign) NSButton* removeButton; -@property (assign) NSButton* reloadButton; -@property (assign) NSButton* paginationNextButton; -@property (assign) NSButton* paginationPreviousButton; -@property (assign) NSTextField* paginationPageField; -@property (assign) SPDatabaseDocument* tableDocumentInstance; -@property (assign) SPTablesList* tablesListInstance; -@property (assign) SPCopyTable* tableContentView; -@property (assign) SPTableData* tableDataInstance; -@property (assign) SPTableStructure* tableSourceInstance; -#endif - @end diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 7afbfe84..29064a5e 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -37,10 +37,10 @@ #import "SPQueryController.h" #import "SPQueryDocumentsController.h" #import "SPTextAndLinkCell.h" -#import "SPMySQL.h" #ifndef SP_REFACTOR #import "QLPreviewPanel.h" #endif +#import #import "SPFieldEditorController.h" #import "SPTooltip.h" #import "RegexKitLite.h" @@ -51,8 +51,10 @@ #import "SPGeometryDataView.h" #import "SPTextView.h" #import "SPDatabaseViewController.h" +#ifndef SP_REFACTOR /* headers */ #import "SPAppController.h" #import "SPBundleHTMLOutputController.h" +#endif #import "SPCustomQuery.h" #import @@ -129,7 +131,7 @@ sortColumnToRestore = nil; sortColumnToRestoreIsAsc = YES; pageToRestore = 1; - selectionIndexToRestore = nil; + selectionToRestore = nil; selectionViewportToRestore = NSZeroRect; filterFieldToRestore = nil; filterComparisonToRestore = nil; @@ -303,14 +305,6 @@ [(SPCopyTable*)[tableContentView onMainThread] scrollRectToVisible:selectionViewportToRestore]; } - // Restore selection indexes if appropriate - if (selectionIndexToRestore) { - BOOL previousTableRowsSelectable = tableRowsSelectable; - tableRowsSelectable = YES; - [[tableContentView onMainThread] selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO]; - tableRowsSelectable = previousTableRowsSelectable; - } - // Update display if necessary if (!NSEqualRects(selectionViewportToRestore, NSZeroRect)) [[tableContentView onMainThread] setNeedsDisplayInRect:selectionViewportToRestore]; @@ -338,6 +332,7 @@ #endif NSArray *columnNames; NSDictionary *columnDefinition; + NSMutableDictionary *preservedColumnWidths = nil; NSTableColumn *theCol; #ifndef SP_REFACTOR NSTableColumn *filterCol; @@ -373,6 +368,12 @@ // reload the data in-place to maintain table state if possible. if ([selectedTable isEqualToString:newTableName]) { previousTableRowsCount = tableRowsCount; + + // Store the column widths for later restoration + preservedColumnWidths = [NSMutableDictionary dictionaryWithCapacity:[[tableContentView tableColumns] count]]; + for (NSTableColumn *eachColumn in [tableContentView tableColumns]) { + [preservedColumnWidths setObject:[NSNumber numberWithFloat:[eachColumn width]] forKey:[[eachColumn headerCell] stringValue]]; + } // Otherwise store the newly selected table name and reset the data } else { @@ -531,6 +532,12 @@ ([columnDefinition objectForKey:@"values"]) ? [NSString stringWithFormat:@"(\n- %@\n)", [[columnDefinition objectForKey:@"values"] componentsJoinedByString:@"\n- "]] : @"", ([columnDefinition objectForKey:@"comment"] && [(NSString *)[columnDefinition objectForKey:@"comment"] length]) ? [NSString stringWithFormat:@"\n%@", [[columnDefinition objectForKey:@"comment"] stringByReplacingOccurrencesOfString:@"\\n" withString:@"\n"]] : @"" ]]; + + // Copy in the width if present in a reloaded table + if ([preservedColumnWidths objectForKey:[columnDefinition objectForKey:@"name"]]) { + [theCol setWidth:[[preservedColumnWidths objectForKey:[columnDefinition objectForKey:@"name"]] floatValue]]; + } + [theCol setEditable:YES]; #ifndef SP_REFACTOR @@ -841,6 +848,69 @@ // End cancellation ability [tableDocumentInstance disableTaskCancellation]; + // Restore selection indexes if appropriate + if (selectionToRestore) { + BOOL previousTableRowsSelectable = tableRowsSelectable; + tableRowsSelectable = YES; + NSMutableIndexSet *selectionSet = [NSMutableIndexSet indexSet]; + + // Currently two types of stored selection are supported: primary keys and direct index sets. + if ([[selectionToRestore objectForKey:@"type"] isEqualToString:SPSelectionDetailTypePrimaryKeyed]) { + + // Check whether the keys are still present and get their positions + BOOL columnsFound = YES; + NSArray *primaryKeyFieldNames = [selectionToRestore objectForKey:@"keys"]; + NSUInteger primaryKeyFieldCount = [primaryKeyFieldNames count]; + NSUInteger primaryKeyFieldIndexes[primaryKeyFieldCount]; + for (NSUInteger i = 0; i < primaryKeyFieldCount; i++) { + primaryKeyFieldIndexes[i] = [[tableDataInstance columnNames] indexOfObject:[primaryKeyFieldNames objectAtIndex:i]]; + if (primaryKeyFieldIndexes[i] == NSNotFound) { + columnsFound = NO; + } + } + + // Only proceed with reselection if all columns were found + if (columnsFound) { + NSDictionary *selectionKeysToRestore = [selectionToRestore objectForKey:@"rows"]; + NSUInteger rowsToSelect = [selectionKeysToRestore count]; + BOOL rowMatches = NO; + + for (NSUInteger i = 0; i < tableRowsCount; i++) { + + // For single-column primary keys look up the cell value in the dictionary for a match + if (primaryKeyFieldCount == 1) { + if ([selectionKeysToRestore objectForKey:SPDataStorageObjectAtRowAndColumn(tableValues, i, primaryKeyFieldIndexes[0])]) { + rowMatches = YES; + } + + // For multi-column primary keys, convert all the cells to a string for lookup. + } else { + NSMutableString *lookupString = [[NSMutableString alloc] initWithString:[SPDataStorageObjectAtRowAndColumn(tableValues, i, primaryKeyFieldIndexes[0]) description]]; + for (NSUInteger j = 1; j < primaryKeyFieldCount; j++) { + [lookupString appendString:SPUniqueSchemaDelimiter]; + [lookupString appendString:[SPDataStorageObjectAtRowAndColumn(tableValues, i, primaryKeyFieldIndexes[j]) description]]; + } + if ([selectionKeysToRestore objectForKey:lookupString]) rowMatches = YES; + [lookupString release]; + } + + if (rowMatches) { + [selectionSet addIndex:i]; + rowsToSelect--; + if (rowsToSelect <= 0) break; + rowMatches = NO; + } + } + } + + } else if ([[selectionToRestore objectForKey:@"type"] isEqualToString:SPSelectionDetailTypeIndexed]) { + selectionSet = [selectionToRestore objectForKey:@"rows"]; + } + + [[tableContentView onMainThread] selectRowIndexes:selectionSet byExtendingSelection:NO]; + tableRowsSelectable = previousTableRowsSelectable; + } + if ([prefs boolForKey:SPLimitResults] && (contentPage > 1 || (NSInteger)tableRowsCount == [prefs integerForKey:SPLimitResultsValue])) { isLimited = YES; @@ -1452,6 +1522,7 @@ #endif // Reset and reload data using the new filter settings + [self setSelectionToRestore:[self selectionDetailsAllowingIndexSelection:NO]]; previousTableRowsCount = 0; [self clearTableValues]; [self loadTableValues]; @@ -1529,6 +1600,78 @@ usedQuery = [[NSString alloc] initWithString:query]; } +- (void)sortTableTaskWithColumn:(NSTableColumn *)tableColumn +{ + NSAutoreleasePool *sortPool = [[NSAutoreleasePool alloc] init]; + + // Check whether a save of the current row is required. + if (![[self onMainThread] saveRowOnDeselect]) { + [sortPool drain]; + return; + } + + // Sets column order as tri-state descending, ascending, no sort, descending, ascending etc. order if the same + // header is clicked several times + if (sortCol && [[tableColumn identifier] integerValue] == [sortCol integerValue]) { + if (isDesc) { + [sortCol release]; + sortCol = nil; + } + else { + if (sortCol) [sortCol release]; + + sortCol = [[NSNumber alloc] initWithInteger:[[tableColumn identifier] integerValue]]; + isDesc = !isDesc; + } + } + else { + isDesc = NO; + + [[tableContentView onMainThread] setIndicatorImage:nil inTableColumn:[tableContentView tableColumnWithIdentifier:[NSString stringWithFormat:@"%lld", (long long)[sortCol integerValue]]]]; + + if (sortCol) [sortCol release]; + + sortCol = [[NSNumber alloc] initWithInteger:[[tableColumn identifier] integerValue]]; + } + + if (sortCol) { + // Set the highlight and indicatorImage + [[tableContentView onMainThread] setHighlightedTableColumn:tableColumn]; + + if (isDesc) { + [[tableContentView onMainThread] setIndicatorImage:[NSImage imageNamed:@"NSDescendingSortIndicator"] inTableColumn:tableColumn]; + } + else { + [[tableContentView onMainThread] setIndicatorImage:[NSImage imageNamed:@"NSAscendingSortIndicator"] inTableColumn:tableColumn]; + } + } + else { + // If no sort order deselect column header and + // remove indicator image + [[tableContentView onMainThread] setHighlightedTableColumn:nil]; + [[tableContentView onMainThread] setIndicatorImage:nil inTableColumn:tableColumn]; + } + + // Update data using the new sort order + previousTableRowsCount = tableRowsCount; + [self setSelectionToRestore:[self selectionDetailsAllowingIndexSelection:NO]]; + [[tableContentView onMainThread] selectRowIndexes:[NSIndexSet indexSet] byExtendingSelection:NO]; + [self loadTableValues]; + + if ([mySQLConnection queryErrored] && ![mySQLConnection lastQueryWasCancelled]) { + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, + [NSString stringWithFormat:NSLocalizedString(@"Couldn't sort table. MySQL said: %@", @"message of panel when sorting of table failed"), [mySQLConnection lastErrorMessage]]); + + [tableDocumentInstance endTask]; + [sortPool drain]; + + return; + } + + [tableDocumentInstance endTask]; + [sortPool drain]; +} + #pragma mark - #pragma mark Pagination @@ -1734,7 +1877,7 @@ for ( i = 0 ; i < [dataColumns count] ; i++ ) { column = NSArrayObjectAtIndex(dataColumns, i); - if ([column objectForKey:@"default"] == nil || [column objectForKey:@"default"] == [NSNull null]) { + if ([column objectForKey:@"default"] == nil || [[column objectForKey:@"default"] isNSNull]) { [newRow addObject:[NSNull null]]; } else if ([[column objectForKey:@"default"] isEqualToString:@""] && ![[column objectForKey:@"null"] boolValue] @@ -1868,10 +2011,15 @@ NSArray *buttons = [alert buttons]; +#ifndef SP_REFACTOR // Change the alert's cancel button to have the key equivalent of return [[buttons objectAtIndex:0] setKeyEquivalent:@"d"]; [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; +#else + [[buttons objectAtIndex:0] setKeyEquivalent:@"\r"]; + [[buttons objectAtIndex:1] setKeyEquivalent:@"\e"]; +#endif [alert setShowsSuppressionButton:NO]; [[alert suppressionButton] setState:NSOffState]; @@ -2212,7 +2360,49 @@ * Returns the current result (as shown in table content view) as array, the first object containing the field * names as array, the following objects containing the rows as array. */ -- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs +- (NSArray *)currentResult +{ + NSInteger i; + NSArray *tableColumns; + NSMutableArray *currentResult = [NSMutableArray array]; + NSMutableArray *tempRow = [NSMutableArray array]; + + // Load the table if not already loaded + if (![tableDocumentInstance contentLoaded]) { + [self loadTable:[tableDocumentInstance table]]; + } + + tableColumns = [tableContentView tableColumns]; + + // Add the field names as the first line + for (NSTableColumn *tableColumn in tableColumns) + { + [tempRow addObject:[[tableColumn headerCell] stringValue]]; + } + + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; + + // Add the rows + for (i = 0 ; i < [self numberOfRowsInTableView:tableContentView]; i++) + { + [tempRow removeAllObjects]; + + for (NSTableColumn *tableColumn in tableColumns) + { + [tempRow addObject:[self tableView:tableContentView objectValueForTableColumn:tableColumn row:i]]; + } + + [currentResult addObject:[NSArray arrayWithArray:tempRow]]; + } + + return currentResult; +} + +/** + * Returns the current result (as shown in table content view) as array, the first object containing the field + * names as array, the following objects containing the rows as array. + */ +- (NSArray *)currentDataResultWithNULLs:(BOOL)includeNULLs hideBLOBs:(BOOL)hide { NSInteger i; NSArray *tableColumns; @@ -2244,7 +2434,7 @@ id o = SPDataStorageObjectAtRowAndColumn(tableValues, i, [[aTableColumn identifier] integerValue]); if ([o isNSNull]) { - [tempRow addObject:(includeNULLs) ? [NSNull null] : [prefs objectForKey:SPNullValue]]; + [tempRow addObject:includeNULLs ? [NSNull null] : [prefs objectForKey:SPNullValue]]; } else if ([o isSPNotLoaded]) { [tempRow addObject:NSLocalizedString(@"(not loaded)", @"value shown for hidden blob and text fields")]; @@ -2257,7 +2447,7 @@ NSImage *image = [v thumbnailImage]; NSString *imageStr = @""; - if(image) { + if (image) { NSString *maxSizeValue = @"WIDTH"; NSInteger imageWidth = [image size].width; NSInteger imageHeight = [image size].height; @@ -2292,10 +2482,10 @@ [[image TIFFRepresentationUsingCompression:NSTIFFCompressionJPEG factor:0.01f] base64Encoding]]]; } else { - [tempRow addObject:@"<BLOB>"]; + [tempRow addObject:hide ? @"<BLOB>" : [o stringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]]; } - if(image) [image release]; + if (image) [image release]; } } @@ -2305,42 +2495,6 @@ return currentResult; } -/** - * Returns the current result (as shown in table content view) as array, the first object containing the field - * names as array, the following objects containing the rows as array. - */ -- (NSArray *)currentResult -{ - NSArray *tableColumns; - NSMutableArray *currentResult = [NSMutableArray array]; - NSMutableArray *tempRow = [NSMutableArray array]; - NSInteger i; - - // Load the table if not already loaded - if ( ![tableDocumentInstance contentLoaded] ) { - [self loadTable:[tableDocumentInstance table]]; - } - - tableColumns = [tableContentView tableColumns]; - - // Add the field names as the first line - for (NSTableColumn *aTableColumn in tableColumns) { - [tempRow addObject:[[aTableColumn headerCell] stringValue]]; - } - [currentResult addObject:[NSArray arrayWithArray:tempRow]]; - - // Add the rows - for ( i = 0 ; i < [self numberOfRowsInTableView:tableContentView] ; i++) { - [tempRow removeAllObjects]; - for (NSTableColumn *aTableColumn in tableColumns) { - [tempRow addObject:[self tableView:tableContentView objectValueForTableColumn:aTableColumn row:i]]; - } - [currentResult addObject:[NSArray arrayWithArray:tempRow]]; - } - - return currentResult; -} - #pragma mark - // Additional methods @@ -2537,7 +2691,6 @@ { [[contentFilters objectForKey:compareType] addObjectsFromArray:[[prefs objectForKey:SPContentFilters] objectForKey:compareType]]; } -#endif // Load doc-based user-defined content filters if([[SPQueryController sharedQueryController] contentFilterForFileURL:[tableDocumentInstance fileURL]]) { @@ -2545,6 +2698,7 @@ if([filters objectForKey:compareType]) [[contentFilters objectForKey:compareType] addObjectsFromArray:[filters objectForKey:compareType]]; } +#endif // Rebuild operator popup menu NSUInteger i = 0; @@ -2807,7 +2961,7 @@ // Report errors which have occurred } else { - SPBeginAlertSheet(NSLocalizedString(@"Couldn't write row", @"Couldn't write row error"), NSLocalizedString(@"Edit row", @"Edit row button"), NSLocalizedString(@"Discard changes", @"discard changes button"), nil, [tableDocumentInstance parentWindow], self, @selector(addRowErrorSheetDidEnd:returnCode:contextInfo:), nil, + SPBeginAlertSheet(NSLocalizedString(@"Unable to write row", @"Unable to write row error"), NSLocalizedString(@"Edit row", @"Edit row button"), NSLocalizedString(@"Discard changes", @"discard changes button"), nil, [tableDocumentInstance parentWindow], self, @selector(addRowErrorSheetDidEnd:returnCode:contextInfo:), nil, [NSString stringWithFormat:NSLocalizedString(@"MySQL said:\n\n%@", @"message of panel when error while adding row to db"), [mySQLConnection lastErrorMessage]]); return NO; } @@ -3536,11 +3690,85 @@ } /** - * Provide a getter for the table's selected rows index set + * Provide a getter for the table's selected rows. If a primary key is available, + * the returned dictionary will contain details of the primary key used, and an + * identifier for each selected row. If no primary key is available, the returned + * dictionary will contain details and a list of the selected row *indexes* if the + * supplied argument is set to true, which may not always be appropriate. */ -- (NSIndexSet *) selectedRowIndexes +- (NSDictionary *)selectionDetailsAllowingIndexSelection:(BOOL)allowIndexFallback { - return [tableContentView selectedRowIndexes]; + + // If a primary key is available, store the selection details for rows using the primary key. + NSArray *primaryKeyFieldNames = [tableDataInstance primaryKeyColumnNames]; + if (primaryKeyFieldNames) { + + // Set up an array of the column indexes to store + NSUInteger primaryKeyFieldCount = [primaryKeyFieldNames count]; + NSUInteger primaryKeyFieldIndexes[primaryKeyFieldCount]; + BOOL problemColumns = NO; + for (NSUInteger i = 0; i < primaryKeyFieldCount; i++) { + primaryKeyFieldIndexes[i] = [[tableDataInstance columnNames] indexOfObject:[primaryKeyFieldNames objectAtIndex:i]]; + if (primaryKeyFieldIndexes[i] == NSNotFound) { + problemColumns = YES; +#ifndef SP_REFACTOR + } else { + if ([prefs boolForKey:SPLoadBlobsAsNeeded]) { + if ([tableDataInstance columnIsBlobOrText:[primaryKeyFieldNames objectAtIndex:i]]) { + problemColumns = YES; + } + } +#endif + } + } + + // Only proceed with key-based selection if there were no problem columns + if (!problemColumns) { + NSIndexSet *selectedRowIndexes = [tableContentView selectedRowIndexes]; + NSUInteger *indexBuffer = malloc(sizeof(NSUInteger) * [selectedRowIndexes count]); + NSUInteger indexCount = [selectedRowIndexes getIndexes:indexBuffer maxCount:[selectedRowIndexes count] inIndexRange:NULL]; + + NSMutableDictionary *selectedRowLookupTable = [NSMutableDictionary dictionaryWithCapacity:indexCount]; + NSNumber *trueNumber = [NSNumber numberWithBool:YES]; + for (NSUInteger i = 0; i < indexCount; i++) { + + // For single-column primary keys, use the cell value as a dictionary key for fast lookups + if (primaryKeyFieldCount == 1) { + [selectedRowLookupTable setObject:trueNumber forKey:SPDataStorageObjectAtRowAndColumn(tableValues, indexBuffer[i], primaryKeyFieldIndexes[0])]; + + // For multi-column primary keys, convert all the cell values to a string and use that as the key. + } else { + NSMutableString *lookupString = [NSMutableString stringWithString:[SPDataStorageObjectAtRowAndColumn(tableValues, indexBuffer[i], primaryKeyFieldIndexes[0]) description]]; + for (NSUInteger j = 1; j < primaryKeyFieldCount; j++) { + [lookupString appendString:SPUniqueSchemaDelimiter]; + [lookupString appendString:[SPDataStorageObjectAtRowAndColumn(tableValues, indexBuffer[i], primaryKeyFieldIndexes[j]) description]]; + } + [selectedRowLookupTable setObject:trueNumber forKey:lookupString]; + } + } + free(indexBuffer); + + return [NSDictionary dictionaryWithObjectsAndKeys: + SPSelectionDetailTypePrimaryKeyed, @"type", + selectedRowLookupTable, @"rows", + primaryKeyFieldNames, @"keys", + nil]; + } + } + + // If no primary key was available, fall back to using just the selected row indexes if permitted + if (allowIndexFallback) { + return [NSDictionary dictionaryWithObjectsAndKeys: + SPSelectionDetailTypeIndexed, @"type", + [tableContentView selectedRowIndexes], @"rows", + nil]; + } + + // Otherwise return a blank selection + return [NSDictionary dictionaryWithObjectsAndKeys: + SPSelectionDetailTypeIndexed, @"type", + [NSIndexSet indexSet], @"rows", + nil]; } /** @@ -3621,11 +3849,11 @@ /** * Set the selected row indexes to restore on next table load */ -- (void) setSelectedRowIndexesToRestore:(NSIndexSet *)theIndexSet +- (void) setSelectionToRestore:(NSDictionary *)theSelection { - if (selectionIndexToRestore) [selectionIndexToRestore release], selectionIndexToRestore = nil; + if (selectionToRestore) [selectionToRestore release], selectionToRestore = nil; - if (theIndexSet) selectionIndexToRestore = [[NSIndexSet alloc] initWithIndexSet:theIndexSet]; + if (theSelection) selectionToRestore = [theSelection copy]; } /** @@ -3687,7 +3915,7 @@ { [self setSortColumnNameToRestore:[self sortColumnName] isAscending:[self sortColumnIsAscending]]; [self setPageToRestore:[self pageNumber]]; - [self setSelectedRowIndexesToRestore:[self selectedRowIndexes]]; + [self setSelectionToRestore:[self selectionDetailsAllowingIndexSelection:YES]]; [self setViewportToRestore:[self viewport]]; [self setFiltersToRestore:[self filterSettings]]; } @@ -3699,7 +3927,7 @@ { [self setSortColumnNameToRestore:nil isAscending:YES]; [self setPageToRestore:1]; - [self setSelectedRowIndexesToRestore:nil]; + [self setSelectionToRestore:nil]; [self setViewportToRestore:NSZeroRect]; [self setFiltersToRestore:nil]; } @@ -3859,922 +4087,69 @@ } [tableContentView setDelegate:self]; } -#ifndef SP_REFACTOR #pragma mark - -#pragma mark TableView delegate methods +#pragma mark Task interaction /** - * Show the table cell content as tooltip - * - for text displays line breaks and tabs as well - * - if blob data can be interpret as image data display the image as transparent thumbnail - * (up to now using base64 encoded HTML data) + * Disable all content interactive elements during an ongoing task. */ -- (NSString *)tableView:(NSTableView *)aTableView toolTipForCell:(id)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation +- (void) startDocumentTaskForTab:(NSNotification *)aNotification { - if (aTableView == filterTableView) { - return nil; - } - else if (aTableView == tableContentView) { - - if([[aCell stringValue] length] < 2 || [tableDocumentInstance isWorking]) return nil; + isWorking = YES; - // Suppress tooltip if another toolip is already visible, mainly displayed by a Bundle command - // TODO has to be improved - for(id win in [NSApp orderedWindows]) { - if([[[[win contentView] class] description] isEqualToString:@"WebView"]) { - return nil; - } - } +#ifndef SP_REFACTOR /* Only proceed if this view is selected */ + // Only proceed if this view is selected. + if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:SPMainToolbarTableContent]) + return; +#endif - NSImage *image; + [addButton setEnabled:NO]; + [removeButton setEnabled:NO]; + [duplicateButton setEnabled:NO]; + [reloadButton setEnabled:NO]; + [filterButton setEnabled:NO]; + tableRowsSelectable = NO; + [paginationPreviousButton setEnabled:NO]; + [paginationNextButton setEnabled:NO]; +#ifndef SP_REFACTOR + [paginationButton setEnabled:NO]; +#endif +} - NSPoint pos = [NSEvent mouseLocation]; - pos.y -= 20; +/** + * Enable all content interactive elements after an ongoing task. + */ +- (void) endDocumentTaskForTab:(NSNotification *)aNotification +{ + isWorking = NO; - id theValue = nil; +#ifndef SP_REFACTOR /* Only proceed if this view is selected */ + // Only proceed if this view is selected. + if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:SPMainToolbarTableContent]) + return; +#endif - // While the table is being loaded, additional validation is required - data - // locks must be used to avoid crashes, and indexes higher than the available - // rows or columns may be requested. Return "..." to indicate loading in these - // cases. - if (isWorking) { - pthread_mutex_lock(&tableValuesLock); - if (row < (NSInteger)tableRowsCount && [[aTableColumn identifier] integerValue] < (NSInteger)[tableValues columnCount]) { - theValue = [[SPDataStorageObjectAtRowAndColumn(tableValues, row, [[aTableColumn identifier] integerValue]) copy] autorelease]; - } - pthread_mutex_unlock(&tableValuesLock); + if ( ![[[tableDataInstance statusValues] objectForKey:@"Rows"] isNSNull] && selectedTable && [selectedTable length] && [tableDataInstance tableEncoding]) { + [addButton setEnabled:([tablesListInstance tableType] == SPTableTypeTable)]; + [self updatePaginationState]; + [reloadButton setEnabled:YES]; + } - if (!theValue) theValue = @"..."; - } else { - theValue = SPDataStorageObjectAtRowAndColumn(tableValues, row, [[aTableColumn identifier] integerValue]); + if ([tableContentView numberOfSelectedRows] > 0) { + if([tablesListInstance tableType] == SPTableTypeTable) { + [removeButton setEnabled:YES]; + [duplicateButton setEnabled:YES]; } + } - if(theValue == nil) return nil; - - if ([theValue isKindOfClass:[NSData class]]) { - image = [[[NSImage alloc] initWithData:theValue] autorelease]; - if(image) { - [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; - return nil; - } - } - else if ([theValue isKindOfClass:[SPMySQLGeometryData class]]) { - SPGeometryDataView *v = [[SPGeometryDataView alloc] initWithCoordinates:[theValue coordinates]]; - image = [v thumbnailImage]; - if(image) { - [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; - [v release]; - return nil; - } - [v release]; - } - - // Show the cell string value as tooltip (including line breaks and tabs) - // by using the cell's font - [SPTooltip showWithObject:[aCell stringValue] - atLocation:pos - ofType:@"text" - displayOptions:[NSDictionary dictionaryWithObjectsAndKeys: - [[aCell font] familyName], @"fontname", - [NSString stringWithFormat:@"%f",[[aCell font] pointSize]], @"fontsize", - nil]]; - - return nil; - } - - return nil; -} -#endif - -- (NSInteger)numberOfRowsInTableView:(SPCopyTable *)aTableView -{ -#ifndef SP_REFACTOR - if (aTableView == filterTableView) { - if (filterTableIsSwapped) - return [filterTableData count]; - else - return [[[filterTableData objectForKey:[NSNumber numberWithInteger:0]] objectForKey:@"filter"] count]; - } - else -#endif - if (aTableView == tableContentView) { - return tableRowsCount; - } - - return 0; -} - -- (id)tableView:(SPCopyTable *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex -{ -#ifndef SP_REFACTOR - if (aTableView == filterTableView) { - if (filterTableIsSwapped) - // First column shows the field names - if([[aTableColumn identifier] integerValue] == 0) { - NSTableHeaderCell *c = [[[NSTableHeaderCell alloc] initTextCell:[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"name"]] autorelease]; - return c; - } else - return NSArrayObjectAtIndex([[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"filter"], [[aTableColumn identifier] integerValue]-1); - else { - return NSArrayObjectAtIndex([[filterTableData objectForKey:[aTableColumn identifier]] objectForKey:@"filter"], rowIndex); - } - } - else -#endif - if (aTableView == tableContentView) { - - NSUInteger columnIndex = [[aTableColumn identifier] integerValue]; - id theValue = nil; - - // While the table is being loaded, additional validation is required - data - // locks must be used to avoid crashes, and indexes higher than the available - // rows or columns may be requested. Return "..." to indicate loading in these - // cases. - if (isWorking) { - pthread_mutex_lock(&tableValuesLock); - if (rowIndex < (NSInteger)tableRowsCount && columnIndex < [tableValues columnCount]) { - theValue = [[SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex) copy] autorelease]; - } - pthread_mutex_unlock(&tableValuesLock); - - if (!theValue) return @"..."; - } else { - theValue = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); - } - - if([theValue isKindOfClass:[SPMySQLGeometryData class]]) - return [theValue wktString]; - - if ([theValue isNSNull]) - return [prefs objectForKey:SPNullValue]; - - if ([theValue isKindOfClass:[NSData class]]) - return [theValue shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]; - - if ([theValue isSPNotLoaded]) - return NSLocalizedString(@"(not loaded)", @"value shown for hidden blob and text fields"); - - return theValue; - } - - return nil; -} - -/** - * This function changes the text color of text/blob fields which are null or not yet loaded to gray - */ -- (void)tableView:(SPCopyTable *)aTableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn*)aTableColumn row:(NSInteger)rowIndex -{ -#ifndef SP_REFACTOR - if(aTableView == filterTableView) { - if(filterTableIsSwapped && [[aTableColumn identifier] integerValue] == 0) { - [cell setDrawsBackground:YES]; - [cell setBackgroundColor:lightGrayColor]; - } else { - [cell setDrawsBackground:NO]; - } - return; - } - else -#endif - if(aTableView == tableContentView) { - - if (![cell respondsToSelector:@selector(setTextColor:)]) return; - - NSUInteger columnIndex = [[aTableColumn identifier] integerValue]; - id theValue = nil; - - // While the table is being loaded, additional validation is required - data - // locks must be used to avoid crashes, and indexes higher than the available - // rows or columns may be requested. Use gray to indicate loading in these cases. - if (isWorking) { - pthread_mutex_lock(&tableValuesLock); - if (rowIndex < (NSInteger)tableRowsCount && columnIndex < [tableValues columnCount]) { - theValue = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); - } - pthread_mutex_unlock(&tableValuesLock); - - if (!theValue) { - [cell setTextColor:[NSColor lightGrayColor]]; - return; - } - } else { - theValue = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); - } - - // If user wants to edit 'cell' set text color to black and return to avoid - // writing in gray if value was NULL - if ([aTableView editedColumn] != -1 - && [aTableView editedRow] == rowIndex - && (NSUInteger)[[NSArrayObjectAtIndex([aTableView tableColumns], [aTableView editedColumn]) identifier] integerValue] == columnIndex) { - [cell setTextColor:blackColor]; - return; - } - - // For null cells and not loaded cells, display the contents in gray. - if ([theValue isNSNull] || [theValue isSPNotLoaded]) { - [cell setTextColor:lightGrayColor]; - - // Otherwise, set the color to black - required as NSTableView reuses NSCells. - } else { - [cell setTextColor:blackColor]; - } - } -} - -- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex -{ -#ifndef SP_REFACTOR - if(aTableView == filterTableView) { - if(filterTableIsSwapped) - [[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"filter"] replaceObjectAtIndex:([[aTableColumn identifier] integerValue]-1) withObject:(NSString*)anObject]; - else - [[[filterTableData objectForKey:[aTableColumn identifier]] objectForKey:@"filter"] replaceObjectAtIndex:rowIndex withObject:(NSString*)anObject]; - [self updateFilterTableClause:nil]; - return; - } - else -#endif - if(aTableView == tableContentView) { - - // If the current cell should have been edited in a sheet, do nothing - field closing will have already - // updated the field. - if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:[[aTableColumn identifier] integerValue]]) { - return; - } - - // If table data comes from a view, save back to the view - if([tablesListInstance tableType] == SPTableTypeView) { - [self saveViewCellValue:anObject forTableColumn:aTableColumn row:rowIndex]; - return; - } - - // Catch editing events in the row and if the row isn't currently being edited, - // start an edit. This allows edits including enum changes to save correctly. - if ( isEditingRow && [tableContentView selectedRow] != currentlyEditingRow ) - [self saveRowOnDeselect]; - if ( !isEditingRow ) { - [oldRow setArray:[tableValues rowContentsAtIndex:rowIndex]]; - isEditingRow = YES; - currentlyEditingRow = rowIndex; - } - - NSDictionary *column = NSArrayObjectAtIndex(dataColumns, [[aTableColumn identifier] integerValue]); - - if (anObject) { - - // Restore NULLs if necessary - if ([anObject isEqualToString:[prefs objectForKey:SPNullValue]] && [[column objectForKey:@"null"] boolValue]) - anObject = [NSNull null]; - - [tableValues replaceObjectInRow:rowIndex column:[[aTableColumn identifier] integerValue] withObject:anObject]; - } else { - [tableValues replaceObjectInRow:rowIndex column:[[aTableColumn identifier] integerValue] withObject:@""]; - } - } -} - -#pragma mark - -#pragma mark TableView delegate methods - -/** - * Sorts the tableView by the clicked column. - * If clicked twice, order is altered to descending. - * Performs the task in a new thread if necessary. - */ -- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn -{ - - if ( [selectedTable isEqualToString:@""] || !selectedTable || tableView != tableContentView ) - return; - - // Prevent sorting while the table is still loading - if ([tableDocumentInstance isWorking]) return; - - // Start the task - [tableDocumentInstance startTaskWithDescription:NSLocalizedString(@"Sorting table...", @"Sorting table task description")]; - if ([NSThread isMainThread]) { - [NSThread detachNewThreadSelector:@selector(sortTableTaskWithColumn:) toTarget:self withObject:tableColumn]; - } else { - [self sortTableTaskWithColumn:tableColumn]; - } -} - -- (void)sortTableTaskWithColumn:(NSTableColumn *)tableColumn -{ - NSAutoreleasePool *sortPool = [[NSAutoreleasePool alloc] init]; - - // Check whether a save of the current row is required. - if (![[self onMainThread] saveRowOnDeselect]) { - [sortPool drain]; - return; - } - - // Sets column order as tri-state descending, ascending, no sort, descending, ascending etc. order if the same - // header is clicked several times - if (sortCol && [[tableColumn identifier] integerValue] == [sortCol integerValue]) { - if(isDesc) { - [sortCol release]; - sortCol = nil; - } else { - if (sortCol) [sortCol release]; - sortCol = [[NSNumber alloc] initWithInteger:[[tableColumn identifier] integerValue]]; - isDesc = !isDesc; - } - } else { - isDesc = NO; - [[tableContentView onMainThread] setIndicatorImage:nil inTableColumn:[tableContentView tableColumnWithIdentifier:[NSString stringWithFormat:@"%lld", (long long)[sortCol integerValue]]]]; - if (sortCol) [sortCol release]; - sortCol = [[NSNumber alloc] initWithInteger:[[tableColumn identifier] integerValue]]; - } - - if (sortCol) { - // Set the highlight and indicatorImage - [[tableContentView onMainThread] setHighlightedTableColumn:tableColumn]; - if (isDesc) { - [[tableContentView onMainThread] setIndicatorImage:[NSImage imageNamed:@"NSDescendingSortIndicator"] inTableColumn:tableColumn]; - } else { - [[tableContentView onMainThread] setIndicatorImage:[NSImage imageNamed:@"NSAscendingSortIndicator"] inTableColumn:tableColumn]; - } - } else { - // If no sort order deselect column header and - // remove indicator image - [[tableContentView onMainThread] setHighlightedTableColumn:nil]; - [[tableContentView onMainThread] setIndicatorImage:nil inTableColumn:tableColumn]; - } - - // Update data using the new sort order - previousTableRowsCount = tableRowsCount; - [self loadTableValues]; - - if ([mySQLConnection queryErrored]) { - SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"Couldn't sort table. MySQL said: %@", @"message of panel when sorting of table failed"), [mySQLConnection lastErrorMessage]]); - [tableDocumentInstance endTask]; - [sortPool drain]; - return; - } - - [tableDocumentInstance endTask]; - [sortPool drain]; -} - -- (void)tableViewSelectionDidChange:(NSNotification *)aNotification -{ - - // Check our notification object is our table content view - if ([aNotification object] != tableContentView) return; - - isFirstChangeInView = YES; - - [addButton setEnabled:([tablesListInstance tableType] == SPTableTypeTable)]; - - // If we are editing a row, attempt to save that row - if saving failed, reselect the edit row. - if (isEditingRow && [tableContentView selectedRow] != currentlyEditingRow && ![self saveRowOnDeselect]) return; - - if (![tableDocumentInstance isWorking]) { - // Update the row selection count - // and update the status of the delete/duplicate buttons - if([tablesListInstance tableType] == SPTableTypeTable) { - if ([tableContentView numberOfSelectedRows] > 0) { - [duplicateButton setEnabled:([tableContentView numberOfSelectedRows] == 1)]; - [removeButton setEnabled:YES]; - } - else { - [duplicateButton setEnabled:NO]; - [removeButton setEnabled:NO]; - } - } else { - [duplicateButton setEnabled:NO]; - [removeButton setEnabled:NO]; - } - } - - [self updateCountText]; - -#ifndef SP_REFACTOR /* triggered commands */ - NSArray *triggeredCommands = [[NSApp delegate] bundleCommandsForTrigger:SPBundleTriggerActionTableRowChanged]; - for(NSString* cmdPath in triggeredCommands) { - NSArray *data = [cmdPath componentsSeparatedByString:@"|"]; - NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; - [aMenuItem setTag:0]; - [aMenuItem setToolTip:[data objectAtIndex:0]]; - - // For HTML output check if corresponding window already exists - BOOL stopTrigger = NO; - if([(NSString *)[data objectAtIndex:2] length]) { - BOOL correspondingWindowFound = NO; - NSString *uuid = [data objectAtIndex:2]; - for(id win in [NSApp windows]) { - if([[[[win delegate] class] description] isEqualToString:@"SPBundleHTMLOutputController"]) { - if([[[win delegate] windowUUID] isEqualToString:uuid]) { - correspondingWindowFound = YES; - break; - } - } - } - if(!correspondingWindowFound) stopTrigger = YES; - } - if(!stopTrigger) { - if([[data objectAtIndex:1] isEqualToString:SPBundleScopeGeneral]) { - [[[NSApp delegate] onMainThread] executeBundleItemForApp:aMenuItem]; - } - else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeDataTable]) { - if([[[[[NSApp mainWindow] firstResponder] class] description] isEqualToString:@"SPCopyTable"]) - [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForDataTable:aMenuItem]; - } - else if([[data objectAtIndex:1] isEqualToString:SPBundleScopeInputField]) { - if([[[NSApp mainWindow] firstResponder] isKindOfClass:[NSTextView class]]) - [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForInputField:aMenuItem]; - } - } - } -#endif -} - -/** - saves the new column size in the preferences - */ -- (void)tableViewColumnDidResize:(NSNotification *)aNotification -{ - - // Check our notification object is our table content view - if ([aNotification object] != tableContentView) return; - - // sometimes the column has no identifier. I can't figure out what is causing it, so we just skip over this item - if (![[[aNotification userInfo] objectForKey:@"NSTableColumn"] identifier]) - return; - - NSMutableDictionary *tableColumnWidths; - NSString *database = [NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]; - NSString *table = [tablesListInstance tableName]; - - // get tableColumnWidths object -#ifndef SP_REFACTOR - if ( [prefs objectForKey:SPTableColumnWidths] != nil ) { - tableColumnWidths = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:SPTableColumnWidths]]; - } else { -#endif - tableColumnWidths = [NSMutableDictionary dictionary]; -#ifndef SP_REFACTOR - } -#endif - // get database object - if ( [tableColumnWidths objectForKey:database] == nil ) { - [tableColumnWidths setObject:[NSMutableDictionary dictionary] forKey:database]; - } else { - [tableColumnWidths setObject:[NSMutableDictionary dictionaryWithDictionary:[tableColumnWidths objectForKey:database]] forKey:database]; - - } - // get table object - if ( [[tableColumnWidths objectForKey:database] objectForKey:table] == nil ) { - [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionary] forKey:table]; - } else { - [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionaryWithDictionary:[[tableColumnWidths objectForKey:database] objectForKey:table]] forKey:table]; - - } - // save column size - [[[tableColumnWidths objectForKey:database] objectForKey:table] setObject:[NSNumber numberWithDouble:[(NSTableColumn *)[[aNotification userInfo] objectForKey:@"NSTableColumn"] width]] forKey:[[[[aNotification userInfo] objectForKey:@"NSTableColumn"] headerCell] stringValue]]; -#ifndef SP_REFACTOR - [prefs setObject:tableColumnWidths forKey:SPTableColumnWidths]; -#endif -} - -/** - * Confirm whether to allow editing of a row. Returns YES by default, unless the multipleLineEditingButton is in - * the ON state, or for blob or text fields - in those cases opens a sheet for editing instead and returns NO. - */ -- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex -{ - if ([tableDocumentInstance isWorking]) return NO; - -#ifndef SP_REFACTOR - if(aTableView == filterTableView) { - if(filterTableIsSwapped && [[aTableColumn identifier] integerValue] == 0) - return NO; - else - return YES; - } - else -#endif - if ( aTableView == tableContentView ) { - - // Ensure that row is editable since it could contain "(not loaded)" columns together with - // issue that the table has no primary key - NSString *wherePart = [NSString stringWithString:[self argumentForRow:[tableContentView selectedRow]]]; - if ([wherePart length] == 0) return NO; - - // If the selected cell hasn't been loaded, load it. - if ([[tableValues cellDataAtRow:rowIndex column:[[aTableColumn identifier] integerValue]] isSPNotLoaded]) { - - // Only get the data for the selected column, not all of them - NSString *query = [NSString stringWithFormat:@"SELECT %@ FROM %@ WHERE %@", [[[aTableColumn headerCell] stringValue] backtickQuotedString], [selectedTable backtickQuotedString], wherePart]; - - SPMySQLResult *tempResult = [mySQLConnection queryString:query]; - if (![tempResult numberOfRows]) { - SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, - NSLocalizedString(@"Couldn't load the row. Reload the table to be sure that the row exists and use a primary key for your table.", @"message of panel when loading of row failed")); - return NO; - } - - NSArray *tempRow = [tempResult getRowAsArray]; - [tableValues replaceObjectInRow:rowIndex column:[[tableContentView tableColumns] indexOfObject:aTableColumn] withObject:[tempRow objectAtIndex:0]]; - [tableContentView reloadData]; - } - - // Open the editing sheet if required - if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:[[aTableColumn identifier] integerValue]]) - { - - // Retrieve the column definition - NSDictionary *columnDefinition = [cqColumnDefinition objectAtIndex:[[aTableColumn identifier] integerValue]]; - BOOL isBlob = [tableDataInstance columnIsBlobOrText:[[aTableColumn headerCell] stringValue]]; - - // A table is per definition editable - BOOL isFieldEditable = YES; - - // Check for Views if field is editable - if([tablesListInstance tableType] == SPTableTypeView) { - NSArray *editStatus = [self fieldEditStatusForRow:rowIndex andColumn:[[aTableColumn identifier] integerValue]]; - isFieldEditable = ([[editStatus objectAtIndex:0] integerValue] == 1) ? YES : NO; - } - - NSString *fieldType = nil; - NSUInteger fieldLength = 0; - NSString *fieldEncoding = nil; - BOOL allowNULL = YES; - - fieldType = [columnDefinition objectForKey:@"type"]; - if([columnDefinition objectForKey:@"char_length"]) - fieldLength = [[columnDefinition objectForKey:@"char_length"] integerValue]; - if([columnDefinition objectForKey:@"null"]) - allowNULL = (![[columnDefinition objectForKey:@"null"] integerValue]); - if([columnDefinition objectForKey:@"charset_name"] && ![[columnDefinition objectForKey:@"charset_name"] isEqualToString:@"binary"]) - fieldEncoding = [columnDefinition objectForKey:@"charset_name"]; - - if(fieldEditor) [fieldEditor release], fieldEditor = nil; - fieldEditor = [[SPFieldEditorController alloc] init]; - [fieldEditor setEditedFieldInfo:[NSDictionary dictionaryWithObjectsAndKeys: - [[aTableColumn headerCell] stringValue], @"colName", - [self usedQuery], @"usedQuery", - @"content", @"tableSource", - nil]]; - [fieldEditor setTextMaxLength:fieldLength]; - [fieldEditor setFieldType:(fieldType==nil) ? @"" : fieldType]; - [fieldEditor setFieldEncoding:(fieldEncoding==nil) ? @"" : fieldEncoding]; - [fieldEditor setAllowNULL:allowNULL]; - - id cellValue = [tableValues cellDataAtRow:rowIndex column:[[aTableColumn identifier] integerValue]]; - if ([cellValue isNSNull]) - cellValue = [NSString stringWithString:[prefs objectForKey:SPNullValue]]; - - NSInteger editedColumn = 0; - for(NSTableColumn* col in [tableContentView tableColumns]) { - if([[col identifier] isEqualToString:[aTableColumn identifier]]) break; - editedColumn++; - } - - [fieldEditor editWithObject:cellValue - fieldName:[[aTableColumn headerCell] stringValue] - usingEncoding:[mySQLConnection stringEncoding] - isObjectBlob:isBlob - isEditable:isFieldEditable - withWindow:[tableDocumentInstance parentWindow] - sender:self - contextInfo:[NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInteger:rowIndex], @"rowIndex", - [NSNumber numberWithInteger:editedColumn], @"columnIndex", - [NSNumber numberWithBool:isFieldEditable], @"isFieldEditable", - nil]]; - - return NO; - } - - return YES; - } - - return YES; -} - -/** - * Enable drag from tableview - */ -- (BOOL)tableView:(NSTableView *)aTableView writeRowsWithIndexes:(NSIndexSet *)rows toPasteboard:(NSPasteboard*)pboard -{ - if (aTableView == tableContentView) { - NSString *tmp; - - // By holding ⌘, ⇧, or/and ⌥ copies selected rows as SQL INSERTS - // otherwise \t delimited lines - if([[NSApp currentEvent] modifierFlags] & (NSCommandKeyMask|NSShiftKeyMask|NSAlternateKeyMask)) - tmp = [tableContentView rowsAsSqlInsertsOnlySelectedRows:YES]; - else - tmp = [tableContentView draggedRowsAsTabString]; - - if ( nil != tmp && [tmp length] ) - { - [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType, - NSStringPboardType, nil] - owner:nil]; - - [pboard setString:tmp forType:NSStringPboardType]; - [pboard setString:tmp forType:NSTabularTextPboardType]; - return YES; - } - } - - return NO; -} - -/** - * Disable row selection while the document is working. - */ -- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex -{ -#ifndef SP_REFACTOR - - if(aTableView == filterTableView) - return YES; - else -#endif - if(aTableView == tableContentView) - return tableRowsSelectable; - else - return YES; - -} - -/** - * Resize a column when it's double-clicked. (10.6+) - */ -- (CGFloat)tableView:(NSTableView *)tableView sizeToFitWidthOfColumn:(NSInteger)columnIndex -{ - - NSTableColumn *theColumn = [[tableView tableColumns] objectAtIndex:columnIndex]; - NSDictionary *columnDefinition = [dataColumns objectAtIndex:[[theColumn identifier] integerValue]]; - - // Get the column width - NSUInteger targetWidth = [tableContentView autodetectWidthForColumnDefinition:columnDefinition maxRows:500]; - -#ifndef SP_REFACTOR - // Clear any saved widths for the column - NSString *dbKey = [NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]; - NSString *tableKey = [tablesListInstance tableName]; - NSMutableDictionary *savedWidths = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:SPTableColumnWidths]]; - NSMutableDictionary *dbDict = [NSMutableDictionary dictionaryWithDictionary:[savedWidths objectForKey:dbKey]]; - NSMutableDictionary *tableDict = [NSMutableDictionary dictionaryWithDictionary:[dbDict objectForKey:tableKey]]; - if ([tableDict objectForKey:[columnDefinition objectForKey:@"name"]]) { - [tableDict removeObjectForKey:[columnDefinition objectForKey:@"name"]]; - if ([tableDict count]) { - [dbDict setObject:[NSDictionary dictionaryWithDictionary:tableDict] forKey:tableKey]; - } else { - [dbDict removeObjectForKey:tableKey]; - } - if ([dbDict count]) { - [savedWidths setObject:[NSDictionary dictionaryWithDictionary:dbDict] forKey:dbKey]; - } else { - [savedWidths removeObjectForKey:dbKey]; - } - [prefs setObject:[NSDictionary dictionaryWithDictionary:savedWidths] forKey:SPTableColumnWidths]; - } -#endif - - // Return the width, while the delegate is empty to prevent column resize notifications - [tableContentView setDelegate:nil]; - [tableContentView performSelector:@selector(setDelegate:) withObject:self afterDelay:0.1]; - return targetWidth; -} - -#ifndef SP_REFACTOR /* SplitView delegate methods */ -#pragma mark - -#pragma mark SplitView delegate methods - -- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview -{ - return NO; -} - -// Set a minimum size for the filter text area -- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset -{ - return (proposedMax - 180); -} - -// Set a minimum size for the field list and action area -- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset -{ - return (proposedMin + 200); -} - -// Improve default resizing and resize only the filter text area by default -- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSize -{ - NSSize newSize = [sender frame].size; - NSView *leftView = [[sender subviews] objectAtIndex:0]; - NSView *rightView = [[sender subviews] objectAtIndex:1]; - float dividerThickness = [sender dividerThickness]; - NSRect leftFrame = [leftView frame]; - NSRect rightFrame = [rightView frame]; - - // Resize height of both views - leftFrame.size.height = newSize.height; - rightFrame.size.height = newSize.height; - - // Only resize the right view's width - unless the constraint has been reached - if (rightFrame.size.width > 180 || newSize.width > oldSize.width) { - rightFrame.size.width = newSize.width - leftFrame.size.width - dividerThickness; - } else { - leftFrame.size.width = newSize.width - rightFrame.size.width - dividerThickness; - } - rightFrame.origin.x = leftFrame.size.width + dividerThickness; - - [leftView setFrame:leftFrame]; - [rightView setFrame:rightFrame]; -} -#endif - - -#pragma mark - -#pragma mark Task interaction - -/** - * Disable all content interactive elements during an ongoing task. - */ -- (void) startDocumentTaskForTab:(NSNotification *)aNotification -{ - isWorking = YES; - -#ifndef SP_REFACTOR /* Only proceed if this view is selected */ - // Only proceed if this view is selected. - if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:SPMainToolbarTableContent]) - return; -#endif - - [addButton setEnabled:NO]; - [removeButton setEnabled:NO]; - [duplicateButton setEnabled:NO]; - [reloadButton setEnabled:NO]; - [filterButton setEnabled:NO]; - tableRowsSelectable = NO; - [paginationPreviousButton setEnabled:NO]; - [paginationNextButton setEnabled:NO]; -#ifndef SP_REFACTOR - [paginationButton setEnabled:NO]; -#endif -} - -/** - * Enable all content interactive elements after an ongoing task. - */ -- (void) endDocumentTaskForTab:(NSNotification *)aNotification -{ - isWorking = NO; - -#ifndef SP_REFACTOR /* Only proceed if this view is selected */ - // Only proceed if this view is selected. - if (![[tableDocumentInstance selectedToolbarItemIdentifier] isEqualToString:SPMainToolbarTableContent]) - return; -#endif - - if ( ![[[tableDataInstance statusValues] objectForKey:@"Rows"] isNSNull] && selectedTable && [selectedTable length] && [tableDataInstance tableEncoding]) { - [addButton setEnabled:([tablesListInstance tableType] == SPTableTypeTable)]; - [self updatePaginationState]; - [reloadButton setEnabled:YES]; - } - - if ([tableContentView numberOfSelectedRows] > 0) { - if([tablesListInstance tableType] == SPTableTypeTable) { - [removeButton setEnabled:YES]; - [duplicateButton setEnabled:YES]; - } - } - - [filterButton setEnabled:[fieldField isEnabled]]; - tableRowsSelectable = YES; -} + [filterButton setEnabled:[fieldField isEnabled]]; + tableRowsSelectable = YES; +} #pragma mark - #pragma mark Other methods -- (void)controlTextDidChange:(NSNotification *)notification -{ -#ifndef SP_REFACTOR - if ([notification object] == filterTableView) { - - NSString *str = [[[[notification userInfo] objectForKey:@"NSFieldEditor"] textStorage] string]; - if(str && [str length]) { - if(lastEditedFilterTableValue) [lastEditedFilterTableValue release]; - lastEditedFilterTableValue = [[NSString stringWithString:str] retain]; - } - [self updateFilterTableClause:str]; - - } -#endif -} -/** - * If user selected a table cell which is a blob field and tried to edit it - * cancel the fieldEditor, display the field editor sheet instead for editing - * and re-enable the fieldEditor after editing. - */ -- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)aFieldEditor -{ - - if(control != tableContentView) return YES; - - NSUInteger row, column; - BOOL shouldBeginEditing = YES; - - row = [tableContentView editedRow]; - column = [tableContentView editedColumn]; - - // If cell editing mode and editing request comes - // from the keyboard show an error tooltip - // or bypass if numberOfPossibleUpdateRows == 1 - if([tableContentView isCellEditingMode]) { - NSArray *editStatus = [self fieldEditStatusForRow:row andColumn:[[NSArrayObjectAtIndex([tableContentView tableColumns], column) identifier] integerValue]]; - NSInteger numberOfPossibleUpdateRows = [[editStatus objectAtIndex:0] integerValue]; - NSPoint pos = [[tableDocumentInstance parentWindow] convertBaseToScreen:[tableContentView convertPoint:[tableContentView frameOfCellAtColumn:column row:row].origin toView:nil]]; - pos.y -= 20; - switch(numberOfPossibleUpdateRows) { - case -1: - [SPTooltip showWithObject:kCellEditorErrorNoMultiTabDb - atLocation:pos - ofType:@"text"]; - shouldBeginEditing = NO; - break; - case 0: - [SPTooltip showWithObject:[NSString stringWithFormat:kCellEditorErrorNoMatch, selectedTable] - atLocation:pos - ofType:@"text"]; - shouldBeginEditing = NO; - break; - - case 1: - shouldBeginEditing = YES; - break; - - default: - [SPTooltip showWithObject:[NSString stringWithFormat:kCellEditorErrorTooManyMatches, (long)numberOfPossibleUpdateRows, (numberOfPossibleUpdateRows>1)?NSLocalizedString(@"es", @"Plural suffix for row count, eg 4 match*es*"):@""] - atLocation:pos - ofType:@"text"]; - shouldBeginEditing = NO; - } - - } - - // Open the field editor sheet if required - if ([tableContentView shouldUseFieldEditorForRow:row column:column]) - { - [tableContentView setFieldEditorSelectedRange:[aFieldEditor selectedRange]]; - - // Cancel editing - [control abortEditing]; - - // Call the field editor sheet - [self tableView:tableContentView shouldEditTableColumn:NSArrayObjectAtIndex([tableContentView tableColumns], column) row:row]; - - // send current event to field editor sheet - if([NSApp currentEvent]) - [NSApp sendEvent:[NSApp currentEvent]]; - - return NO; - - } - - return shouldBeginEditing; - -} - -/** - * Trap the enter, escape, tab and arrow keys, overriding default behaviour and continuing/ending editing, - * only within the current row. - */ -- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command -{ - - // Check firstly if SPCopyTable can handle command -#ifndef SP_REFACTOR - if([control control:control textView:textView doCommandBySelector:(SEL)command]) -#else - if([(id)control control:control textView:textView doCommandBySelector:(SEL)command]) -#endif - return YES; - - // Trap the escape key - if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(cancelOperation:)] ) - { - // Abort editing - [control abortEditing]; - if(control == tableContentView) - [self cancelRowEditing]; - return TRUE; - } - - return FALSE; - -} - /** * This method is called as part of Key Value Observing which is used to watch for prefernce changes which effect the interface. */ @@ -5043,6 +4418,9 @@ [dataColumns release]; [oldRow release]; #ifndef SP_REFACTOR + for (id retainedObject in nibObjectsToRelease) [retainedObject release]; + [nibObjectsToRelease release]; + [filterTableData release]; if (lastEditedFilterTableValue) [lastEditedFilterTableValue release]; if (filterTableDefaultOperator) [filterTableDefaultOperator release]; @@ -5054,7 +4432,7 @@ if (sortCol) [sortCol release]; [usedQuery release]; if (sortColumnToRestore) [sortColumnToRestore release]; - if (selectionIndexToRestore) [selectionIndexToRestore release]; + if (selectionToRestore) [selectionToRestore release]; if (filterFieldToRestore) filterFieldToRestore = nil; if (filterComparisonToRestore) filterComparisonToRestore = nil; if (filterValueToRestore) filterValueToRestore = nil; diff --git a/Source/SPTableContentDataSource.h b/Source/SPTableContentDataSource.h new file mode 100644 index 00000000..7276f736 --- /dev/null +++ b/Source/SPTableContentDataSource.h @@ -0,0 +1,37 @@ +// +// $Id$ +// +// SPTableContentDataSource.h +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 20, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPTableContent.h" + +@interface SPTableContent (SPTableContentDataSource) + +@end diff --git a/Source/SPTableContentDataSource.m b/Source/SPTableContentDataSource.m new file mode 100644 index 00000000..a833add7 --- /dev/null +++ b/Source/SPTableContentDataSource.m @@ -0,0 +1,182 @@ +// +// $Id$ +// +// SPTableContentDataSource.m +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 20, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPTableContentDataSource.h" +#import "SPDataStorage.h" +#import "SPCopyTable.h" +#import "SPTablesList.h" + +#import +#import + +@implementation SPTableContent (SPTableContentDataSource) + +#pragma mark - +#pragma mark TableView datasource methods + +- (NSInteger)numberOfRowsInTableView:(SPCopyTable *)tableView +{ +#ifndef SP_REFACTOR + if (tableView == filterTableView) { + return filterTableIsSwapped ? [filterTableData count] : [[[filterTableData objectForKey:[NSNumber numberWithInteger:0]] objectForKey:@"filter"] count]; + } + else +#endif + if (tableView == tableContentView) { + return tableRowsCount; + } + + return 0; +} + +- (id)tableView:(SPCopyTable *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ +#ifndef SP_REFACTOR + if (tableView == filterTableView) { + if (filterTableIsSwapped) + + // First column shows the field names + if ([[tableColumn identifier] integerValue] == 0) { + return [[[NSTableHeaderCell alloc] initTextCell:[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"name"]] autorelease]; + } + else { + return NSArrayObjectAtIndex([[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"filter"], [[tableColumn identifier] integerValue] - 1); + } + else { + return NSArrayObjectAtIndex([[filterTableData objectForKey:[tableColumn identifier]] objectForKey:@"filter"], rowIndex); + } + } + else +#endif + if (tableView == tableContentView) { + + id value = nil; + NSUInteger columnIndex = [[tableColumn identifier] integerValue]; + + // While the table is being loaded, additional validation is required - data + // locks must be used to avoid crashes, and indexes higher than the available + // rows or columns may be requested. Return "..." to indicate loading in these + // cases. + if (isWorking) { + pthread_mutex_lock(&tableValuesLock); + + if (rowIndex < (NSInteger)tableRowsCount && columnIndex < [tableValues columnCount]) { + value = [[SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex) copy] autorelease]; + } + + pthread_mutex_unlock(&tableValuesLock); + + if (!value) return @"..."; + } + else { + value = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); + } + + if ([value isKindOfClass:[SPMySQLGeometryData class]]) + return [value wktString]; + + if ([value isNSNull]) + return [prefs objectForKey:SPNullValue]; + + if ([value isKindOfClass:[NSData class]]) + return [value shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]; + + if ([value isSPNotLoaded]) + return NSLocalizedString(@"(not loaded)", @"value shown for hidden blob and text fields"); + + return value; + } + + return nil; +} + +- (void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ +#ifndef SP_REFACTOR + if(tableView == filterTableView) { + if (filterTableIsSwapped) { + [[[filterTableData objectForKey:[NSNumber numberWithInteger:rowIndex]] objectForKey:@"filter"] replaceObjectAtIndex:([[tableColumn identifier] integerValue] - 1) withObject:(NSString *)object]; + } + else { + [[[filterTableData objectForKey:[tableColumn identifier]] objectForKey:@"filter"] replaceObjectAtIndex:rowIndex withObject:(NSString *)object]; + } + + [self updateFilterTableClause:nil]; + + return; + } + else +#endif + if (tableView == tableContentView) { + + // If the current cell should have been edited in a sheet, do nothing - field closing will have already + // updated the field. + if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:[[tableColumn identifier] integerValue]]) { + return; + } + + // If table data comes from a view, save back to the view + if ([tablesListInstance tableType] == SPTableTypeView) { + [self saveViewCellValue:object forTableColumn:tableColumn row:rowIndex]; + return; + } + + // Catch editing events in the row and if the row isn't currently being edited, + // start an edit. This allows edits including enum changes to save correctly. + if (isEditingRow && [tableContentView selectedRow] != currentlyEditingRow) { + [self saveRowOnDeselect]; + } + + if (!isEditingRow) { + [oldRow setArray:[tableValues rowContentsAtIndex:rowIndex]]; + + isEditingRow = YES; + currentlyEditingRow = rowIndex; + } + + NSDictionary *column = NSArrayObjectAtIndex(dataColumns, [[tableColumn identifier] integerValue]); + + if (object) { + // Restore NULLs if necessary + if ([object isEqualToString:[prefs objectForKey:SPNullValue]] && [[column objectForKey:@"null"] boolValue]) { + object = [NSNull null]; + } + + [tableValues replaceObjectInRow:rowIndex column:[[tableColumn identifier] integerValue] withObject:object]; + } + else { + [tableValues replaceObjectInRow:rowIndex column:[[tableColumn identifier] integerValue] withObject:@""]; + } + } +} + +@end diff --git a/Source/SPTableContentDelegate.h b/Source/SPTableContentDelegate.h new file mode 100644 index 00000000..25a19a50 --- /dev/null +++ b/Source/SPTableContentDelegate.h @@ -0,0 +1,37 @@ +// +// $Id$ +// +// SPTableContentDelegate.h +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 20, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPTableContent.h" + +@interface SPTableContent (SPTableContentDelegate) + +@end diff --git a/Source/SPTableContentDelegate.m b/Source/SPTableContentDelegate.m new file mode 100644 index 00000000..3fdf1232 --- /dev/null +++ b/Source/SPTableContentDelegate.m @@ -0,0 +1,782 @@ +// +// $Id$ +// +// SPTableContentDelegate.m +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 20, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPTableContentDelegate.h" +#ifndef SP_REFACTOR /* headers */ +#import "SPAppController.h" +#endif +#import "SPDatabaseDocument.h" +#import "SPDataStorage.h" +#import "SPGeometryDataView.h" +#import "SPTooltip.h" +#import "SPTablesList.h" +#import +#ifndef SP_REFACTOR /* headers */ +#import "SPBundleHTMLOutputController.h" +#endif +#import "SPCopyTable.h" +#import "SPAlertSheets.h" +#import "SPTableData.h" +#import "SPFieldEditorController.h" + +#import + +@interface SPTableContent (SPDeclaredAPI) + +- (BOOL)cancelRowEditing; + +@end + +@implementation SPTableContent (SPTableContentDelegate) + +#pragma mark - +#pragma mark TableView delegate methods + +/** + * Sorts the tableView by the clicked column. If clicked twice, order is altered to descending. + * Performs the task in a new thread if necessary. + */ +- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn +{ + if ([selectedTable isEqualToString:@""] || !selectedTable || tableView != tableContentView) return; + + // Prevent sorting while the table is still loading + if ([tableDocumentInstance isWorking]) return; + + // Start the task + [tableDocumentInstance startTaskWithDescription:NSLocalizedString(@"Sorting table...", @"Sorting table task description")]; + + if ([NSThread isMainThread]) { + [NSThread detachNewThreadSelector:@selector(sortTableTaskWithColumn:) toTarget:self withObject:tableColumn]; + } + else { + [self sortTableTaskWithColumn:tableColumn]; + } +} + +- (void)tableViewSelectionDidChange:(NSNotification *)aNotification +{ + // Check our notification object is our table content view + if ([aNotification object] != tableContentView) return; + + isFirstChangeInView = YES; + + [addButton setEnabled:([tablesListInstance tableType] == SPTableTypeTable)]; + + // If we are editing a row, attempt to save that row - if saving failed, reselect the edit row. + if (isEditingRow && [tableContentView selectedRow] != currentlyEditingRow && ![self saveRowOnDeselect]) return; + + if (![tableDocumentInstance isWorking]) { + // Update the row selection count + // and update the status of the delete/duplicate buttons + if([tablesListInstance tableType] == SPTableTypeTable) { + if ([tableContentView numberOfSelectedRows] > 0) { + [duplicateButton setEnabled:([tableContentView numberOfSelectedRows] == 1)]; + [removeButton setEnabled:YES]; + } + else { + [duplicateButton setEnabled:NO]; + [removeButton setEnabled:NO]; + } + } + else { + [duplicateButton setEnabled:NO]; + [removeButton setEnabled:NO]; + } + } + + [self updateCountText]; + +#ifndef SP_REFACTOR /* triggered commands */ + NSArray *triggeredCommands = [[NSApp delegate] bundleCommandsForTrigger:SPBundleTriggerActionTableRowChanged]; + + for (NSString *cmdPath in triggeredCommands) + { + NSArray *data = [cmdPath componentsSeparatedByString:@"|"]; + NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; + + [aMenuItem setTag:0]; + [aMenuItem setToolTip:[data objectAtIndex:0]]; + + // For HTML output check if corresponding window already exists + BOOL stopTrigger = NO; + + if ([(NSString *)[data objectAtIndex:2] length]) { + BOOL correspondingWindowFound = NO; + NSString *uuid = [data objectAtIndex:2]; + + for (id win in [NSApp windows]) + { + if ([[[[win delegate] class] description] isEqualToString:@"SPBundleHTMLOutputController"]) { + if ([[[win delegate] windowUUID] isEqualToString:uuid]) { + correspondingWindowFound = YES; + break; + } + } + } + + if (!correspondingWindowFound) stopTrigger = YES; + } + if (!stopTrigger) { + + if ([[data objectAtIndex:1] isEqualToString:SPBundleScopeGeneral]) { + [[[NSApp delegate] onMainThread] executeBundleItemForApp:aMenuItem]; + } + else if ([[data objectAtIndex:1] isEqualToString:SPBundleScopeDataTable]) { + if ([[[[[NSApp mainWindow] firstResponder] class] description] isEqualToString:@"SPCopyTable"]) { + [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForDataTable:aMenuItem]; + } + } + else if ([[data objectAtIndex:1] isEqualToString:SPBundleScopeInputField]) { + if ([[[NSApp mainWindow] firstResponder] isKindOfClass:[NSTextView class]]) { + [[[[NSApp mainWindow] firstResponder] onMainThread] executeBundleItemForInputField:aMenuItem]; + } + } + } + } +#endif +} + +/** + * Saves the new column size in the preferences. + */ +- (void)tableViewColumnDidResize:(NSNotification *)notification +{ + // Check our notification object is our table content view + if ([notification object] != tableContentView) return; + + // Sometimes the column has no identifier. I can't figure out what is causing it, so we just skip over this item + if (![[[notification userInfo] objectForKey:@"NSTableColumn"] identifier]) return; + + NSMutableDictionary *tableColumnWidths; + NSString *database = [NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]; + NSString *table = [tablesListInstance tableName]; + + // Get tableColumnWidths object +#ifndef SP_REFACTOR + if ([prefs objectForKey:SPTableColumnWidths] != nil ) { + tableColumnWidths = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:SPTableColumnWidths]]; + } + else { +#endif + tableColumnWidths = [NSMutableDictionary dictionary]; +#ifndef SP_REFACTOR + } +#endif + + // Get the database object + if ([tableColumnWidths objectForKey:database] == nil) { + [tableColumnWidths setObject:[NSMutableDictionary dictionary] forKey:database]; + } + else { + [tableColumnWidths setObject:[NSMutableDictionary dictionaryWithDictionary:[tableColumnWidths objectForKey:database]] forKey:database]; + } + + // Get the table object + if ([[tableColumnWidths objectForKey:database] objectForKey:table] == nil) { + [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionary] forKey:table]; + } + else { + [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionaryWithDictionary:[[tableColumnWidths objectForKey:database] objectForKey:table]] forKey:table]; + } + + // Save column size + [[[tableColumnWidths objectForKey:database] objectForKey:table] + setObject:[NSNumber numberWithDouble:[(NSTableColumn *)[[notification userInfo] objectForKey:@"NSTableColumn"] width]] + forKey:[[[[notification userInfo] objectForKey:@"NSTableColumn"] headerCell] stringValue]]; +#ifndef SP_REFACTOR + [prefs setObject:tableColumnWidths forKey:SPTableColumnWidths]; +#endif +} + +/** + * Confirm whether to allow editing of a row. Returns YES by default, unless the multipleLineEditingButton is in + * the ON state, or for blob or text fields - in those cases opens a sheet for editing instead and returns NO. + */ +- (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ + if ([tableDocumentInstance isWorking]) return NO; + +#ifndef SP_REFACTOR + if (tableView == filterTableView) { + return (filterTableIsSwapped && [[tableColumn identifier] integerValue] == 0) ? NO : YES; + } + else +#endif + if (tableView == tableContentView) { + + // Ensure that row is editable since it could contain "(not loaded)" columns together with + // issue that the table has no primary key + NSString *wherePart = [NSString stringWithString:[self argumentForRow:[tableContentView selectedRow]]]; + + if ([wherePart length] == 0) return NO; + + // If the selected cell hasn't been loaded, load it. + if ([[tableValues cellDataAtRow:rowIndex column:[[tableColumn identifier] integerValue]] isSPNotLoaded]) { + + // Only get the data for the selected column, not all of them + NSString *query = [NSString stringWithFormat:@"SELECT %@ FROM %@ WHERE %@", [[[tableColumn headerCell] stringValue] backtickQuotedString], [selectedTable backtickQuotedString], wherePart]; + + SPMySQLResult *tempResult = [mySQLConnection queryString:query]; + + if (![tempResult numberOfRows]) { + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, + NSLocalizedString(@"Couldn't load the row. Reload the table to be sure that the row exists and use a primary key for your table.", @"message of panel when loading of row failed")); + return NO; + } + + NSArray *tempRow = [tempResult getRowAsArray]; + + [tableValues replaceObjectInRow:rowIndex column:[[tableContentView tableColumns] indexOfObject:tableColumn] withObject:[tempRow objectAtIndex:0]]; + [tableContentView reloadData]; + } + + // Open the editing sheet if required + if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:[[tableColumn identifier] integerValue]]) { + + // Retrieve the column definition + NSDictionary *columnDefinition = [cqColumnDefinition objectAtIndex:[[tableColumn identifier] integerValue]]; + BOOL isBlob = [tableDataInstance columnIsBlobOrText:[[tableColumn headerCell] stringValue]]; + + // A table is per definition editable + BOOL isFieldEditable = YES; + + // Check for Views if field is editable + if ([tablesListInstance tableType] == SPTableTypeView) { + NSArray *editStatus = [self fieldEditStatusForRow:rowIndex andColumn:[[tableColumn identifier] integerValue]]; + isFieldEditable = [[editStatus objectAtIndex:0] integerValue] == 1; + } + + NSString *fieldType = nil; + NSUInteger fieldLength = 0; + NSString *fieldEncoding = nil; + BOOL allowNULL = YES; + + fieldType = [columnDefinition objectForKey:@"type"]; + + if ([columnDefinition objectForKey:@"char_length"]) { + fieldLength = [[columnDefinition objectForKey:@"char_length"] integerValue]; + } + + if ([columnDefinition objectForKey:@"null"]) { + allowNULL = (![[columnDefinition objectForKey:@"null"] integerValue]); + } + + if ([columnDefinition objectForKey:@"charset_name"] && ![[columnDefinition objectForKey:@"charset_name"] isEqualToString:@"binary"]) { + fieldEncoding = [columnDefinition objectForKey:@"charset_name"]; + } + + if(fieldEditor) [fieldEditor release], fieldEditor = nil; + + fieldEditor = [[SPFieldEditorController alloc] init]; + + [fieldEditor setEditedFieldInfo:[NSDictionary dictionaryWithObjectsAndKeys: + [[tableColumn headerCell] stringValue], @"colName", + [self usedQuery], @"usedQuery", + @"content", @"tableSource", + nil]]; + + [fieldEditor setTextMaxLength:fieldLength]; + [fieldEditor setFieldType:(fieldType==nil) ? @"" : fieldType]; + [fieldEditor setFieldEncoding:(fieldEncoding==nil) ? @"" : fieldEncoding]; + [fieldEditor setAllowNULL:allowNULL]; + + id cellValue = [tableValues cellDataAtRow:rowIndex column:[[tableColumn identifier] integerValue]]; + + if ([cellValue isNSNull]) { + cellValue = [NSString stringWithString:[prefs objectForKey:SPNullValue]]; + } + + NSInteger editedColumn = 0; + + for (NSTableColumn* col in [tableContentView tableColumns]) + { + if ([[col identifier] isEqualToString:[tableColumn identifier]]) break; + + editedColumn++; + } + + [fieldEditor editWithObject:cellValue + fieldName:[[tableColumn headerCell] stringValue] + usingEncoding:[mySQLConnection stringEncoding] + isObjectBlob:isBlob + isEditable:isFieldEditable + withWindow:[tableDocumentInstance parentWindow] + sender:self + contextInfo:[NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithInteger:rowIndex], @"rowIndex", + [NSNumber numberWithInteger:editedColumn], @"columnIndex", + [NSNumber numberWithBool:isFieldEditable], @"isFieldEditable", + nil]]; + + return NO; + } + + return YES; + } + + return YES; +} + +/** + * Enable drag from tableview + */ +- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rows toPasteboard:(NSPasteboard*)pboard +{ + if (tableView == tableContentView) { + NSString *tmp; + + // By holding ⌘, ⇧, or/and ⌥ copies selected rows as SQL INSERTS + // otherwise \t delimited lines + if ([[NSApp currentEvent] modifierFlags] & (NSCommandKeyMask|NSShiftKeyMask|NSAlternateKeyMask)) { + tmp = [tableContentView rowsAsSqlInsertsOnlySelectedRows:YES]; + } + else { + tmp = [tableContentView draggedRowsAsTabString]; + } + + if (!tmp && [tmp length]) + { + [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType, NSStringPboardType, nil] owner:nil]; + + [pboard setString:tmp forType:NSStringPboardType]; + [pboard setString:tmp forType:NSTabularTextPboardType]; + + return YES; + } + } + + return NO; +} + +/** + * Disable row selection while the document is working. + */ +- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)rowIndex +{ +#ifndef SP_REFACTOR + if (tableView == filterTableView) { + return YES; + } + else +#endif + return tableView == tableContentView ? tableRowsSelectable : YES; +} + +/** + * Resize a column when it's double-clicked (10.6+ only). + */ +- (CGFloat)tableView:(NSTableView *)tableView sizeToFitWidthOfColumn:(NSInteger)columnIndex +{ + NSTableColumn *theColumn = [[tableView tableColumns] objectAtIndex:columnIndex]; + NSDictionary *columnDefinition = [dataColumns objectAtIndex:[[theColumn identifier] integerValue]]; + + // Get the column width + NSUInteger targetWidth = [tableContentView autodetectWidthForColumnDefinition:columnDefinition maxRows:500]; + +#ifndef SP_REFACTOR + // Clear any saved widths for the column + NSString *dbKey = [NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]; + NSString *tableKey = [tablesListInstance tableName]; + NSMutableDictionary *savedWidths = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:SPTableColumnWidths]]; + NSMutableDictionary *dbDict = [NSMutableDictionary dictionaryWithDictionary:[savedWidths objectForKey:dbKey]]; + NSMutableDictionary *tableDict = [NSMutableDictionary dictionaryWithDictionary:[dbDict objectForKey:tableKey]]; + + if ([tableDict objectForKey:[columnDefinition objectForKey:@"name"]]) { + [tableDict removeObjectForKey:[columnDefinition objectForKey:@"name"]]; + + if ([tableDict count]) { + [dbDict setObject:[NSDictionary dictionaryWithDictionary:tableDict] forKey:tableKey]; + } + else { + [dbDict removeObjectForKey:tableKey]; + } + + if ([dbDict count]) { + [savedWidths setObject:[NSDictionary dictionaryWithDictionary:dbDict] forKey:dbKey]; + } + else { + [savedWidths removeObjectForKey:dbKey]; + } + + [prefs setObject:[NSDictionary dictionaryWithDictionary:savedWidths] forKey:SPTableColumnWidths]; + } +#endif + + // Return the width, while the delegate is empty to prevent column resize notifications + [tableContentView setDelegate:nil]; + [tableContentView performSelector:@selector(setDelegate:) withObject:self afterDelay:0.1]; + + return targetWidth; +} + +/** + * This function changes the text color of text/blob fields which are null or not yet loaded to gray + */ +- (void)tableView:(SPCopyTable *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ +#ifndef SP_REFACTOR + if (tableView == filterTableView) { + if (filterTableIsSwapped && [[tableColumn identifier] integerValue] == 0) { + [cell setDrawsBackground:YES]; + [cell setBackgroundColor:lightGrayColor]; + } + else { + [cell setDrawsBackground:NO]; + } + + return; + } + else +#endif + if (tableView == tableContentView) { + + if (![cell respondsToSelector:@selector(setTextColor:)]) return; + + id theValue = nil; + NSUInteger columnIndex = [[tableColumn identifier] integerValue]; + + // While the table is being loaded, additional validation is required - data + // locks must be used to avoid crashes, and indexes higher than the available + // rows or columns may be requested. Use gray to indicate loading in these cases. + if (isWorking) { + pthread_mutex_lock(&tableValuesLock); + + if (rowIndex < (NSInteger)tableRowsCount && columnIndex < [tableValues columnCount]) { + theValue = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); + } + + pthread_mutex_unlock(&tableValuesLock); + + if (!theValue) { + [cell setTextColor:[NSColor lightGrayColor]]; + return; + } + } + else { + theValue = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); + } + + // If user wants to edit 'cell' set text color to black and return to avoid + // writing in gray if value was NULL + if ([tableView editedColumn] != -1 + && [tableView editedRow] == rowIndex + && (NSUInteger)[[NSArrayObjectAtIndex([tableView tableColumns], [tableView editedColumn]) identifier] integerValue] == columnIndex) { + [cell setTextColor:blackColor]; + return; + } + + // For null cells and not loaded cells, display the contents in gray. + if ([theValue isNSNull] || [theValue isSPNotLoaded]) { + [cell setTextColor:lightGrayColor]; + + // Otherwise, set the color to black - required as NSTableView reuses NSCells. + } + else { + [cell setTextColor:blackColor]; + } + } +} + +#ifndef SP_REFACTOR +/** + * Show the table cell content as tooltip + * + * - for text displays line breaks and tabs as well + * - if blob data can be interpret as image data display the image as transparent thumbnail + * (up to now using base64 encoded HTML data). + */ +- (NSString *)tableView:(NSTableView *)tableView toolTipForCell:(id)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation +{ + if (tableView == filterTableView) { + return nil; + } + else if (tableView == tableContentView) { + + if ([[aCell stringValue] length] < 2 || [tableDocumentInstance isWorking]) return nil; + + // Suppress tooltip if another toolip is already visible, mainly displayed by a Bundle command + // TODO has to be improved + for (id win in [NSApp orderedWindows]) + { + if ([[[[win contentView] class] description] isEqualToString:@"WebView"]) return nil; + } + + NSImage *image; + + NSPoint pos = [NSEvent mouseLocation]; + pos.y -= 20; + + id theValue = nil; + + // While the table is being loaded, additional validation is required - data + // locks must be used to avoid crashes, and indexes higher than the available + // rows or columns may be requested. Return "..." to indicate loading in these + // cases. + if (isWorking) { + pthread_mutex_lock(&tableValuesLock); + + if (row < (NSInteger)tableRowsCount && [[tableColumn identifier] integerValue] < (NSInteger)[tableValues columnCount]) { + theValue = [[SPDataStorageObjectAtRowAndColumn(tableValues, row, [[tableColumn identifier] integerValue]) copy] autorelease]; + } + + pthread_mutex_unlock(&tableValuesLock); + + if (!theValue) theValue = @"..."; + } + else { + theValue = SPDataStorageObjectAtRowAndColumn(tableValues, row, [[tableColumn identifier] integerValue]); + } + + if (theValue == nil) return nil; + + if ([theValue isKindOfClass:[NSData class]]) { + image = [[[NSImage alloc] initWithData:theValue] autorelease]; + + if (image) { + [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; + return nil; + } + } + else if ([theValue isKindOfClass:[SPMySQLGeometryData class]]) { + SPGeometryDataView *v = [[SPGeometryDataView alloc] initWithCoordinates:[theValue coordinates]]; + image = [v thumbnailImage]; + + if (image) { + [SPTooltip showWithObject:image atLocation:pos ofType:@"image"]; + [v release]; + return nil; + } + + [v release]; + } + + // Show the cell string value as tooltip (including line breaks and tabs) + // by using the cell's font + [SPTooltip showWithObject:[aCell stringValue] + atLocation:pos + ofType:@"text" + displayOptions:[NSDictionary dictionaryWithObjectsAndKeys: + [[aCell font] familyName], @"fontname", + [NSString stringWithFormat:@"%f",[[aCell font] pointSize]], @"fontsize", + nil]]; + + return nil; + } + + return nil; +} +#endif + +#ifndef SP_REFACTOR /* SplitView delegate methods */ + +#pragma mark - +#pragma mark SplitView delegate methods + +- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview +{ + return NO; +} + +/** + * Set a minimum size for the filter text area. + */ +- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset +{ + return proposedMax - 180; +} + +/** + * Set a minimum size for the field list and action area. + */ +- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset +{ + return proposedMin + 200; +} + +/** + * Improve default resizing and resize only the filter text area by default. + */ +- (void)splitView:(NSSplitView *)sender resizeSubviewsWithOldSize:(NSSize)oldSize +{ + NSSize newSize = [sender frame].size; + NSView *leftView = [[sender subviews] objectAtIndex:0]; + NSView *rightView = [[sender subviews] objectAtIndex:1]; + float dividerThickness = [sender dividerThickness]; + NSRect leftFrame = [leftView frame]; + NSRect rightFrame = [rightView frame]; + + // Resize height of both views + leftFrame.size.height = newSize.height; + rightFrame.size.height = newSize.height; + + // Only resize the right view's width - unless the constraint has been reached + if (rightFrame.size.width > 180 || newSize.width > oldSize.width) { + rightFrame.size.width = newSize.width - leftFrame.size.width - dividerThickness; + } + else { + leftFrame.size.width = newSize.width - rightFrame.size.width - dividerThickness; + } + + rightFrame.origin.x = leftFrame.size.width + dividerThickness; + + [leftView setFrame:leftFrame]; + [rightView setFrame:rightFrame]; +} + +#endif + +#pragma mark - +#pragma mark Control delegate methods + +- (void)controlTextDidChange:(NSNotification *)notification +{ +#ifndef SP_REFACTOR + if ([notification object] == filterTableView) { + + NSString *string = [[[[notification userInfo] objectForKey:@"NSFieldEditor"] textStorage] string]; + + if (string && [string length]) { + if (lastEditedFilterTableValue) [lastEditedFilterTableValue release]; + + lastEditedFilterTableValue = [[NSString stringWithString:string] retain]; + } + + [self updateFilterTableClause:string]; + } +#endif +} + +/** + * If the user selected a table cell which is a blob field and tried to edit it + * cancel the fieldEditor, display the field editor sheet instead for editing + * and re-enable the fieldEditor after editing. + */ +- (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)aFieldEditor +{ + if (control != tableContentView) return YES; + + NSUInteger row, column; + BOOL shouldBeginEditing = YES; + + row = [tableContentView editedRow]; + column = [tableContentView editedColumn]; + + // If cell editing mode and editing request comes + // from the keyboard show an error tooltip + // or bypass if numberOfPossibleUpdateRows == 1 + if ([tableContentView isCellEditingMode]) { + + NSArray *editStatus = [self fieldEditStatusForRow:row andColumn:[[NSArrayObjectAtIndex([tableContentView tableColumns], column) identifier] integerValue]]; + NSInteger numberOfPossibleUpdateRows = [[editStatus objectAtIndex:0] integerValue]; + NSPoint pos = [[tableDocumentInstance parentWindow] convertBaseToScreen:[tableContentView convertPoint:[tableContentView frameOfCellAtColumn:column row:row].origin toView:nil]]; + + pos.y -= 20; + + switch (numberOfPossibleUpdateRows) + { + case -1: + [SPTooltip showWithObject:kCellEditorErrorNoMultiTabDb + atLocation:pos + ofType:@"text"]; + shouldBeginEditing = NO; + break; + case 0: + [SPTooltip showWithObject:[NSString stringWithFormat:kCellEditorErrorNoMatch, selectedTable] + atLocation:pos + ofType:@"text"]; + shouldBeginEditing = NO; + break; + case 1: + shouldBeginEditing = YES; + break; + default: + [SPTooltip showWithObject:[NSString stringWithFormat:kCellEditorErrorTooManyMatches, (long)numberOfPossibleUpdateRows, (numberOfPossibleUpdateRows>1)?NSLocalizedString(@"es", @"Plural suffix for row count, eg 4 match*es*"):@""] + atLocation:pos + ofType:@"text"]; + shouldBeginEditing = NO; + } + + } + + // Open the field editor sheet if required + if ([tableContentView shouldUseFieldEditorForRow:row column:column]) + { + [tableContentView setFieldEditorSelectedRange:[aFieldEditor selectedRange]]; + + // Cancel editing + [control abortEditing]; + + // Call the field editor sheet + [self tableView:tableContentView shouldEditTableColumn:NSArrayObjectAtIndex([tableContentView tableColumns], column) row:row]; + + // send current event to field editor sheet + if ([NSApp currentEvent]) { + [NSApp sendEvent:[NSApp currentEvent]]; + } + + return NO; + } + + return shouldBeginEditing; +} + +/** + * Trap the enter, escape, tab and arrow keys, overriding default behaviour and continuing/ending editing, + * only within the current row. + */ +- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command +{ +#ifndef SP_REFACTOR + // Check firstly if SPCopyTable can handle command + if ([control control:control textView:textView doCommandBySelector:(SEL)command]) +#else + if ([(id)control control:control textView:textView doCommandBySelector:(SEL)command]) +#endif + return YES; + + // Trap the escape key + if ([[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(cancelOperation:)]) { + // Abort editing + [control abortEditing]; + + if (control == tableContentView) { + [self cancelRowEditing]; + } + + return YES; + } + + return NO; +} + +@end diff --git a/Source/SPTableCopy.m b/Source/SPTableCopy.m index 1059e032..137e18a6 100644 --- a/Source/SPTableCopy.m +++ b/Source/SPTableCopy.m @@ -24,7 +24,7 @@ #import "SPDBActionCommons.h" #import "SPTableCopy.h" -#import "SPMySQL.h" +#import @implementation SPTableCopy diff --git a/Source/SPTableData.h b/Source/SPTableData.h index 94c95da4..e292fe7a 100644 --- a/Source/SPTableData.h +++ b/Source/SPTableData.h @@ -35,6 +35,7 @@ NSMutableArray *constraints; NSArray *triggers; NSMutableDictionary *status; + NSMutableArray *primaryKeyColumns; NSString *tableEncoding; NSString *tableCreateSyntax; diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 0c0814d6..f7bbeec2 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -30,7 +30,7 @@ #import "SPAlertSheets.h" #import "RegexKitLite.h" #import "SPServerSupport.h" -#import "SPMySQL.h" +#import #include @interface SPTableData (PrivateAPI) @@ -53,6 +53,7 @@ columnNames = [[NSMutableArray alloc] init]; constraints = [[NSMutableArray alloc] init]; status = [[NSMutableDictionary alloc] init]; + primaryKeyColumns = [[NSMutableArray alloc] init]; triggers = nil; tableEncoding = nil; @@ -375,6 +376,7 @@ [columnNames removeAllObjects]; [constraints removeAllObjects]; tableHasAutoIncrementField = NO; + [primaryKeyColumns removeAllObjects]; if( [tableListInstance tableType] == SPTableTypeTable || [tableListInstance tableType] == SPTableTypeView ) { tableData = [self informationForTable:[tableListInstance tableName]]; @@ -400,6 +402,7 @@ [tableEncoding release]; } tableEncoding = [[NSString alloc] initWithString:[tableData objectForKey:@"encoding"]]; + [primaryKeyColumns addObjectsFromArray:[tableData objectForKey:@"primarykeyfield"]]; pthread_mutex_unlock(&dataProcessingLock); @@ -419,6 +422,7 @@ NSEnumerator *enumerator; tableHasAutoIncrementField = NO; + [primaryKeyColumns removeAllObjects]; if (viewData == nil) { [columns removeAllObjects]; @@ -707,33 +711,38 @@ // add "isprimarykey" to the corresponding tableColumn // add dict root "primarykeyfield" = for faster accessing else if( [NSArrayObjectAtIndex(parts, 0) hasPrefix:@"PRIMARY"] && [parts count] == 3) { - NSString *parsedString = [(NSString*)NSArrayObjectAtIndex(parts, 2) stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; - if([parsedString length]>4) { - NSString *priFieldName = [[parsedString substringWithRange:NSMakeRange(2,[parsedString length]-4)] stringByReplacingOccurrencesOfString:@"``" withString:@"`"]; - [tableData setObject:priFieldName forKey:@"primarykeyfield"]; - for(id theTableColumn in tableColumns) - if([[theTableColumn objectForKey:@"name"] isEqualToString:priFieldName]) { - [theTableColumn setObject:[NSNumber numberWithInteger:1] forKey:@"isprimarykey"]; - break; + SPSQLParser *keyParser = [SPSQLParser stringWithString:NSArrayObjectAtIndex(parts, 2)]; + keyParser = [SPSQLParser stringWithString:[keyParser stringFromCharacter:'(' toCharacter:')' inclusively:NO]]; + NSArray *primaryKeyQuotedNames = [keyParser splitStringByCharacter:',']; + if ([keyParser length]) { + NSMutableArray *primaryKeyFields = [NSMutableArray array]; + for (NSString *quotedKeyName in primaryKeyQuotedNames) { + NSString *primaryFieldName = [[SPSQLParser stringWithString:quotedKeyName] unquotedString]; + [primaryKeyFields addObject:primaryFieldName]; + for (NSMutableDictionary *theTableColumn in tableColumns) { + if ([[theTableColumn objectForKey:@"name"] isEqualToString:primaryFieldName]) { + [theTableColumn setObject:[NSNumber numberWithInteger:1] forKey:@"isprimarykey"]; + break; + } } + } + [tableData setObject:primaryKeyFields forKey:@"primarykeyfield"]; } } // unique keys // add to each corresponding tableColumn the tag "unique" if given else if( [NSArrayObjectAtIndex(parts, 0) hasPrefix:@"UNIQUE"] && [parts count] == 4) { - NSString *parsedString = [(NSString*)NSArrayObjectAtIndex(parts, 3) stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; - if([parsedString length]>4) { - NSArray *uniqueFieldNames = [parsedString componentsSeparatedByString:@"`,`"]; - for(NSString* uniq in uniqueFieldNames) { - NSString *uniqField = [[uniq stringByReplacingOccurrencesOfRegex:@"^\\(`|`\\)" withString:@""] stringByReplacingOccurrencesOfString:@"``" withString:@"`"]; - for(id theTableColumn in tableColumns) - if([[theTableColumn objectForKey:@"name"] isEqualToString:uniqField]) { - [theTableColumn setObject:[NSNumber numberWithInteger:1] forKey:@"unique"]; - break; - } + SPSQLParser *keyParser = [SPSQLParser stringWithString:NSArrayObjectAtIndex(parts, 3)]; + keyParser = [SPSQLParser stringWithString:[keyParser stringFromCharacter:'(' toCharacter:')' inclusively:NO]]; + for (NSString *quotedUniqueKey in [keyParser splitStringByCharacter:',']) { + NSString *uniqueFieldName = [[SPSQLParser stringWithString:quotedUniqueKey] unquotedString]; + for (NSMutableDictionary *theTableColumn in tableColumns) { + if ([[theTableColumn objectForKey:@"name"] isEqualToString:uniqueFieldName]) { + [theTableColumn setObject:[NSNumber numberWithInteger:1] forKey:@"unique"]; + break; + } } - } } // who knows @@ -764,7 +773,10 @@ encodingString = [[NSString alloc] initWithString:[createTableParser substringWithRange:NSMakeRange(stringStart, i-stringStart)]]; } - // If no DEFAULT CHARSET is present, it's likely MySQL < 4; fall back to latin1. + // If no DEFAULT CHARSET is present, fall back to either the database encoding (works back to MySQL 3), + // or if no document is available to supply the database encoding, Latin1. + } else if ([tableDocumentInstance databaseEncoding]) { + encodingString = [[NSString alloc] initWithString:[tableDocumentInstance databaseEncoding]]; } else { encodingString = [[NSString alloc] initWithString:@"latin1"]; } @@ -1284,52 +1296,19 @@ - (NSArray *)primaryKeyColumnNames { - // Ensure that identifier queries occur over UTF8 - BOOL changeEncoding = ![[mySQLConnection encoding] isEqualToString:@"utf8"]; - if (changeEncoding) { - [mySQLConnection storeEncodingForRestoration]; - [mySQLConnection setEncoding:@"utf8"]; - } - - NSString *selectedTable = [tableListInstance tableName]; - if(![selectedTable length]) return nil; - - SPMySQLResult *r; - NSMutableArray *keyColumns = [NSMutableArray array]; - - // select all columns that are primary keys - // MySQL before 5.0.3 does not support the WHERE syntax - r = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM %@ /*!50003 WHERE `key` = 'PRI'*/", [selectedTable backtickQuotedString]]]; - [r setReturnDataAsStrings:YES]; - [r setDefaultRowReturnType:SPMySQLResultRowAsArray]; - - if ([r numberOfRows] < 1) { - if (changeEncoding && [mySQLConnection isConnected]) [mySQLConnection restoreStoredEncoding]; - return nil; - } - - if ([mySQLConnection queryErrored]) { - if ([mySQLConnection isConnected]) { - NSRunAlertPanel(@"Error", [NSString stringWithFormat:NSLocalizedString(@"An error occured while retrieving the PRIMARY KEY data:\n\n%@",@"message when the query that fetches the primary keys fails"), [mySQLConnection lastErrorMessage]], @"OK", nil, nil); - if (changeEncoding) [mySQLConnection restoreStoredEncoding]; - } - return nil; - } - - - for (NSArray *resultRow in r) { + // If processing is already in action, wait for it to complete + [self _loopWhileWorking]; - // check if the row is indeed a key (for MySQL servers before 5.0.3) - if ([[NSArrayObjectAtIndex(resultRow ,3) description] isEqualToString:@"PRI"]) { - [keyColumns addObject:[NSArrayObjectAtIndex(resultRow ,0) description]]; + if ([columns count] == 0) { + if ([tableListInstance tableType] == SPTableTypeView) { + [self updateInformationForCurrentView]; + } else { + [self updateInformationForCurrentTable]; } } - if (changeEncoding) [mySQLConnection restoreStoredEncoding]; - - if([keyColumns count]) return keyColumns; - - return nil; + if (![primaryKeyColumns count]) return nil; + return primaryKeyColumns; } #pragma mark - @@ -1343,6 +1322,7 @@ [columnNames release]; [constraints release]; [status release]; + [primaryKeyColumns release]; if (triggers) [triggers release]; if (tableEncoding) [tableEncoding release]; diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 44d05ee7..2cc3c9d2 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -30,7 +30,7 @@ #import "SPTableView.h" #import "SPAlertSheets.h" #import "RegexKitLite.h" -#import "SPMySQL.h" +#import static NSString *SPRemoveRelation = @"SPRemoveRelation"; diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 2fbd6b5b..e443710c 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -36,7 +36,7 @@ #import "SPIndexesController.h" #import "RegexKitLite.h" #import "SPTableFieldValidation.h" -#import "SPMySQL.h" +#import @interface SPTableStructure (PrivateAPI) @@ -292,15 +292,19 @@ // Set up the encoding PopUpButtonCell NSArray *encodings = [databaseDataInstance getDatabaseCharacterSetEncodings]; if ([encodings count]) { - [[encodingPopupCell onMainThread] removeAllItems]; - [[encodingPopupCell onMainThread] addItemWithTitle:@""]; // Populate encoding popup button + NSMutableArray *encodingTitles = [[NSMutableArray alloc] initWithCapacity:[encodings count]+1]; + [encodingTitles addObject:@""]; for (NSDictionary *encoding in encodings) - [[encodingPopupCell onMainThread] addItemWithTitle:(![encoding objectForKey:@"DESCRIPTION"]) ? [encoding objectForKey:@"CHARACTER_SET_NAME"] : [NSString stringWithFormat:@"%@ (%@)", [encoding objectForKey:@"DESCRIPTION"], [encoding objectForKey:@"CHARACTER_SET_NAME"]]]; + [encodingTitles addObject:(![encoding objectForKey:@"DESCRIPTION"]) ? [encoding objectForKey:@"CHARACTER_SET_NAME"] : [NSString stringWithFormat:@"%@ (%@)", [encoding objectForKey:@"DESCRIPTION"], [encoding objectForKey:@"CHARACTER_SET_NAME"]]]; + [[encodingPopupCell onMainThread] removeAllItems]; + [[encodingPopupCell onMainThread] addItemsWithTitles:encodingTitles]; + [encodingTitles release]; } else { + [[encodingPopupCell onMainThread] removeAllItems]; [[encodingPopupCell onMainThread] addItemWithTitle:NSLocalizedString(@"Not available", @"not available label")]; } @@ -547,6 +551,7 @@ return; } + [theResult setReturnDataAsStrings:YES]; NSDictionary *analysisResult = [theResult getRowAsDictionary]; NSString *type = [analysisResult objectForKey:@"Optimal_fieldtype"]; @@ -694,10 +699,15 @@ NSArray *buttons = [alert buttons]; +#ifndef SP_REFACTOR // Change the alert's cancel button to have the key equivalent of return [[buttons objectAtIndex:0] setKeyEquivalent:@"d"]; [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; +#else + [[buttons objectAtIndex:0] setKeyEquivalent:@"\r"]; + [[buttons objectAtIndex:1] setKeyEquivalent:@"\e"]; +#endif [alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(removeFieldSheetDidEnd:returnCode:contextInfo:) contextInfo:(hasForeignKey) ? @"removeFieldAndForeignKey" : @"removeField"]; } diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index fdcf6b3b..6fc5e7b6 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -30,7 +30,7 @@ #import "SPTableData.h" #import "SPTableView.h" #import "SPTableFieldValidation.h" -#import "SPMySQL.h" +#import @implementation SPTableStructure (SPTableStructureDelegate) @@ -49,7 +49,7 @@ if([[tableColumn identifier] isEqualToString:@"collation"]) { NSInteger idx = 0; - if((idx = [[NSArrayObjectAtIndex(tableFields,rowIndex) objectForKey:@"encoding"] integerValue]) > 0) { + if((idx = [[NSArrayObjectAtIndex(tableFields,rowIndex) objectForKey:@"encoding"] integerValue]) > 0 && idx < [encodingPopupCell numberOfItems]) { NSString *enc = [[encodingPopupCell itemAtIndex:idx] title]; NSInteger start = [enc rangeOfString:@"("].location+1; NSInteger end = [enc length] - start - 1; diff --git a/Source/SPTableTriggers.m b/Source/SPTableTriggers.m index ee5a6d5a..d798a76b 100644 --- a/Source/SPTableTriggers.m +++ b/Source/SPTableTriggers.m @@ -30,7 +30,7 @@ #import "SPTableView.h" #import "SPAlertSheets.h" #import "SPServerSupport.h" -#import "SPMySQL.h" +#import // Constants static const NSString *SPTriggerName = @"TriggerName"; diff --git a/Source/SPTableView.m b/Source/SPTableView.m index e135e16b..3fced944 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -241,6 +241,34 @@ emptyDoubleClickAction = aSelector; } +#ifdef SP_REFACTOR + +- (void)delete:(id)sender +{ + if ( [[self delegate] respondsToSelector:@selector(removeField:)] ) + { + [[self delegate] performSelector:@selector(removeField:) withObject:self]; + } + else if ( [[self delegate] respondsToSelector:@selector(removeIndex:)] ) + { + [[self delegate] performSelector:@selector(removeIndex:) withObject:self]; + } +} + + +- (BOOL)validateMenuItem:(NSMenuItem *)menuItem +{ + if ( [menuItem action] == @selector(delete:) ) + { + if ( [self numberOfSelectedRows] == 0 ) + return NO; + } + + return YES; +} + +#endif + @end diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h index 6da4f6cc..897fb6b3 100644 --- a/Source/SPTablesList.h +++ b/Source/SPTablesList.h @@ -78,8 +78,8 @@ #endif #ifndef SP_REFACTOR IBOutlet id toolbarActionsButton; - IBOutlet id toolbarReloadButton; #endif + IBOutlet id toolbarReloadButton; IBOutlet id addTableButton; #ifndef SP_REFACTOR IBOutlet id truncateTableButton; @@ -139,10 +139,10 @@ // IBAction methods - (IBAction)updateTables:(id)sender; - - (IBAction)addTable:(id)sender; - (IBAction)closeSheet:(id)sender; - (IBAction)removeTable:(id)sender; + #ifndef SP_REFACTOR /* method decls */ - (IBAction)copyTable:(id)sender; - (IBAction)renameTable:(id)sender; @@ -150,15 +150,19 @@ - (IBAction)openTableInNewTab:(id)sender; - (IBAction)togglePaneCollapse:(id)sender; #endif + // Additional methods - (void)setConnection:(SPMySQLConnection *)theConnection; - (void)setSelectionState:(NSDictionary *)selectionDetails; + #ifndef SP_REFACTOR /* method decls */ - (void)selectTableAtIndex:(NSNumber *)row; - (void)makeTableListFilterHaveFocus; +#endif // Getters - (NSArray *)selectedTableNames; +#ifndef SP_REFACTOR /* method decls */ - (NSArray *)selectedTableItems; - (NSArray *)selectedTableTypes; #endif @@ -181,9 +185,9 @@ - (BOOL)selectItemsWithNames:(NSArray *)theNames; // Table list filter interaction -- (void) showFilter; -- (void) hideFilter; -- (void) clearFilter; +- (void)showFilter; +- (void)hideFilter; +- (void)clearFilter; #endif - (IBAction) updateFilter:(id)sender; @@ -199,16 +203,19 @@ @property (assign) SPTableContent* tableContentInstance; @property (assign) id toolbarAddButton; @property (assign) id toolbarDeleteButton; +@property (assign) id toolbarReloadButton; @property (assign) id tableSheet; @property (assign) id tableNameField; @property (assign) id tableEncodingButton; @property (assign) id tableTypeButton; @property (assign) id databaseDataInstance; @property (assign) id addTableButton; -@property (assign) NSTableView* tablesListView; +@property (assign) SPTableView* tablesListView; @property (assign) SQLSidebarViewController* sidebarViewController; - (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView; - (void)setDatabaseDocument:(SPDatabaseDocument*)val; +- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex; + #endif @end diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index 0283eb98..690b30d9 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -27,7 +27,7 @@ #import "SPDatabaseDocument.h" #import "SPTableStructure.h" #import "SPDatabaseViewController.h" -#import "SPMySQL.h" +#import #ifndef SP_REFACTOR /* headers */ #import "SPTableContent.h" @@ -74,8 +74,8 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; - (void)_addTable; #ifndef SP_REFACTOR - (void)_copyTable; -- (void)_renameTableOfType:(SPTableType)tableType from:(NSString *)oldTableName to:(NSString *)newTableName; #endif +- (void)_renameTableOfType:(SPTableType)tableType from:(NSString *)oldTableName to:(NSString *)newTableName; @end @@ -86,6 +86,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; @synthesize databaseDataInstance; @synthesize toolbarAddButton; @synthesize toolbarDeleteButton; +@synthesize toolbarReloadButton; @synthesize tableSourceInstance; @synthesize tableContentInstance; @synthesize tableSheet; @@ -96,6 +97,83 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; @synthesize tablesListView; #endif +#pragma mark - +#pragma mark Initialisation + +/** + * Standard init method. Performs various ivar initialisations. + */ +- (id)init +{ + if ((self = [super init])) { + tables = [[NSMutableArray alloc] init]; + filteredTables = tables; + tableTypes = [[NSMutableArray alloc] init]; + filteredTableTypes = tableTypes; + isTableListFiltered = NO; + tableListIsSelectable = YES; + tableListContainsViews = NO; + selectedTableType = SPTableTypeNone; + selectedTableName = nil; +#ifndef SP_REFACTOR + [tables addObject:NSLocalizedString(@"TABLES", @"header for table list")]; + + smallSystemFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; +#endif + } + + return self; +} + +/** + * Standard awakeFromNib method for interface loading. + */ +- (void)awakeFromNib +{ +#ifndef SP_REFACTOR + // Collapse the table information pane if preference to do so is set + if ([[[NSUserDefaults standardUserDefaults] objectForKey:SPTableInformationPanelCollapsed] boolValue] + && [tableListSplitView collapsibleSubview]) { + [tableInfoCollapseButton setNextState]; + [tableInfoCollapseButton setToolTip:NSLocalizedString(@"Show Table Information",@"Show Table Information")]; + [tableListSplitView setValue:[NSNumber numberWithFloat:[tableListSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"]; + [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:NO]; + [[tableListSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListSplitView collapsibleSubview].frame.size.width, 0)]; + [tableListSplitView setCollapsibleSubviewCollapsed:YES]; + [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:YES]; + } + else { + [tableInfoCollapseButton setToolTip:NSLocalizedString(@"Hide Table Information",@"Hide Table Information")]; + } + + // Start the table filter list collapsed + if ([tableListFilterSplitView collapsibleSubview]) { + [tableListFilterSplitView setValue:[NSNumber numberWithFloat:[tableListFilterSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"]; + // Set search bar view to the height of 1 instead of 0 to ensure that the view will be visible + // after opening a next connection window which has more than 20 tables + [[tableListFilterSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListFilterSplitView collapsibleSubview].frame.size.width, 1)]; + [tableListFilterSplitView setCollapsibleSubviewCollapsed:YES]; + } + + // Disable tab edit behaviour in the tables list + [tablesListView setTabEditingDisabled:YES]; +#endif + + // Add observers for document task activity + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(startDocumentTaskForTab:) + name:SPDocumentTaskStartNotification + object:tableDocumentInstance]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(endDocumentTaskForTab:) + name:SPDocumentTaskEndNotification + object:tableDocumentInstance]; + +#ifndef SP_REFACTOR + [tablesListView registerForDraggedTypes:[NSArray arrayWithObjects:SPNavigatorTableDataPasteboardDragType, nil]]; +#endif +} + #pragma mark - #pragma mark IBAction methods @@ -214,58 +292,8 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } } } -#endif /* - BOOL addedPFHeader = FALSE; - NSString *pQuery = [NSString stringWithFormat:@"SHOW PROCEDURE STATUS WHERE db = '%@'",[tableDocumentInstance database]]; - theResult = [mySQLConnection queryString:pQuery]; - - if( [theResult numOfRows] ) { - // add the header row - [tables addObject:NSLocalizedString(@"PROCS & FUNCS",@"header for procs & funcs list")]; - [tableTypes addObject:[NSNumber numberWithInt:SPTableTypeNone]]; - addedPFHeader = TRUE; - [theResult dataSeek:0]; - - if( [theResult numOfFields] == 1 ) { - for( i = 0; i < [theResult numOfRows]; i++ ) { - [tables addObject:[[theResult fetchRowAsArray] objectAtIndex:1]]; - [tableTypes addObject:[NSNumber numberWithInt:SPTableTypeProc]]; - } - } else { - for( i = 0; i < [theResult numOfRows]; i++ ) { - resultRow = [theResult fetchRowAsArray]; - [tables addObject:[resultRow objectAtIndex:1]]; - [tableTypes addObject:[NSNumber numberWithInt:SPTableTypeProc]]; - } - } - } - - pQuery = [NSString stringWithFormat:@"SHOW FUNCTION STATUS WHERE db = '%@'",[tableDocumentInstance database]]; - theResult = [mySQLConnection queryString:pQuery]; - - if( [theResult numOfRows] ) { - if( !addedPFHeader ) { - // add the header row - [tables addObject:NSLocalizedString(@"PROCS & FUNCS",@"header for procs & funcs list")]; - [tableTypes addObject:[NSNumber numberWithInt:SPTableTypeNone]]; - } - [theResult dataSeek:0]; - - if( [theResult numOfFields] == 1 ) { - for( i = 0; i < [theResult numOfRows]; i++ ) { - [tables addObject:[[theResult fetchRowAsArray] objectAtIndex:1]]; - [tableTypes addObject:[NSNumber numberWithInt:SPTableTypeFunc]]; - } - } else { - for( i = 0; i < [theResult numOfRows]; i++ ) { - resultRow = [theResult fetchRowAsArray]; - [tables addObject:[resultRow objectAtIndex:1]]; - [tableTypes addObject:[NSNumber numberWithInt:SPTableTypeFunc]]; - } - } - } - */ - +#endif + // Restore encoding if appropriate if (changeEncoding) [mySQLConnection restoreStoredEncoding]; @@ -273,6 +301,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadWithName:@"SMySQLQueryHasBeenPerformed" object:tableDocumentInstance]; } +#ifndef SP_REFACTOR // Add the table headers even if no tables were found if (tableListContainsViews) { [tables insertObject:NSLocalizedString(@"TABLES & VIEWS",@"header for table & views list") atIndex:0]; @@ -282,9 +311,14 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } [tableTypes insertObject:[NSNumber numberWithInteger:SPTableTypeNone] atIndex:0]; +#endif #ifndef SP_REFACTOR /* ui manipulation */ [[tablesListView onMainThread] reloadData]; +#else + [sidebarViewController setTableNames:[self allTableNames] selectedTableName:selectedTableName]; + [sidebarViewController tableViewSelectionDidChange:nil]; + #endif // if the previous selected table still exists, select it @@ -432,10 +466,15 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; NSArray *buttons = [alert buttons]; +#ifndef SP_REFACTOR // Change the alert's cancel button to have the key equivalent of return [[buttons objectAtIndex:0] setKeyEquivalent:@"d"]; [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; +#else + [[buttons objectAtIndex:0] setKeyEquivalent:@"\r"]; // Return = OK + [[buttons objectAtIndex:1] setKeyEquivalent:@"\e"]; // Esc = Cancel +#endif NSIndexSet *indexes = [tablesListView selectedRowIndexes]; @@ -558,38 +597,6 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; if (![[self tableName] length]) return; [tablesListView editColumn:0 row:[tablesListView selectedRow] withEvent:nil select:YES]; - - /* - - [tableRenameField setStringValue:[self tableName]]; - [renameTableButton setEnabled:NO]; - - NSString *tableType; - - switch([self tableType]){ - case SPTableTypeTable: - tableType = NSLocalizedString(@"table",@"table"); - break; - case SPTableTypeView: - tableType = NSLocalizedString(@"view",@"view"); - break; - case SPTableTypeProc: - tableType = NSLocalizedString(@"procedure",@"procedure"); - break; - case SPTableTypeFunc: - tableType = NSLocalizedString(@"function",@"function"); - break; - } - - [tableRenameText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Rename %@ '%@' to:",@"rename item name to:"), tableType, [self tableName]]]; - - - [NSApp beginSheet:tableRenameSheet - modalForWindow:[tableDocumentInstance parentWindow] - modalDelegate:self - didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:@"renameTable"]; - */ } /** @@ -677,10 +684,12 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; - (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo { // Order out current sheet to suppress overlapping of sheets - if ([sheet respondsToSelector:@selector(orderOut:)]) + if ([sheet respondsToSelector:@selector(orderOut:)]) { [sheet orderOut:nil]; - else if ([sheet respondsToSelector:@selector(window)]) + } + else if ([sheet respondsToSelector:@selector(window)]) { [[sheet window] orderOut:nil]; + } if ([contextInfo isEqualToString:SPAddRow]) { alertSheetOpened = NO; @@ -721,6 +730,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; - (void)setConnection:(SPMySQLConnection *)theConnection { mySQLConnection = theConnection; + [self updateTables:self]; } @@ -777,7 +787,9 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; { // First handle empty or multiple selections if (!selectionDetails || ![selectionDetails objectForKey:@"name"]) { +#ifndef SP_REFACTOR NSIndexSet *indexes = [tablesListView selectedRowIndexes]; +#endif // Update the selected table name and type if (selectedTableName) [selectedTableName release]; selectedTableName = nil; @@ -1099,12 +1111,9 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; #endif } -#ifndef SP_REFACTOR /* getters */ - #pragma mark - #pragma mark Getter methods - - (NSArray *)selectedTableNames { NSIndexSet *indexes = [tablesListView selectedRowIndexes]; @@ -1120,6 +1129,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; return selTables; } +#ifndef SP_REFACTOR /* getters */ - (NSArray *)selectedTableItems { NSIndexSet *indexes = [tablesListView selectedRowIndexes]; @@ -1187,6 +1197,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } return returnArray; } + - (NSArray *)allTableNames { NSMutableArray *returnArray = [NSMutableArray array]; @@ -1198,6 +1209,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } return returnArray; } + - (NSArray *)allViewNames { NSMutableArray *returnArray = [NSMutableArray array]; @@ -1210,6 +1222,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [returnArray sortUsingSelector:@selector(compare:)]; return returnArray; } + - (NSArray *)allProcedureNames { NSMutableArray *returnArray = [NSMutableArray array]; @@ -1262,11 +1275,9 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; return tableTypes; } - #pragma mark - #pragma mark Setter methods - /** * Select an item using the provided name; returns YES if the * supplied name could be selected, or NO if not. @@ -1445,7 +1456,6 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; */ - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { - // During imports the table view sometimes appears to request items beyond the end of the array. // Using a hinted noteNumberOfRowsChanged after dropping tables fixes this but then seems to stick // even after override, so check here for the time being and display empty rows during import. @@ -1461,7 +1471,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; { return ![tableDocumentInstance isWorking]; } - +#endif /** * Renames a table (in tables-array and mysql-db). @@ -1516,13 +1526,16 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; SPBeginAlertSheet( NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, [myException reason]); } +#ifndef SP_REFACTOR // Set window title to reflect the new table name [tableDocumentInstance updateWindowTitle:self]; +#endif // Query the structure of all databases in the background (mainly for completion) [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[tableDocumentInstance databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; } +#ifndef SP_REFACTOR #pragma mark - #pragma mark TableView delegate methods @@ -1704,7 +1717,8 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [aCell setFont:smallSystemFont]; } - } else { + } + else { [aCell setImage:nil]; [aCell setIndentationLevel:0]; } @@ -1832,7 +1846,6 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; */ - (IBAction) updateFilter:(id)sender { - // Don't try and maintain selections of multiple rows through filtering if ([tablesListView numberOfSelectedRows] > 1) { [tablesListView deselectAll:self]; @@ -1862,6 +1875,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; if (substringRange.location == NSNotFound) continue; } +#ifndef SP_REFACTOR // Add a title if necessary if ((tableType == SPTableTypeTable || tableType == SPTableTypeView) && lastTableType == NSNotFound) { @@ -1877,6 +1891,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [filteredTables addObject:NSLocalizedString(@"PROCS & FUNCS",@"header for procs & funcs list")]; [filteredTableTypes addObject:[NSNumber numberWithInteger:SPTableTypeNone]]; } +#endif lastTableType = tableType; // Add the item @@ -1899,7 +1914,8 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } isTableListFiltered = YES; - } else if (isTableListFiltered) { + } + else if (isTableListFiltered) { isTableListFiltered = NO; [filteredTables release]; #endif @@ -1910,18 +1926,12 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } #endif -#ifdef SP_REFACTOR - [sidebarViewController setTableNames:[self allTableNames]]; -#endif - +#ifndef SP_REFACTOR // Reselect correct row and reload the table view display if ([tablesListView numberOfRows] < (NSInteger)[filteredTables count]) [tablesListView noteNumberOfRowsChanged]; - if (selectedTableName) [tablesListView selectRowIndexes:[NSIndexSet indexSetWithIndex:[filteredTables indexOfObject:selectedTableName] -#ifdef SP_REFACTOR - - 1 -#endif - ] byExtendingSelection:NO]; + if (selectedTableName) [tablesListView selectRowIndexes:[NSIndexSet indexSetWithIndex:[filteredTables indexOfObject:selectedTableName]] byExtendingSelection:NO]; [tablesListView reloadData]; +#endif } /** @@ -1948,33 +1958,33 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; /** * Disable all table list interactive elements during an ongoing task. */ -- (void) startDocumentTaskForTab:(NSNotification *)aNotification +- (void)startDocumentTaskForTab:(NSNotification *)aNotification { tableListIsSelectable = NO; [toolbarAddButton setEnabled:NO]; #ifndef SP_REFACTOR [toolbarActionsButton setEnabled:NO]; - [toolbarReloadButton setEnabled:NO]; #endif + [toolbarReloadButton setEnabled:NO]; } /** * Enable all table list interactive elements after an ongoing task. */ -- (void) endDocumentTaskForTab:(NSNotification *)aNotification +- (void)endDocumentTaskForTab:(NSNotification *)aNotification { tableListIsSelectable = YES; [toolbarAddButton setEnabled:YES]; #ifndef SP_REFACTOR [toolbarActionsButton setEnabled:YES]; - [toolbarReloadButton setEnabled:YES]; #endif + [toolbarReloadButton setEnabled:YES]; } /** * Set the table list to selectable or not during the task process. */ -- (void) setTableListSelectability:(BOOL)isSelectable +- (void)setTableListSelectability:(BOOL)isSelectable { tableListIsSelectable = isSelectable; } @@ -1993,77 +2003,14 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; #pragma mark - #pragma mark Other -/** - * Standard init method. Performs various ivar initialisations. - */ -- (id)init +#ifdef SP_REFACTOR /* glue */ +- (void)setDatabaseDocument:(SPDatabaseDocument*)val { - if ((self = [super init])) { - tables = [[NSMutableArray alloc] init]; - filteredTables = tables; - tableTypes = [[NSMutableArray alloc] init]; - filteredTableTypes = tableTypes; - isTableListFiltered = NO; - tableListIsSelectable = YES; - tableListContainsViews = NO; - selectedTableType = SPTableTypeNone; - selectedTableName = nil; - [tables addObject:NSLocalizedString(@"TABLES",@"header for table list")]; -#ifndef SP_REFACTOR /* font */ - smallSystemFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; -#endif - } - - return self; + tableDocumentInstance = val; } - -/** - * Standard awakeFromNib method for interface loading. - */ -- (void)awakeFromNib -{ -#ifndef SP_REFACTOR - // Collapse the table information pane if preference to do so is set - if ([[[NSUserDefaults standardUserDefaults] objectForKey:SPTableInformationPanelCollapsed] boolValue] - && [tableListSplitView collapsibleSubview]) { - [tableInfoCollapseButton setNextState]; - [tableInfoCollapseButton setToolTip:NSLocalizedString(@"Show Table Information",@"Show Table Information")]; - [tableListSplitView setValue:[NSNumber numberWithFloat:[tableListSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"]; - [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:NO]; - [[tableListSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListSplitView collapsibleSubview].frame.size.width, 0)]; - [tableListSplitView setCollapsibleSubviewCollapsed:YES]; - [[tableListSplitView collapsibleSubview] setAutoresizesSubviews:YES]; - } else { - [tableInfoCollapseButton setToolTip:NSLocalizedString(@"Hide Table Information",@"Hide Table Information")]; - } - - // Start the table filter list collapsed - if ([tableListFilterSplitView collapsibleSubview]) { - [tableListFilterSplitView setValue:[NSNumber numberWithFloat:[tableListFilterSplitView collapsibleSubview].frame.size.height] forKey:@"uncollapsedSize"]; - // Set search bar view to the height of 1 instead of 0 to ensure that the view will be visible - // after opening a next connection window which has more than 20 tables - [[tableListFilterSplitView collapsibleSubview] setFrameSize:NSMakeSize([tableListFilterSplitView collapsibleSubview].frame.size.width, 1)]; - [tableListFilterSplitView setCollapsibleSubviewCollapsed:YES]; - } - - // Disable tab edit behaviour in the tables list - [tablesListView setTabEditingDisabled:YES]; #endif - // Add observers for document task activity - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(startDocumentTaskForTab:) - name:SPDocumentTaskStartNotification - object:tableDocumentInstance]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(endDocumentTaskForTab:) - name:SPDocumentTaskEndNotification - object:tableDocumentInstance]; - -#ifndef SP_REFACTOR - [tablesListView registerForDraggedTypes:[NSArray arrayWithObjects:SPNavigatorTableDataPasteboardDragType, nil]]; -#endif -} +#pragma mark - /** * Standard dealloc method. @@ -2083,15 +2030,8 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [super dealloc]; } - -#ifdef SP_REFACTOR /* glue */ -- (void)setDatabaseDocument:(SPDatabaseDocument*)val -{ - tableDocumentInstance = val; -} -#endif - -#ifndef SP_REFACTOR /* operations performed on whole tables */ +#pragma mark - +#pragma mark Private API /** * Removes the selected object (table, view, procedure, function, etc.) from the database and tableView. @@ -2178,15 +2118,21 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [tablesListView deselectAll:self]; +#ifndef SP_REFACTOR // set window title [tableDocumentInstance updateWindowTitle:self]; - +#endif +#ifdef SP_REFACTOR + [sidebarViewController setTableNames:filteredTables selectedTableName:nil]; +#endif // Query the structure of all databases in the background (mainly for completion) [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[tableDocumentInstance databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; } +#ifndef SP_REFACTOR /* operations performed on whole tables */ + /** * Trucates the selected table(s). */ @@ -2211,12 +2157,11 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [filteredTables objectAtIndex:currentIndex], [mySQLConnection lastErrorMessage]]]; [alert setAlertStyle:NSCriticalAlertStyle]; - // NSArray *buttons = [alert buttons]; - // // Change the alert's cancel button to have the key equivalent of return - // [[buttons objectAtIndex:0] setKeyEquivalent:@"t"]; - // [[buttons objectAtIndex:0] setKeyEquivalentModifierMask:NSCommandKeyMask]; - // [[buttons objectAtIndex:1] setKeyEquivalent:@"\r"]; - [alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:@"truncateTableError"]; + + [alert beginSheetModalForWindow:[tableDocumentInstance parentWindow] + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:@"truncateTableError"]; } // Get next index (beginning from the end) @@ -2240,7 +2185,9 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [NSThread detachNewThreadSelector:@selector(_addTable) toTarget:self withObject:nil]; return; } + NSAutoreleasePool *tableAdditionPool = [[NSAutoreleasePool alloc] init]; + [tableDocumentInstance startTaskWithDescription:[NSString stringWithFormat:NSLocalizedString(@"Creating %@...", @"Creating table task string"), [tableNameField stringValue]]]; NSString *charSetStatement = @""; @@ -2251,6 +2198,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; // Ensure the use of UTF8 when creating new tables BOOL changeEncoding = ![[mySQLConnection encoding] isEqualToString:@"utf8"]; + if (changeEncoding) { [mySQLConnection storeEncodingForRestoration]; [mySQLConnection setEncoding:@"utf8"]; @@ -2259,7 +2207,9 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; // If there is an encoding selected other than the default we must specify it in CREATE TABLE statement if ([tableEncodingButton indexOfSelectedItem] > 0) { NSString *encodingName = [[tableEncodingButton title] stringByMatching:@"\\((.*)\\)" capture:1L]; + if (!encodingName) encodingName = @"utf8"; + charSetStatement = [NSString stringWithFormat:@"DEFAULT CHARACTER SET %@", [encodingName backtickQuotedString]]; } @@ -2318,9 +2268,14 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [tableDocumentInstance viewStructure:self]; #endif - // Query the structure of all databases in the background (mainly for completion) - [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:[tableDocumentInstance databaseStructureRetrieval] withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; +#ifdef SP_REFACTOR + [sidebarViewController setTableNames:[self allTableNames] selectedTableName:selectedTableName]; +#endif + // Query the structure of all databases in the background (mainly for completion) + [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) + toTarget:[tableDocumentInstance databaseStructureRetrieval] + withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", nil]]; } else { // Error while creating new table @@ -2330,14 +2285,15 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, @selector(sheetDidEnd:returnCode:contextInfo:), SPAddRow, [NSString stringWithFormat:NSLocalizedString(@"An error occurred while trying to add the new table '%@'.\n\nMySQL said: %@", @"error adding new table informative message"), tableName, [mySQLConnection lastErrorMessage]]); - + if (changeEncoding) [mySQLConnection restoreStoredEncoding]; + [[tablesListView onMainThread] reloadData]; } // Clear table name [[tableNameField onMainThread] setStringValue:@""]; - + [tableDocumentInstance endTask]; [tableAdditionPool release]; } @@ -2527,6 +2483,7 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; } } } +#endif /** * Renames a table, view, procedure or function. Also handles only changes in case! @@ -2616,6 +2573,5 @@ static NSString *SPDuplicateTable = @"SPDuplicateTable"; [NSException raise:@"Object of unknown type" format:NSLocalizedString(@"An error occured while renaming. '%@' is of an unknown type.", @"rename error - don't know what type the renamed thing is"), oldTableName]; } -#endif @end diff --git a/Source/SPTablesPreferencePane.m b/Source/SPTablesPreferencePane.m index 90a1893b..6e009cd8 100644 --- a/Source/SPTablesPreferencePane.m +++ b/Source/SPTablesPreferencePane.m @@ -53,7 +53,6 @@ NSFont *font = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]]; [globalResultTableFontName setFont:font]; - [globalResultTableFontName setStringValue:[NSString stringWithFormat:@"%@, %.1f pt", [font displayName], [font pointSize]]]; } #pragma mark - diff --git a/Source/SPTextView.h b/Source/SPTextView.h index 5c9c4054..3f70edde 100644 --- a/Source/SPTextView.h +++ b/Source/SPTextView.h @@ -110,6 +110,13 @@ @property(assign) BOOL completionIsOpen; @property(assign) BOOL completionWasReinvokedAutomatically; +#ifdef SP_REFACTOR +@property (assign) SPDatabaseDocument *tableDocumentInstance; +@property (assign) SPTablesList *tablesListInstance; +@property (assign) SPCustomQuery *customQueryInstance; +@property (assign) SPMySQLConnection *mySQLConnection; +#endif + #ifndef SP_REFACTOR - (IBAction)showMySQLHelpForCurrentWord:(id)sender; #endif diff --git a/Source/SPTextView.m b/Source/SPTextView.m index 137ff021..a1b80ab4 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -33,10 +33,14 @@ #import "SPNavigatorController.h" #import "SPAlertSheets.h" #import "RegexKitLite.h" +#ifndef SP_REFACTOR /* headers */ #import "SPBundleHTMLOutputController.h" +#endif #import "SPDatabaseViewController.h" +#ifndef SP_REFACTOR /* headers */ #import "SPAppController.h" -#import "SPMySQL.h" +#endif +#import #import "SPDatabaseStructure.h" #pragma mark - @@ -105,6 +109,13 @@ static inline NSPoint SPPointOnLine(NSPoint a, NSPoint b, CGFloat t) { return NS @synthesize completionIsOpen; @synthesize completionWasReinvokedAutomatically; +#ifdef SP_REFACTOR +@synthesize tableDocumentInstance; +@synthesize tablesListInstance; +@synthesize customQueryInstance; +@synthesize mySQLConnection; +#endif + /** * Sort function (mainly used to sort the words in the textView) */ diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m index b2a2354b..8c5043cf 100644 --- a/Source/SPTextViewAdditions.m +++ b/Source/SPTextViewAdditions.m @@ -24,9 +24,13 @@ #import "SPAlertSheets.h" #import "SPTooltip.h" +#ifndef SP_REFACTOR /* headers */ #import "SPBundleHTMLOutputController.h" +#endif #import "SPCustomQuery.h" +#ifndef SP_REFACTOR /* headers */ #import "SPAppController.h" +#endif #import "SPFieldEditorController.h" #import "SPTextView.h" #import "SPWindowController.h" @@ -553,7 +557,7 @@ currentLineRange = [[self string] lineRangeForRange:NSMakeRange([self selectedRange].location, 0)]; if(selfIsQueryEditor) { - currentQueryRange = [[self delegate] currentQueryRange]; + currentQueryRange = [(SPCustomQuery*)[self delegate] currentQueryRange]; } else { currentQueryRange = currentLineRange; } @@ -617,8 +621,8 @@ } } - if(selfIsQueryEditor && [[self delegate] currentQueryRange].length) - [env setObject:[[self string] substringWithRange:[[self delegate] currentQueryRange]] forKey:SPBundleShellVariableCurrentQuery]; + if(selfIsQueryEditor && [(SPCustomQuery*)[self delegate] currentQueryRange].length) + [env setObject:[[self string] substringWithRange:[(SPCustomQuery*)[self delegate] currentQueryRange]] forKey:SPBundleShellVariableCurrentQuery]; if(currentSelectionRange.length) [env setObject:[[self string] substringWithRange:currentSelectionRange] forKey:SPBundleShellVariableSelectedText]; diff --git a/Source/SPUserManager.h b/Source/SPUserManager.h index 11bb736e..319d83b5 100644 --- a/Source/SPUserManager.h +++ b/Source/SPUserManager.h @@ -31,9 +31,7 @@ NSManagedObjectContext *managedObjectContext; NSDictionary *privColumnToGrantMap; - BOOL isInitializing; - - SPMySQLConnection *mySqlConnection; + SPMySQLConnection *connection; SPServerSupport *serverSupport; IBOutlet NSOutlineView *outlineView; @@ -70,10 +68,11 @@ NSSortDescriptor *treeSortDescriptor; BOOL isSaving; + BOOL isInitializing; NSMutableString *errorsString; } -@property (nonatomic, retain) SPMySQLConnection *mySqlConnection; +@property (nonatomic, retain) SPMySQLConnection *connection; @property (nonatomic, retain) SPServerSupport *serverSupport; @property (nonatomic, retain) NSPersistentStoreCoordinator *persistentStoreCoordinator; @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m index 9fb2cc18..224b36c6 100644 --- a/Source/SPUserManager.m +++ b/Source/SPUserManager.m @@ -29,12 +29,14 @@ #import "SPConnectionController.h" #import "SPServerSupport.h" #import "SPAlertSheets.h" -#import "SPMySQL.h" + +#import +#import #import static const NSString *SPTableViewNameColumnID = @"NameColumn"; -@interface SPUserManager (PrivateAPI) +@interface SPUserManager () - (void)_initializeTree:(NSArray *)items; - (void)_initializeUsers; @@ -51,12 +53,13 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; - (NSArray *)_fetchPrivsWithUser:(NSString *)username schema:(NSString *)selectedSchema host:(NSString *)host; - (void)_setSchemaPrivValues:(NSArray *)objects enabled:(BOOL)enabled; - (void)_initializeAvailablePrivs; +- (void)_renameUserFrom:(NSString *)originalUser host:(NSString *)originalHost to:(NSString *)newUser host:(NSString *)newHost; @end @implementation SPUserManager -@synthesize mySqlConnection; +@synthesize connection; @synthesize privsSupportedByServer; @synthesize managedObjectContext; @synthesize managedObjectModel; @@ -144,21 +147,21 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; NSMutableArray *usersResultArray = [NSMutableArray array]; // Select users from the mysql.user table - SPMySQLResult *result = [self.mySqlConnection queryString:@"SELECT * FROM mysql.user ORDER BY user"]; + SPMySQLResult *result = [[self connection] queryString:@"SELECT * FROM mysql.user ORDER BY user"]; [result setReturnDataAsStrings:YES]; [usersResultArray addObjectsFromArray:[result getAllRows]]; [self _initializeTree:usersResultArray]; // Set up the array of privs supported by this server. - [self.privsSupportedByServer removeAllObjects]; + [[self privsSupportedByServer] removeAllObjects]; result = nil; // Attempt to obtain user privileges if supported if ([serverSupport supportsShowPrivileges]) { - result = [self.mySqlConnection queryString:@"SHOW PRIVILEGES"]; + result = [[self connection] queryString:@"SHOW PRIVILEGES"]; [result setReturnDataAsStrings:YES]; } @@ -173,12 +176,13 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [privKey replaceOccurrencesOfString:@" " withString:@"_" options:NSLiteralSearch range:NSMakeRange(0, [privKey length])]; [privKey appendString:@"_priv"]; - [self.privsSupportedByServer setValue:[NSNumber numberWithBool:YES] forKey:privKey]; + [[self privsSupportedByServer] setValue:[NSNumber numberWithBool:YES] forKey:privKey]; } } // If that fails, base privilege support on the mysql.users columns else { - result = [self.mySqlConnection queryString:@"SHOW COLUMNS FROM mysql.user"]; + result = [[self connection] queryString:@"SHOW COLUMNS FROM mysql.user"]; + [result setReturnDataAsStrings:YES]; while ((privRow = [result getRowAsArray])) @@ -189,7 +193,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; if ([privColumnToGrantMap objectForKey:privKey]) privKey = [privColumnToGrantMap objectForKey:privKey]; - [self.privsSupportedByServer setValue:[NSNumber numberWithBool:YES] forKey:[privKey lowercaseString]]; + [[self privsSupportedByServer] setValue:[NSNumber numberWithBool:YES] forKey:[privKey lowercaseString]]; } } @@ -270,16 +274,15 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; - (void)_initializeAvailablePrivs { // Initialize available privileges - NSManagedObjectContext *moc = self.managedObjectContext; - NSEntityDescription *privEntityDescription = [NSEntityDescription entityForName:@"Privileges" - inManagedObjectContext:moc]; + NSManagedObjectContext *moc = [self managedObjectContext]; + NSEntityDescription *privEntityDescription = [NSEntityDescription entityForName:@"Privileges" inManagedObjectContext:moc]; NSArray *props = [privEntityDescription attributeKeys]; [availablePrivs removeAllObjects]; for (NSString *prop in props) { - if ([prop hasSuffix:@"_priv"] && [[self.privsSupportedByServer objectForKey:prop] boolValue]) { + if ([prop hasSuffix:@"_priv"] && [[[self privsSupportedByServer] objectForKey:prop] boolValue]) { NSString *displayName = [[prop stringByReplacingOccurrencesOfString:@"_priv" withString:@""] replaceUnderscoreWithSpace]; [availablePrivs addObject:[NSDictionary dictionaryWithObjectsAndKeys:displayName, @"displayName", prop, @"name", nil]]; @@ -296,7 +299,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; { // Initialize Databases [schemas removeAllObjects]; - [schemas addObjectsFromArray:[self.mySqlConnection databases]]; + [schemas addObjectsFromArray:[[self connection] databases]]; [schemaController rearrangeObjects]; @@ -354,16 +357,16 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [child setPrimitiveValue:[child valueForKey:@"host"] forKey:@"originalhost"]; // Select rows from the db table that contains schema privs for each user/host - NSString *queryString = [NSString stringWithFormat:@"SELECT * from mysql.db d WHERE d.user = %@ and d.host = %@", + NSString *queryString = [NSString stringWithFormat:@"SELECT * FROM mysql.db WHERE user = %@ AND host = %@", [[[child parent] valueForKey:@"user"] tickQuotedString], [[child valueForKey:@"host"] tickQuotedString]]; - SPMySQLResult *queryResults = [self.mySqlConnection queryString:queryString]; + SPMySQLResult *queryResults = [[self connection] queryString:queryString]; [queryResults setReturnDataAsStrings:YES]; for (NSDictionary *rowDict in queryResults) { - NSManagedObject *dbPriv = [NSEntityDescription insertNewObjectForEntityForName:@"Privileges" - inManagedObjectContext:[self managedObjectContext]]; + NSManagedObject *dbPriv = [NSEntityDescription insertNewObjectForEntityForName:@"Privileges" inManagedObjectContext:[self managedObjectContext]]; + for (NSString *key in rowDict) { if ([key hasSuffix:@"_priv"]) { @@ -437,7 +440,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; if (coordinator != nil) { managedObjectContext = [[NSManagedObjectContext alloc] init]; - [managedObjectContext setPersistentStoreCoordinator: coordinator]; + [managedObjectContext setPersistentStoreCoordinator:coordinator]; } [[NSNotificationCenter defaultCenter] addObserver:self @@ -448,119 +451,6 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; return managedObjectContext; } -#pragma mark - -#pragma mark OutlineView Delegate Methods - -- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell*)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item -{ - if ([cell isKindOfClass:[ImageAndTextCell class]]) - { - // Determines which Image to display depending on parent or child object - if ([(NSManagedObject *)[item representedObject] parent] != nil) - { - NSImage *image1 = [[NSImage imageNamed:NSImageNameNetwork] retain]; - [image1 setScalesWhenResized:YES]; - [image1 setSize:(NSSize){16,16}]; - [(ImageAndTextCell*)cell setImage:image1]; - [image1 release]; - - } - else { - NSImage *image1 = [[NSImage imageNamed:NSImageNameUser] retain]; - [image1 setScalesWhenResized:YES]; - [image1 setSize:(NSSize){16,16}]; - [(ImageAndTextCell*)cell setImage:image1]; - [image1 release]; - } - } -} - -- (BOOL)outlineView:(NSOutlineView *)olv isGroupItem:(id)item -{ - return NO; -} - -- (BOOL)outlineView:(NSOutlineView *)olv shouldSelectItem:(id)item -{ - return YES; -} - -- (BOOL)outlineView:(NSOutlineView *)olv shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item -{ - return ([[[item representedObject] children] count] == 0); -} - -- (void)outlineViewSelectionDidChange:(NSNotification *)notification -{ - if ([[treeController selectedObjects] count] == 0) return; - - id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; - - if ([selectedObject parent] == nil && !([[[tabView selectedTabViewItem] identifier] isEqualToString:@"General"])) { - [tabView selectTabViewItemWithIdentifier:@"General"]; - } - else { - if ([selectedObject parent] != nil && [[[tabView selectedTabViewItem] identifier] isEqualToString:@"General"]) { - [tabView selectTabViewItemWithIdentifier:@"Global Privileges"]; - } - } - - if ([selectedObject parent] != nil && [selectedObject host] == nil) - { - [selectedObject setValue:@"%" forKey:@"host"]; - [outlineView reloadItem:selectedObject]; - } - - [schemasTableView deselectAll:nil]; - [grantedTableView deselectAll:nil]; - [availableTableView deselectAll:nil]; -} - -- (BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)outlineView -{ - if ([[treeController selectedObjects] count] > 0) - { - id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; - // Check parents - if ([selectedObject valueForKey:@"parent"] == nil) - { - NSString *name = [selectedObject valueForKey:@"user"]; - NSArray *results = [self _fetchUserWithUserName:name]; - if ([results count] > 1) - { - NSAlert *alert = [NSAlert alertWithMessageText:@"Duplicate User" - defaultButton:NSLocalizedString(@"OK", @"OK button") - alternateButton:nil - otherButton:nil - informativeTextWithFormat:@"A user with that name already exists"]; - [alert runModal]; - return NO; - } - } - else - { - NSArray *children = [selectedObject valueForKeyPath:@"parent.children"]; - NSString *host = [selectedObject valueForKey:@"host"]; - for (NSManagedObject *child in children) - { - if (![selectedObject isEqual:child] && [[child valueForKey:@"host"] isEqualToString:host]) - { - NSAlert *alert = [NSAlert alertWithMessageText:@"Duplicate Host" - defaultButton:NSLocalizedString(@"OK", @"OK button") - alternateButton:nil - otherButton:nil - informativeTextWithFormat:@"A user with that host already exists"]; - [alert runModal]; - return NO; - } - } - } - - } - - return YES; -} - #pragma mark - #pragma mark General IBAction methods @@ -569,6 +459,9 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; */ - (IBAction)doCancel:(id)sender { + // Change the first responder to end editing in any field + [[self window] makeFirstResponder:self]; + [[self managedObjectContext] rollback]; // Close sheet @@ -588,19 +481,25 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [[self window] makeFirstResponder:self]; isSaving = YES; + [[self managedObjectContext] save:&error]; + isSaving = NO; + if (error != nil) [errorsString appendString:[error localizedDescription]]; - [self.mySqlConnection queryString:@"FLUSH PRIVILEGES"]; + [[self connection] queryString:@"FLUSH PRIVILEGES"]; // Display any errors if ([errorsString length]) { [errorsTextView setString:errorsString]; [NSApp beginSheet:errorsSheet modalForWindow:[NSApp keyWindow] modalDelegate:nil didEndSelector:NULL contextInfo:nil]; [errorsString release]; + return; } + + [errorsString release]; // Otherwise, close the sheet [NSApp endSheet:[self window] returnCode:0]; @@ -615,15 +514,15 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; id selectedUser = [[treeController selectedObjects] objectAtIndex:0]; // Iterate through the supported privs, setting the value of each to YES - for (NSString *key in self.privsSupportedByServer) { + for (NSString *key in [self privsSupportedByServer]) + { if (![key hasSuffix:@"_priv"]) continue; // Perform the change in a try/catch check to avoid exceptions for unhandled privs - @try { + NS_DURING [selectedUser setValue:[NSNumber numberWithBool:YES] forKey:key]; - } - @catch (NSException * e) { - } + NS_HANDLER + NS_ENDHANDLER } } @@ -635,15 +534,15 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; id selectedUser = [[treeController selectedObjects] objectAtIndex:0]; // Iterate through the supported privs, setting the value of each to NO - for (NSString *key in self.privsSupportedByServer) { + for (NSString *key in [self privsSupportedByServer]) + { if (![key hasSuffix:@"_priv"]) continue; // Perform the change in a try/catch check to avoid exceptions for unhandled privs - @try { + NS_DURING [selectedUser setValue:[NSNumber numberWithBool:NO] forKey:key]; - } - @catch (NSException * e) { - } + NS_HANDLER + NS_ENDHANDLER } } @@ -674,14 +573,12 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; */ - (IBAction)removeUser:(id)sender { - NSString *username = [[[treeController selectedObjects] objectAtIndex:0] - valueForKey:@"originaluser"]; - NSArray *children = [[[treeController selectedObjects] objectAtIndex:0] - valueForKey:@"children"]; + NSString *username = [[[treeController selectedObjects] objectAtIndex:0] valueForKey:@"originaluser"]; + NSArray *children = [[[treeController selectedObjects] objectAtIndex:0] valueForKey:@"children"]; // On all the children - host entries - set the username to be deleted, // for later query contruction. - for(NSManagedObject *child in children) + for (NSManagedObject *child in children) { [child setPrimitiveValue:username forKey:@"user"]; } @@ -729,6 +626,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // the drop sql command NSManagedObject *child = [[treeController selectedObjects] objectAtIndex:0]; NSManagedObject *parent = [child valueForKey:@"parent"]; + [child setPrimitiveValue:[[child valueForKey:@"parent"] valueForKey:@"user"] forKey:@"user"]; [treeController remove:sender]; @@ -777,13 +675,13 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; */ - (IBAction)doubleClickSchemaPriv:(id)sender { - // Ignore double-clicked header cells if ([sender clickedRow] == -1) return; if (sender == availableTableView) { [self addSchemaPriv:sender]; - } else { + } + else { [self removeSchemaPriv:sender]; } } @@ -793,7 +691,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; */ - (IBAction)refresh:(id)sender { - if ([self.managedObjectContext hasChanges]) { + if ([[self managedObjectContext] hasChanges]) { NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Unsaved changes", @"unsaved changes message") defaultButton:NSLocalizedString(@"Continue", @"continue button") @@ -807,36 +705,37 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; if ([alert runModal] == NSAlertAlternateReturn) return; } - [self.managedObjectContext reset]; + [[self managedObjectContext] reset]; + [grantedSchemaPrivs removeAllObjects]; [grantedTableView reloadData]; + [self _initializeAvailablePrivs]; - [outlineView reloadData]; + + [outlineView reloadData]; [treeController rearrangeObjects]; // Get all the stores on the current MOC and remove them. - NSArray *stores = [[self.managedObjectContext persistentStoreCoordinator] persistentStores]; + NSArray *stores = [[[self managedObjectContext] persistentStoreCoordinator] persistentStores]; for (NSPersistentStore* store in stores) { - NSError *error = nil; - [[self.managedObjectContext persistentStoreCoordinator] removePersistentStore:store error:&error]; + [[[self managedObjectContext] persistentStoreCoordinator] removePersistentStore:store error:nil]; } // Add a new store - NSError *error = nil; - [[self.managedObjectContext persistentStoreCoordinator] - addPersistentStoreWithType:NSInMemoryStoreType configuration:nil URL:nil options:nil error:&error]; + [[[self managedObjectContext] persistentStoreCoordinator] addPersistentStoreWithType:NSInMemoryStoreType configuration:nil URL:nil options:nil error:nil]; // Reinitialize the tree with values from the database. [self _initializeUsers]; // After the reset, ensure all original password and user values are up-to-date. - NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"SPUser" - inManagedObjectContext:self.managedObjectContext]; + NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"SPUser" inManagedObjectContext:[self managedObjectContext]]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; + [request setEntity:entityDescription]; - NSArray *userArray = [self.managedObjectContext executeFetchRequest:request error:nil]; + + NSArray *userArray = [[self managedObjectContext] executeFetchRequest:request error:nil]; for (NSManagedObject *user in userArray) { @@ -853,19 +752,20 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // of "name". NSManagedObject *selectedHost = [[treeController selectedObjects] objectAtIndex:0]; NSString *selectedDb = [[schemaController selectedObjects] objectAtIndex:0]; + NSArray *selectedPrivs = [self _fetchPrivsWithUser:[selectedHost valueForKeyPath:@"parent.user"] schema:[selectedDb stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"] host:[selectedHost valueForKey:@"host"]]; - NSManagedObject *priv = nil; - BOOL isNew = NO; + BOOL isNew = NO; + NSManagedObject *priv = nil; if ([selectedPrivs count] > 0){ priv = [selectedPrivs objectAtIndex:0]; } else { - priv = [NSEntityDescription insertNewObjectForEntityForName:@"Privileges" - inManagedObjectContext:[self managedObjectContext]]; + priv = [NSEntityDescription insertNewObjectForEntityForName:@"Privileges" inManagedObjectContext:[self managedObjectContext]]; + [priv setValue:selectedDb forKey:@"db"]; isNew = YES; } @@ -886,8 +786,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; - (void)_clearData { [managedObjectContext reset]; - [managedObjectContext release]; - managedObjectContext = nil; + [managedObjectContext release], managedObjectContext = nil; } /** @@ -951,10 +850,6 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; { [NSApp endSheet:[sender window] returnCode:[sender tag]]; [[sender window] orderOut:self]; - - // Close the window - [NSApp endSheet:[self window] returnCode:0]; - [[self window] orderOut:self]; } #pragma mark - @@ -971,7 +866,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // If there are multiple user manager windows open, it's possible to get this // notification from foreign windows. Ignore those notifications. - if (notificationContext != self.managedObjectContext) return; + if (notificationContext != [self managedObjectContext]) return; if (!isInitializing) { @@ -998,6 +893,9 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; if (!isInitializing) [outlineView reloadData]; } +/** + * Updates the supplied array of users. + */ - (BOOL)updateUsers:(NSArray *)updatedUsers { for (NSManagedObject *user in updatedUsers) @@ -1009,20 +907,16 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; else if (![user parent]) { NSArray *hosts = [user valueForKey:@"children"]; - // If the user has been changed, update the username on all hosts. Don't check for errors, as some - // hosts may be new. + // If the user has been changed, update the username on all hosts. + // Don't check for errors, as some hosts may be new. if (![[user valueForKey:@"user"] isEqualToString:[user valueForKey:@"originaluser"]]) { for (NSManagedObject *child in hosts) { - NSString *renameUserStatement = [NSString stringWithFormat: - @"RENAME USER %@@%@ TO %@@%@", - [[user valueForKey:@"originaluser"] tickQuotedString], - [([child valueForKey:@"originalhost"]?[child valueForKey:@"originalhost"]:[child host]) tickQuotedString], - [[user valueForKey:@"user"] tickQuotedString], - [[child host] tickQuotedString]]; - - [self.mySqlConnection queryString:renameUserStatement]; + [self _renameUserFrom:[user valueForKey:@"originaluser"] + host:[child valueForKey:@"originalhost"] ? [child valueForKey:@"originalhost"] : [child host] + to:[user valueForKey:@"user"] + host:[child user]]; } } @@ -1037,23 +931,19 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [[child host] tickQuotedString], ([user valueForKey:@"password"]) ? [[user valueForKey:@"password"] tickQuotedString] : @"''"]; - [self.mySqlConnection queryString:changePasswordStatement]; + [[self connection] queryString:changePasswordStatement]; [self _checkAndDisplayMySqlError]; } } } else { - - // If the hostname has changed, remane the detail before editing details. + // If the hostname has changed, remane the detail before editing details if (![[user valueForKey:@"host"] isEqualToString:[user valueForKey:@"originalhost"]]) { - NSString *renameUserStatement = [NSString stringWithFormat: - @"RENAME USER %@@%@ TO %@@%@", - [[[user parent] valueForKey:@"originaluser"] tickQuotedString], - [[user valueForKey:@"originalhost"] tickQuotedString], - [[[user parent] valueForKey:@"user"] tickQuotedString], - [[user valueForKey:@"host"] tickQuotedString]]; - [self.mySqlConnection queryString:renameUserStatement]; + [self _renameUserFrom:[[user parent] valueForKey:@"originaluser"] + host:[user valueForKey:@"originalhost"] + to:[[user parent] valueForKey:@"user"] + host:[user valueForKey:@"host"]]; } if ([serverSupport supportsUserMaxVars]) [self updateResourcesForUser:user]; @@ -1084,13 +974,13 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // all their privileges first. Also, REVOKE ALL PRIVILEGES was added in MySQL 4.1.2, so use the // old multiple query approach (damn, I wish there were only one MySQL version!). if (![serverSupport supportsFullDropUser]) { - [mySqlConnection queryString:[NSString stringWithFormat:@"REVOKE ALL PRIVILEGES ON *.* FROM %@", droppedUsers]]; - [mySqlConnection queryString:[NSString stringWithFormat:@"REVOKE GRANT OPTION ON *.* FROM %@", droppedUsers]]; + [connection queryString:[NSString stringWithFormat:@"REVOKE ALL PRIVILEGES ON *.* FROM %@", droppedUsers]]; + [connection queryString:[NSString stringWithFormat:@"REVOKE GRANT OPTION ON *.* FROM %@", droppedUsers]]; } // DROP USER was added in MySQL 4.1.1 if ([serverSupport supportsDropUser]) { - [self.mySqlConnection queryString:[NSString stringWithFormat:@"DROP USER %@", droppedUsers]]; + [[self connection] queryString:[NSString stringWithFormat:@"DROP USER %@", droppedUsers]]; } // Otherwise manually remove the user rows from the mysql.user table else { @@ -1100,7 +990,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; { NSArray *userDetails = [user componentsSeparatedByString:@"@"]; - [mySqlConnection queryString:[NSString stringWithFormat:@"DELETE FROM mysql.user WHERE User = %@ and Host = %@", [userDetails objectAtIndex:0], [userDetails objectAtIndex:1]]]; + [connection queryString:[NSString stringWithFormat:@"DELETE FROM mysql.user WHERE User = %@ and Host = %@", [userDetails objectAtIndex:0], [userDetails objectAtIndex:1]]]; } } @@ -1148,7 +1038,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; if (createStatement) { // Create user in database - [mySqlConnection queryString:createStatement]; + [connection queryString:createStatement]; if ([self _checkAndDisplayMySqlError]) { if ([serverSupport supportsUserMaxVars]) [self updateResourcesForUser:user]; @@ -1156,7 +1046,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // If we created the user with the GRANT statment (MySQL < 5), then revoke the // privileges we gave the new user. if (![serverSupport supportsUserMaxVars]) { - [mySqlConnection queryString:[NSString stringWithFormat:@"REVOKE SELECT ON mysql.* FROM %@@%@", [[[user parent] valueForKey:@"user"] tickQuotedString], host]]; + [connection queryString:[NSString stringWithFormat:@"REVOKE SELECT ON mysql.* FROM %@@%@", [[[user parent] valueForKey:@"user"] tickQuotedString], host]]; } [self grantPrivilegesToUser:user]; @@ -1183,13 +1073,15 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [[schemaPriv valueForKeyPath:@"user.host"] tickQuotedString], [dbName tickQuotedString]]; - NSArray *matchingUsers = [self.mySqlConnection getAllRowsFromQuery:statement]; + NSArray *matchingUsers = [[self connection] getAllRowsFromQuery:statement]; - for (NSString *key in self.privsSupportedByServer) + for (NSString *key in [self privsSupportedByServer]) { if (![key hasSuffix:@"_priv"]) continue; + NSString *privilege = [key stringByReplacingOccurrencesOfString:@"_priv" withString:@""]; - @try { + + NS_DURING if ([[schemaPriv valueForKey:key] boolValue] == YES) { [grantPrivileges addObject:[privilege replaceUnderscoreWithSpace]]; } @@ -1198,15 +1090,22 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [revokePrivileges addObject:[privilege replaceUnderscoreWithSpace]]; } } - } - @catch (NSException * e) { } + NS_HANDLER + NS_ENDHANDLER + } // Grant privileges - [self _grantPrivileges:grantPrivileges onDatabase:dbName forUser:[schemaPriv valueForKeyPath:@"user.parent.user"] host:[schemaPriv valueForKeyPath:@"user.host"]]; + [self _grantPrivileges:grantPrivileges + onDatabase:dbName + forUser:[schemaPriv valueForKeyPath:@"user.parent.user"] + host:[schemaPriv valueForKeyPath:@"user.host"]]; // Revoke privileges - [self _revokePrivileges:revokePrivileges onDatabase:dbName forUser:[schemaPriv valueForKeyPath:@"user.parent.user"] host:[schemaPriv valueForKeyPath:@"user.host"]]; + [self _revokePrivileges:revokePrivileges + onDatabase:dbName + forUser:[schemaPriv valueForKeyPath:@"user.parent.user"] + host:[schemaPriv valueForKeyPath:@"user.host"]]; return YES; } @@ -1225,9 +1124,10 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [[[user valueForKey:@"parent"] valueForKey:@"user"] tickQuotedString], [[user valueForKey:@"host"] tickQuotedString]]; - [self.mySqlConnection queryString:updateResourcesStatement]; + [[self connection] queryString:updateResourcesStatement]; [self _checkAndDisplayMySqlError]; } + return YES; } @@ -1241,7 +1141,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; NSMutableArray *grantPrivileges = [NSMutableArray array]; NSMutableArray *revokePrivileges = [NSMutableArray array]; - for (NSString *key in self.privsSupportedByServer) + for (NSString *key in [self privsSupportedByServer]) { if (![key hasSuffix:@"_priv"]) continue; @@ -1249,26 +1149,32 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; // Check the value of the priv and assign to grant or revoke query as appropriate; do this // in a try/catch check to avoid exceptions for unhandled privs - @try { + NS_DURING if ([[user valueForKey:key] boolValue] == YES) { [grantPrivileges addObject:[privilege replaceUnderscoreWithSpace]]; } else { [revokePrivileges addObject:[privilege replaceUnderscoreWithSpace]]; } - } - @catch (NSException * e) { - } + NS_HANDLER + NS_ENDHANDLER } // Grant privileges - [self _grantPrivileges:grantPrivileges onDatabase:nil forUser:[[user parent] valueForKey:@"user"] host:[user valueForKey:@"host"]]; + [self _grantPrivileges:grantPrivileges + onDatabase:nil + forUser:[[user parent] valueForKey:@"user"] + host:[user valueForKey:@"host"]]; // Revoke privileges - [self _revokePrivileges:revokePrivileges onDatabase:nil forUser:[[user parent] valueForKey:@"user"] host:[user valueForKey:@"host"]]; + [self _revokePrivileges:revokePrivileges + onDatabase:nil + forUser:[[user parent] valueForKey:@"user"] + host:[user valueForKey:@"host"]]; } - for (NSManagedObject *priv in [user valueForKey:@"schema_privileges"]) { + for (NSManagedObject *priv in [user valueForKey:@"schema_privileges"]) + { [self grantDbPrivilegesWithPrivilege:priv]; } @@ -1283,8 +1189,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; { NSManagedObjectContext *moc = [self managedObjectContext]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"user == %@ AND parent == nil", username]; - NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"SPUser" - inManagedObjectContext:moc]; + NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"SPUser" inManagedObjectContext:moc]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; [request setEntity:entityDescription]; @@ -1303,11 +1208,10 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; - (NSArray *)_fetchPrivsWithUser:(NSString *)username schema:(NSString *)selectedSchema host:(NSString *)host { NSManagedObjectContext *moc = [self managedObjectContext]; - NSPredicate *predicate = - [NSPredicate predicateWithFormat:@"(user.parent.user like[cd] %@) AND (user.host like[cd] %@) AND (db like[cd] %@)", username, host, selectedSchema]; - NSEntityDescription *privEntity = [NSEntityDescription entityForName:@"Privileges" - inManagedObjectContext:moc]; + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(user.parent.user like[cd] %@) AND (user.host like[cd] %@) AND (db like[cd] %@)", username, host, selectedSchema]; + NSEntityDescription *privEntity = [NSEntityDescription entityForName:@"Privileges" inManagedObjectContext:moc]; NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease]; + [request setEntity:privEntity]; [request setPredicate:predicate]; @@ -1339,12 +1243,13 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; NSString *grantStatement; // Special case when all items are checked, to allow GRANT OPTION to work - if ([self.privsSupportedByServer count] == [thePrivileges count]) { + if ([[self privsSupportedByServer] count] == [thePrivileges count]) { grantStatement = [NSString stringWithFormat:@"GRANT ALL ON %@.* TO %@@%@ WITH GRANT OPTION", aDatabase?[aDatabase backtickQuotedString]:@"*", [aUser tickQuotedString], [aHost tickQuotedString]]; - } else { + } + else { grantStatement = [NSString stringWithFormat:@"GRANT %@ ON %@.* TO %@@%@", [[thePrivileges componentsJoinedByCommas] uppercaseString], aDatabase?[aDatabase backtickQuotedString]:@"*", @@ -1352,7 +1257,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [aHost tickQuotedString]]; } - [self.mySqlConnection queryString:grantStatement]; + [[self connection] queryString:grantStatement]; [self _checkAndDisplayMySqlError]; } @@ -1367,20 +1272,21 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; NSString *revokeStatement; // Special case when all items are checked, to allow GRANT OPTION to work - if ([self.privsSupportedByServer count] == [thePrivileges count]) { + if ([[self privsSupportedByServer] count] == [thePrivileges count]) { revokeStatement = [NSString stringWithFormat:@"REVOKE ALL PRIVILEGES ON %@.* FROM %@@%@", aDatabase?[aDatabase backtickQuotedString]:@"*", [aUser tickQuotedString], [aHost tickQuotedString]]; - [self.mySqlConnection queryString:revokeStatement]; + [[self connection] queryString:revokeStatement]; [self _checkAndDisplayMySqlError]; revokeStatement = [NSString stringWithFormat:@"REVOKE GRANT OPTION ON %@.* FROM %@@%@", aDatabase?[aDatabase backtickQuotedString]:@"*", [aUser tickQuotedString], [aHost tickQuotedString]]; - } else { + } + else { revokeStatement = [NSString stringWithFormat:@"REVOKE %@ ON %@.* FROM %@@%@", [[thePrivileges componentsJoinedByCommas] uppercaseString], aDatabase?[aDatabase backtickQuotedString]:@"*", @@ -1388,7 +1294,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [aHost tickQuotedString]]; } - [self.mySqlConnection queryString:revokeStatement]; + [[self connection] queryString:revokeStatement]; [self _checkAndDisplayMySqlError]; } @@ -1397,13 +1303,14 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; */ - (BOOL)_checkAndDisplayMySqlError { - if ([self.mySqlConnection queryErrored]) { + if ([[self connection] queryErrored]) { if (isSaving) { - [errorsString appendFormat:@"%@\n", [self.mySqlConnection lastErrorMessage]]; - } else { + [errorsString appendFormat:@"%@\n", [[self connection] lastErrorMessage]]; + } + else { SPBeginAlertSheet(NSLocalizedString(@"An error occurred", @"mysql error occurred message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"An error occurred whilst trying to perform the operation.\n\nMySQL said: %@", @"mysql error occurred informative message"), [self.mySqlConnection lastErrorMessage]]); + [NSString stringWithFormat:NSLocalizedString(@"An error occurred whilst trying to perform the operation.\n\nMySQL said: %@", @"mysql error occurred informative message"), [[self connection] lastErrorMessage]]); } return NO; @@ -1413,164 +1320,57 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; } #pragma mark - -#pragma mark Tab View Delegate methods - -- (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - BOOL retVal = YES; - // If there aren't any selected objects, then can't change tab view item - if ([[treeController selectedObjects] count] == 0) return NO; - - // Currently selected object in tree - id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; - - // If we are selecting a tab view that requires there be a child, - // make sure there is a child to select. If not, don't allow it. - if ([[tabViewItem identifier] isEqualToString:@"Global Privileges"] - || [[tabViewItem identifier] isEqualToString:@"Resources"] - || [[tabViewItem identifier] isEqualToString:@"Schema Privileges"]) { - - id parent = [selectedObject parent]; - - if (parent) { - retVal = ([[parent children] count] > 0); - } - else { - retVal = ([[selectedObject children] count] > 0); - } - - if (retVal == NO) { - NSAlert *alert = [NSAlert alertWithMessageText:@"User doesn't have any hosts." - defaultButton:NSLocalizedString(@"Add Host", @"Add Host") - alternateButton:NSLocalizedString(@"Cancel", @"cancel button") - otherButton:nil - informativeTextWithFormat:@"This user doesn't have any hosts associated with it. User will be deleted unless one is added"]; - - NSInteger ret = [alert runModal]; - - if (ret == NSAlertDefaultReturn) { - [self addHost:nil]; - } - } - - // If this is the resources tab, enable or disable the controls based on the server's support for them - if ([[tabViewItem identifier] isEqualToString:@"Resources"]) { - - BOOL serverSupportsUserMaxVars = [serverSupport supportsUserMaxVars]; - - // Disable the fields according to the version - [maxUpdatesTextField setEnabled:serverSupportsUserMaxVars]; - [maxConnectionsTextField setEnabled:serverSupportsUserMaxVars]; - [maxQuestionsTextField setEnabled:serverSupportsUserMaxVars]; - } - } - - return retVal; -} - -- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - if ([[treeController selectedObjects] count] == 0) return; - - id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; - - // If the selected tab is General and a child is selected, select the - // parent (user info) - if ([[tabViewItem identifier] isEqualToString:@"General"]) { - if ([selectedObject parent] != nil) { - [self _selectParentFromSelection]; - } - } - else if ([[tabViewItem identifier] isEqualToString:@"Global Privileges"] - || [[tabViewItem identifier] isEqualToString:@"Resources"] - || [[tabViewItem identifier] isEqualToString:@"Schema Privileges"]) { - // if the tab is either Global Privs or Resources and we have a user - // selected, then open tree and select first child node. - [self _selectFirstChildOfParentNode]; - } -} - -- (void)tabView:(NSTabView *)usersTabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - if ([[tabViewItem identifier] isEqualToString:@"Schema Privileges"]) { - [self _initializeSchemaPrivs]; - } -} - -#pragma mark - -#pragma mark SplitView delegate methods +#pragma mark Private API /** - * Return the maximum possible size of the splitview. + * Renames a user account using the supplied parameters. + * + * @param originalUser The user's original user name + * @param originalHost The user's original host + * @param newUser The user's new user name + * @param newHost The user's new host */ -- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset -{ - return (proposedMax - 620); -} - -/** - * Return the minimum possible size of the splitview. - */ -- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset -{ - return (proposedMin + 120); -} - -#pragma mark - -#pragma mark TableView Delegate Methods - -- (void)tableViewSelectionDidChange:(NSNotification *)notification +- (void)_renameUserFrom:(NSString *)originalUser host:(NSString *)originalHost to:(NSString *)newUser host:(NSString *)newHost { - if ([notification object] == schemasTableView) { - [grantedSchemaPrivs removeAllObjects]; - [grantedTableView reloadData]; - [self _initializeAvailablePrivs]; + NSString *renameQuery; + + if ([serverSupport supportsRenameUser]) { + renameQuery = [NSString stringWithFormat:@"RENAME USER %@@%@ TO %@@%@", + [originalUser tickQuotedString], + [originalHost tickQuotedString], + [newUser tickQuotedString], + [newHost tickQuotedString]]; + } + else { + // mysql.user is keyed on user and host so there should only ever be one result, + // but double check before we do the update. + QKQuery *query = [QKQuery selectQueryFromTable:@"user"]; - if ([[treeController selectedObjects] count] > 0 && [[schemaController selectedObjects] count] > 0) { - NSManagedObject *user = [[treeController selectedObjects] objectAtIndex:0]; + [query setDatabase:SPMySQLDatabase]; + [query addField:@"COUNT(1)"]; + + [query addParameter:@"User" operator:QKEqualityOperator value:originalUser]; + [query addParameter:@"Host" operator:QKEqualityOperator value:originalHost]; + + SPMySQLResult *result = [connection queryString:[query query]]; + + if ([[[result getRowAsArray] objectAtIndex:0] integerValue] == 1) { + QKQuery *updateQuery = [QKQuery queryTable:@"user"]; - // Check to see if the user host node was selected - if ([user valueForKey:@"host"]) { - NSString *selectedSchema = [[schemaController selectedObjects] objectAtIndex:0]; - NSArray *results = [self _fetchPrivsWithUser:[[user parent] valueForKey:@"user"] - schema:[selectedSchema stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"] - host:[user valueForKey:@"host"]]; - - if ([results count] > 0) { - NSManagedObject *priv = [results objectAtIndex:0]; - - for (NSPropertyDescription *property in [priv entity]) - { - if ([[property name] hasSuffix:@"_priv"] && [[priv valueForKey:[property name]] boolValue]) - { - NSString *displayName = [[[property name] stringByReplacingOccurrencesOfString:@"_priv" - withString:@""] replaceUnderscoreWithSpace]; - NSDictionary *newDict = [NSDictionary dictionaryWithObjectsAndKeys:displayName, @"displayName", [property name], @"name", nil]; - [grantedController addObject:newDict]; - - // Remove items from available so they can't be added twice. - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"displayName like[cd] %@", displayName]; - NSArray *previousObjects = [[availableController arrangedObjects] filteredArrayUsingPredicate:predicate]; - for (NSDictionary *dict in previousObjects) - { - [availableController removeObject:dict]; - } - } - } - } - [availableTableView setEnabled:YES]; - } - } - else { - [availableTableView setEnabled:NO]; - } - } - else if ([notification object] == grantedTableView) { - [removeSchemaPrivButton setEnabled:([[grantedController selectedObjects] count] > 0)]; + [updateQuery setQueryType:QKUpdateQuery]; + [updateQuery setDatabase:SPMySQLDatabase]; + + [updateQuery addFieldToUpdate:@"User" toValue:newUser]; + [updateQuery addFieldToUpdate:@"Host" toValue:newHost]; + + [updateQuery addParameter:@"User" operator:QKEqualityOperator value:originalUser]; + [updateQuery addParameter:@"Host" operator:QKEqualityOperator value:originalHost]; + + renameQuery = [updateQuery query]; + } } - else if ([notification object] == availableTableView) { - [addSchemaPrivButton setEnabled:([[availableController selectedObjects] count] > 0)]; - } + + [connection queryString:renameQuery]; } #pragma mark - @@ -1586,7 +1386,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn"; [persistentStoreCoordinator release]; [managedObjectModel release]; [privColumnToGrantMap release]; - [mySqlConnection release]; + [connection release]; [privsSupportedByServer release]; [schemas release]; [availablePrivs release]; diff --git a/Source/SPUserManagerDelegate.h b/Source/SPUserManagerDelegate.h new file mode 100644 index 00000000..0eb6eb8f --- /dev/null +++ b/Source/SPUserManagerDelegate.h @@ -0,0 +1,29 @@ +// +// $Id$ +// +// SPUserManagerDelegate.h +// sequel-pro +// +// Created by Mark Townsend on Jan 01, 2009 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import "SPUserManager.h" + +@interface SPUserManager (SPUserManagerDelegate) + +@end diff --git a/Source/SPUserManagerDelegate.m b/Source/SPUserManagerDelegate.m new file mode 100644 index 00000000..dc409308 --- /dev/null +++ b/Source/SPUserManagerDelegate.m @@ -0,0 +1,316 @@ +// +// $Id$ +// +// SPUserManagerDelegate.m +// sequel-pro +// +// Created by Mark Townsend on Jan 01, 2009 +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at + +#import "SPUserManagerDelegate.h" +#import "SPUserMO.h" +#import "SPServerSupport.h" +#import "ImageAndTextCell.h" + +static NSString *SPGeneralTabIdentifier = @"General"; +static NSString *SPGlobalPrivilegesTabIdentifier = @"Global Privileges"; +static NSString *SPResourcesTabIdentifier = @"Resources"; +static NSString *SPSchemaPrivilegesTabIdentifier = @"Schema Privileges"; + +@interface SPUserManager (SPDeclaredAPI) + +- (void)_initializeSchemaPrivs; +- (void)_initializeAvailablePrivs; +- (void)_selectParentFromSelection; +- (void)_selectFirstChildOfParentNode; +- (NSArray *)_fetchUserWithUserName:(NSString *)username; + +- (NSArray *)_fetchPrivsWithUser:(NSString *)username schema:(NSString *)selectedSchema host:(NSString *)host; + +@end + + +@implementation SPUserManager (SPUserManagerDelegate) + +#pragma mark - +#pragma mark SplitView delegate methods + +/** + * Return the maximum possible size of the splitview. + */ +- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset +{ + return proposedMax - 620; +} + +/** + * Return the minimum possible size of the splitview. + */ +- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset +{ + return proposedMin + 120; +} + +#pragma mark - +#pragma mark TableView Delegate Methods + +- (void)tableViewSelectionDidChange:(NSNotification *)notification +{ + id object = [notification object]; + + if (object == schemasTableView) { + [grantedSchemaPrivs removeAllObjects]; + [grantedTableView reloadData]; + + [self _initializeAvailablePrivs]; + + if ([[treeController selectedObjects] count] > 0 && [[schemaController selectedObjects] count] > 0) { + NSManagedObject *user = [[treeController selectedObjects] objectAtIndex:0]; + + // Check to see if the user host node was selected + if ([user valueForKey:@"host"]) { + NSString *selectedSchema = [[schemaController selectedObjects] objectAtIndex:0]; + + NSArray *results = [self _fetchPrivsWithUser:[[user parent] valueForKey:@"user"] + schema:[selectedSchema stringByReplacingOccurrencesOfString:@"_" withString:@"\\_"] + host:[user valueForKey:@"host"]]; + + if ([results count] > 0) { + NSManagedObject *priv = [results objectAtIndex:0]; + + for (NSPropertyDescription *property in [priv entity]) + { + if ([[property name] hasSuffix:@"_priv"] && [[priv valueForKey:[property name]] boolValue]) + { + NSString *displayName = [[[property name] stringByReplacingOccurrencesOfString:@"_priv" withString:@""] replaceUnderscoreWithSpace]; + NSDictionary *newDict = [NSDictionary dictionaryWithObjectsAndKeys:displayName, @"displayName", [property name], @"name", nil]; + [grantedController addObject:newDict]; + + // Remove items from available so they can't be added twice. + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"displayName like[cd] %@", displayName]; + NSArray *previousObjects = [[availableController arrangedObjects] filteredArrayUsingPredicate:predicate]; + + for (NSDictionary *dict in previousObjects) + { + [availableController removeObject:dict]; + } + } + } + } + + [availableTableView setEnabled:YES]; + } + } + else { + [availableTableView setEnabled:NO]; + } + } + else if (object == grantedTableView) { + [removeSchemaPrivButton setEnabled:[[grantedController selectedObjects] count] > 0]; + } + else if (object == availableTableView) { + [addSchemaPrivButton setEnabled:[[availableController selectedObjects] count] > 0]; + } +} + +#pragma mark - +#pragma mark Tab View Delegate methods + +- (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + BOOL retVal = YES; + + if ([[treeController selectedObjects] count] == 0) return NO; + + // Currently selected object in tree + id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; + + // If we are selecting a tab view that requires there be a child, + // make sure there is a child to select. If not, don't allow it. + if ([[tabViewItem identifier] isEqualToString:SPGlobalPrivilegesTabIdentifier] || + [[tabViewItem identifier] isEqualToString:SPResourcesTabIdentifier] || + [[tabViewItem identifier] isEqualToString:SPSchemaPrivilegesTabIdentifier]) { + + id parent = [selectedObject parent]; + + retVal = parent ? ([[parent children] count] > 0) : ([[selectedObject children] count] > 0); + + if (!retVal) { + NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"User has no hosts", @"user has no hosts message") + defaultButton:NSLocalizedString(@"Add Host", @"Add Host") + alternateButton:NSLocalizedString(@"Cancel", @"cancel button") + otherButton:nil + informativeTextWithFormat:NSLocalizedString(@"This user doesn't have any hosts associated with it. It will be deleted unless one is added", @"user has no hosts informative message")]; + + if ([alert runModal] == NSAlertDefaultReturn) { + [self addHost:nil]; + } + } + + // If this is the resources tab, enable or disable the controls based on the server's support for them + if ([[tabViewItem identifier] isEqualToString:SPResourcesTabIdentifier]) { + + BOOL serverSupportsUserMaxVars = [serverSupport supportsUserMaxVars]; + + // Disable the fields according to the version + [maxUpdatesTextField setEnabled:serverSupportsUserMaxVars]; + [maxConnectionsTextField setEnabled:serverSupportsUserMaxVars]; + [maxQuestionsTextField setEnabled:serverSupportsUserMaxVars]; + } + } + + return retVal; +} + +- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + if ([[treeController selectedObjects] count] == 0) return; + + id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; + + // If the selected tab is General and a child is selected, select the + // parent (user info). + if ([[tabViewItem identifier] isEqualToString:SPGeneralTabIdentifier]) { + if ([selectedObject parent]) { + [self _selectParentFromSelection]; + } + } + else if ([[tabViewItem identifier] isEqualToString:SPGlobalPrivilegesTabIdentifier] || + [[tabViewItem identifier] isEqualToString:SPResourcesTabIdentifier] || + [[tabViewItem identifier] isEqualToString:SPSchemaPrivilegesTabIdentifier]) { + // If the tab is either Global Privs or Resources and we have a user + // selected, then open tree and select first child node. + [self _selectFirstChildOfParentNode]; + } +} + +- (void)tabView:(NSTabView *)usersTabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + if ([[tabViewItem identifier] isEqualToString:SPSchemaPrivilegesTabIdentifier]) { + [self _initializeSchemaPrivs]; + } +} + +#pragma mark - +#pragma mark Outline view Delegate Methods + +- (void)outlineView:(NSOutlineView *)olv willDisplayCell:(NSCell *)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item +{ + if ([cell isKindOfClass:[ImageAndTextCell class]]) + { + // Determines which Image to display depending on parent or child object + NSImage *image = [[NSImage imageNamed:[(NSManagedObject *)[item representedObject] parent] ? NSImageNameNetwork : NSImageNameUser] retain]; + + [image setScalesWhenResized:YES]; + [image setSize:(NSSize){16, 16}]; + [(ImageAndTextCell *)cell setImage:image]; + [image release]; + } +} + +- (BOOL)outlineView:(NSOutlineView *)olv isGroupItem:(id)item +{ + return NO; +} + +- (BOOL)outlineView:(NSOutlineView *)olv shouldSelectItem:(id)item +{ + return YES; +} + +- (BOOL)outlineView:(NSOutlineView *)olv shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item +{ + return ([[[item representedObject] children] count] == 0); +} + +- (void)outlineViewSelectionDidChange:(NSNotification *)notification +{ + if ([[treeController selectedObjects] count] == 0) return; + + id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; + + if ([selectedObject parent] == nil && !([[[tabView selectedTabViewItem] identifier] isEqualToString:@"General"])) { + [tabView selectTabViewItemWithIdentifier:SPGeneralTabIdentifier]; + } + else { + if ([selectedObject parent] != nil && [[[tabView selectedTabViewItem] identifier] isEqualToString:@"General"]) { + [tabView selectTabViewItemWithIdentifier:SPGlobalPrivilegesTabIdentifier]; + } + } + + if ([selectedObject parent] != nil && [selectedObject host] == nil) + { + [selectedObject setValue:@"%" forKey:@"host"]; + [outlineView reloadItem:selectedObject]; + } + + [schemasTableView deselectAll:nil]; + [grantedTableView deselectAll:nil]; + [availableTableView deselectAll:nil]; +} + +- (BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)olv +{ + if ([[treeController selectedObjects] count] > 0) + { + id selectedObject = [[treeController selectedObjects] objectAtIndex:0]; + + // Check parents + if ([selectedObject valueForKey:@"parent"] == nil) + { + NSString *name = [selectedObject valueForKey:@"user"]; + NSArray *results = [self _fetchUserWithUserName:name]; + + if ([results count] > 1) { + NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Duplicate User", @"duplicate user message") + defaultButton:NSLocalizedString(@"OK", @"OK button") + alternateButton:nil + otherButton:nil + informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"A user with the name '%@' already exists", @"duplicate user informative message"), name]]; + [alert runModal]; + + return NO; + } + } + else + { + NSArray *children = [selectedObject valueForKeyPath:@"parent.children"]; + NSString *host = [selectedObject valueForKey:@"host"]; + + for (NSManagedObject *child in children) + { + if (![selectedObject isEqual:child] && [[child valueForKey:@"host"] isEqualToString:host]) + { + NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Duplicate Host", @"duplicate host message") + defaultButton:NSLocalizedString(@"OK", @"OK button") + alternateButton:nil + otherButton:nil + informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"A user with the host '%@' already exists", @"duplicate host informative message"), host]]; + + [alert runModal]; + + return NO; + } + } + } + } + + return YES; +} + +@end diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m index ed538312..eeecca68 100644 --- a/Source/SPWindowController.m +++ b/Source/SPWindowController.m @@ -32,9 +32,9 @@ enum { #import "SPWindowController.h" #import "SPDatabaseDocument.h" -#import "PSMTabDragAssistant.h" #import "SPDatabaseViewController.h" #import "SPAppController.h" +#import "PSMTabDragAssistant.h" #import #import @@ -101,6 +101,9 @@ enum { { [[NSNotificationCenter defaultCenter] removeObserver:self]; + // Tear down the animations on the tab bar to stop redraws + [tabBar destroyAnimations]; + [managedDatabaseConnections release]; [super dealloc]; @@ -112,7 +115,7 @@ enum { /** * Add a new database connection to the window, in a tab view. */ -- (IBAction) addNewConnection:(id)sender +- (IBAction)addNewConnection:(id)sender { // Create a new database connection view SPDatabaseDocument *newTableDocument = [[SPDatabaseDocument alloc] init]; @@ -355,378 +358,6 @@ enum { } } -#pragma mark - -#pragma mark Tab view delegate methods - -/** - * Called when a tab item is about to be selected. - */ -- (void)tabView:(NSTabView *)tabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - [selectedTableDocument willResignActiveTabInWindow]; -} - -/** - * Called when a tab item was selected. - */ -- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem -{ - if ([[PSMTabDragAssistant sharedDragAssistant] isDragging]) return; - selectedTableDocument = [tabViewItem identifier]; - [selectedTableDocument didBecomeActiveTabInWindow]; - if ([[self window] isKeyWindow]) [selectedTableDocument tabDidBecomeKey]; - [self updateAllTabTitles:self]; -} - -/** - * Called to determine whether a tab view item can be closed - */ -- (BOOL)tabView:(NSTabView *)aTabView shouldCloseTabViewItem:(NSTabViewItem *)tabViewItem -{ - SPDatabaseDocument *theDocument = [tabViewItem identifier]; - if (![theDocument parentTabShouldClose]) return NO; - return YES; -} - -/** - * Called after a tab view item is closed. - */ -- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem -{ - SPDatabaseDocument *theDocument = [tabViewItem identifier]; - [theDocument removeObserver:self forKeyPath:@"isProcessing"]; - [theDocument parentTabDidClose]; -} - -/** - * Called to allow dragging of tab view items - */ -- (BOOL)tabView:(NSTabView *)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl -{ - return YES; -} - -/** - * Called when a tab finishes a drop. This is called with the new tabView. - */ -- (void)tabView:(NSTabView*)aTabView didDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl -{ - SPDatabaseDocument *draggedDocument = [tabViewItem identifier]; - - // Grab a reference to the old window - NSWindow *draggedFromWindow = [draggedDocument parentWindow]; - - // If the window changed, perform additional processing. - if (draggedFromWindow != [tabBarControl window]) { - - // Update the old window, ensuring the toolbar is cleared to prevent issues with toolbars in multiple windows - [draggedFromWindow setToolbar:nil]; - [[draggedFromWindow windowController] updateSelectedTableDocument]; - - // Update the item's document's window and controller - [draggedDocument willResignActiveTabInWindow]; - [draggedDocument setParentWindowController:[[tabBarControl window] windowController]]; - [draggedDocument setParentWindow:[tabBarControl window]]; - [draggedDocument didBecomeActiveTabInWindow]; - - // Update window controller's active tab, and update the document's isProcessing observation - [[[tabBarControl window] windowController] updateSelectedTableDocument]; - [draggedDocument removeObserver:[draggedFromWindow windowController] forKeyPath:@"isProcessing"]; - [[[tabBarControl window] windowController] _updateProgressIndicatorForItem:tabViewItem]; - } - - // Check the window and move it to front if it's key (eg for new window creation) - if ([[tabBarControl window] isKeyWindow]) [[tabBarControl window] orderFront:self]; -} - -/** - * Respond to dragging events entering the tab in the tab bar. - * Allows custom behaviours - for example, if dragging text, switch to the custom - * query view. - */ -- (void)draggingEvent:(id )dragEvent enteredTabBar:(PSMTabBarControl *)tabBarControl tabView:(NSTabViewItem *)tabViewItem -{ - SPDatabaseDocument *theDocument = [tabViewItem identifier]; - - if (![theDocument isCustomQuerySelected] - && [[[dragEvent draggingPasteboard] types] indexOfObject:NSStringPboardType] != NSNotFound) - { - [theDocument viewQuery:self]; - } -} - -/** - * Show tooltip for a tab view item. - */ -- (NSString *)tabView:(NSTabView *)aTabView toolTipForTabViewItem:(NSTabViewItem *)tabViewItem -{ - - NSInteger tabIndex = [tabView indexOfTabViewItem:tabViewItem]; - - if([[tabBar cells] count] < (NSUInteger)tabIndex) return @""; - - PSMTabBarCell *theCell = [[tabBar cells] objectAtIndex:tabIndex]; - - // If cell is selected show tooltip if truncated only - if([theCell tabState] & PSMTab_SelectedMask) { - - CGFloat cellWidth = [theCell width]; - CGFloat titleWidth = [theCell stringSize].width; - CGFloat closeButtonWidth = 0; - - if([theCell hasCloseButton]) - closeButtonWidth = [theCell closeButtonRectForFrame:[theCell frame]].size.width; - - if(titleWidth > cellWidth - closeButtonWidth) - return [theCell title]; - - return @""; - - // if cell is not selected show full title plus MySQL version is enabled as tooltip - } else { - if([[tabViewItem identifier] respondsToSelector:@selector(tabTitleForTooltip)]) - return [[tabViewItem identifier] tabTitleForTooltip]; - - return @""; - - } - -} - -/** - * Allow window closing of the last tab item. - */ -- (void)tabView:(NSTabView *)aTabView closeWindowForLastTabViewItem:(NSTabViewItem *)tabViewItem -{ - [[aTabView window] close]; -} - -/** - * When dragging a tab off a tab bar, add a shadow to the drag window. - */ -- (void)tabViewDragWindowCreated:(NSWindow *)dragWindow -{ - [dragWindow setHasShadow:YES]; -} - -/** - * Allow dragging and dropping of tabs to any position, including out of a tab bar - * to create a new window. - */ -- (BOOL)tabView:(NSTabView*)aTabView shouldDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl -{ - return YES; -} - -/** - * When a tab is dragged off a tab bar, create a new window containing a new - * (empty) tab bar to hold it. - */ -- (PSMTabBarControl *)tabView:(NSTabView *)aTabView newTabBarForDraggedTabViewItem:(NSTabViewItem *)tabViewItem atPoint:(NSPoint)point -{ - - // Create the new window controller, with no tabs - SPWindowController *newWindowController = [[SPWindowController alloc] initWithWindowNibName:@"MainWindow"]; - NSWindow *newWindow = [newWindowController window]; - - CGFloat toolbarHeight = 0; - if ([[[self window] toolbar] isVisible]) { - NSRect innerFrame = [NSWindow contentRectForFrameRect:[[self window] frame] styleMask:[[self window] styleMask]]; - toolbarHeight = innerFrame.size.height - [[[self window] contentView] frame].size.height; - } - - // Adjust the positioning as appropriate - point.y += toolbarHeight; - if ([[NSUserDefaults standardUserDefaults] boolForKey:SPAlwaysShowWindowTabBar]) point.y += kPSMTabBarControlHeight; - - // Set the new window position and size - NSRect targetWindowFrame = [[self window] frame]; - targetWindowFrame.size.height -= toolbarHeight; - [newWindow setFrame:targetWindowFrame display:NO]; - [newWindow setFrameTopLeftPoint:point]; - - // Set the window controller as the window's delegate - [newWindow setDelegate:newWindowController]; - - // Set window title - [newWindow setTitle:[[[tabViewItem identifier] parentWindow] title]]; - - // Return the window's tab bar - return [newWindowController valueForKey:@"tabBar"]; -} - -/** - * When dragging a tab off the tab bar, return an image so that a - * drag placeholder can be displayed. - */ -- (NSImage *)tabView:(NSTabView *)aTabView imageForTabViewItem:(NSTabViewItem *)tabViewItem offset:(NSSize *)offset styleMask:(unsigned int *)styleMask -{ - NSImage *viewImage = [[NSImage alloc] init]; - - // Capture an image of the entire window - CGImageRef windowImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (unsigned int)[[self window] windowNumber], kCGWindowImageBoundsIgnoreFraming); - NSBitmapImageRep *viewRep = [[NSBitmapImageRep alloc] initWithCGImage:windowImage]; - [viewImage addRepresentation:viewRep]; - - // Calculate the titlebar+toolbar height - CGFloat contentViewOffsetY = [[self window] frame].size.height - [[[self window] contentView] frame].size.height; - offset->height = contentViewOffsetY + [tabBar frame].size.height; - - // Draw over the tab bar area - [viewImage lockFocus]; - [[NSColor windowBackgroundColor] set]; - NSRectFill([tabBar frame]); - [viewImage unlockFocus]; - - // Draw the tab bar background in the tab bar area - [viewImage lockFocus]; - NSRect tabFrame = [tabBar frame]; - [[NSColor windowBackgroundColor] set]; - NSRectFill(tabFrame); - - // Draw the background flipped, which is actually the right way up - NSAffineTransform *transform = [NSAffineTransform transform]; - [transform translateXBy:0.0f yBy:[[[self window] contentView] frame].size.height]; - [transform scaleXBy:1.0f yBy:-1.0f]; - [transform concat]; - [(id )[[aTabView delegate] style] drawBackgroundInRect:tabFrame]; - [viewImage unlockFocus]; - - return [viewImage autorelease]; -} - -/** - * Displays the current tab's context menu. - */ -- (NSMenu *)tabView:(NSTabView *)aTabView menuForTabViewItem:(NSTabViewItem *)tabViewItem -{ - NSMenu *menu = [[NSMenu alloc] init]; - - [menu addItemWithTitle:NSLocalizedString(@"Close Tab", @"close tab context menu item") action:@selector(closeTab:) keyEquivalent:@""]; - [menu insertItem:[NSMenuItem separatorItem] atIndex:1]; - [menu addItemWithTitle:NSLocalizedString(@"Open in New Tab", @"open connection in new tab context menu item") action:@selector(openDatabaseInNewTab:) keyEquivalent:@""]; - - return [menu autorelease]; -} - -/** - * When tab drags start, show all the tab bars. This allows adding tabs to windows - * containing only one tab - where the bar is normally hidden. - */ -- (void)tabDragStarted:(id)sender -{ - [tabBar setHideForSingleTab:NO]; -} - -/** - * When tab drags stop, set tab bars to automatically hide again for only one tab. - */ -- (void)tabDragStopped:(id)sender -{ - if (![[NSUserDefaults standardUserDefaults] boolForKey:SPAlwaysShowWindowTabBar]) { - [tabBar setHideForSingleTab:YES]; - } -} - -#pragma mark - -#pragma mark Window delegate methods - -/** - * Determine whether the window is permitted to close. - * Go through the tabs in this window, and ask the database connection view - * in each one if it can be closed, returning YES only if all can be closed. - */ -- (BOOL)windowShouldClose:(id)sender -{ - - // Iterate through all tabs if more than one tab is opened only otherwise - // [... parentTabShouldClose] will be called twice [see self closeTab:(id)sender] - if([[tabView tabViewItems] count] > 1) - for (NSTabViewItem *eachItem in [tabView tabViewItems]) { - SPDatabaseDocument *eachDocument = [eachItem identifier]; - if (![eachDocument parentTabShouldClose]) return NO; - } - - // Remove global session data if the last window of a session will be closed - if([[NSApp delegate] sessionURL] && [[[NSApp delegate] orderedDatabaseConnectionWindows] count] == 1) { - [[NSApp delegate] setSessionURL:nil]; - [[NSApp delegate] setSpfSessionDocData:nil]; - } - - return YES; -} - -/** - * When the window does close, close all tabs. - */ -- (void)windowWillClose:(NSNotification *)notification - -{ - for (NSTabViewItem *eachItem in [tabView tabViewItems]) { - [tabView removeTabViewItem:eachItem]; - } - [self autorelease]; -} - -/** - * When the window becomes key, inform the selected tab and - * update menu items. - */ -- (void)windowDidBecomeKey:(NSNotification *)notification -{ - [selectedTableDocument tabDidBecomeKey]; - - // Update the "Close window" item - [closeWindowMenuItem setTitle:NSLocalizedString(@"Close Window", @"Close Window menu item")]; - [closeWindowMenuItem setKeyEquivalentModifierMask:(NSCommandKeyMask | NSShiftKeyMask)]; - - // Ensure the "Close tab" item is enabled and has the standard shortcut - [closeTabMenuItem setEnabled:YES]; - [closeTabMenuItem setKeyEquivalent:@"w"]; - [closeTabMenuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; -} - -/** - * When the window resigns key, update menu items. - */ -- (void)windowDidResignKey:(NSNotification *)notification -{ - // Disable the "Close tab" menu item - [closeTabMenuItem setEnabled:NO]; - [closeTabMenuItem setKeyEquivalent:@""]; - - // Update the "Close window" item to show only "Close" - [closeWindowMenuItem setTitle:NSLocalizedString(@"Close", @"Close menu item")]; - [closeWindowMenuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; -} - -/** - * If the window is resized, notify all the tabs. - */ -- (void)windowDidResize:(NSNotification *)notification -{ - for (NSTabViewItem *eachItem in [tabView tabViewItems]) { - SPDatabaseDocument *eachDocument = [eachItem identifier]; - [eachDocument tabDidResize]; - } -} - -/** - * If the window is entering fullscreen, update the front tab's titlebar status view visibility. - */ -- (void)windowWillEnterFullScreen:(NSNotification *)notification -{ - [selectedTableDocument updateTitlebarStatusVisibilityForcingHide:YES]; -} - -/** - * If the window exits fullscreen, update the front tab's titlebar status view visibility. - */ -- (void)windowDidExitFullScreen:(NSNotification *)notification -{ - [selectedTableDocument updateTitlebarStatusVisibilityForcingHide:NO]; -} - #pragma mark - #pragma mark First responder forwarding to active tab diff --git a/Source/SPWindowControllerDelegate.h b/Source/SPWindowControllerDelegate.h new file mode 100644 index 00000000..5e940948 --- /dev/null +++ b/Source/SPWindowControllerDelegate.h @@ -0,0 +1,37 @@ +// +// $Id$ +// +// SPWindowControllerDelegate.h +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 9, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPWindowController.h" + +@interface SPWindowController (SPWindowControllerDelegate) + +@end diff --git a/Source/SPWindowControllerDelegate.m b/Source/SPWindowControllerDelegate.m new file mode 100644 index 00000000..31876263 --- /dev/null +++ b/Source/SPWindowControllerDelegate.m @@ -0,0 +1,433 @@ +// +// $Id$ +// +// SPWindowControllerDelegate.h +// Sequel Pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 9, 2012 +// Copyright (c) 2012 Stuart Connolly. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// +// More info at + +#import "SPWindowControllerDelegate.h" +#import "PSMTabDragAssistant.h" +#import "SPDatabaseDocument.h" +#import "SPDatabaseViewController.h" +#import "SPAppController.h" + +#import +#import + +@interface SPWindowController (SPDeclaredAPI) + +- (void)_updateProgressIndicatorForItem:(NSTabViewItem *)theItem; + +@end + +@implementation SPWindowController (SPWindowControllerDelegate) + +#pragma mark - +#pragma mark Window delegate methods + +/** + * Determine whether the window is permitted to close. + * Go through the tabs in this window, and ask the database connection view + * in each one if it can be closed, returning YES only if all can be closed. + */ +- (BOOL)windowShouldClose:(id)sender +{ + // Iterate through all tabs if more than one tab is opened only otherwise + // [... parentTabShouldClose] will be called twice [see self closeTab:(id)sender] + if ([[tabView tabViewItems] count] > 1) { + for (NSTabViewItem *eachItem in [tabView tabViewItems]) + { + SPDatabaseDocument *eachDocument = [eachItem identifier]; + + if (![eachDocument parentTabShouldClose]) return NO; + } + } + + // Remove global session data if the last window of a session will be closed + if ([[NSApp delegate] sessionURL] && [[[NSApp delegate] orderedDatabaseConnectionWindows] count] == 1) { + [[NSApp delegate] setSessionURL:nil]; + [[NSApp delegate] setSpfSessionDocData:nil]; + } + + return YES; +} + +/** + * When the window does close, close all tabs. + */ +- (void)windowWillClose:(NSNotification *)notification +{ + for (NSTabViewItem *eachItem in [tabView tabViewItems]) + { + [tabView removeTabViewItem:eachItem]; + } + + [self autorelease]; +} + +/** + * When the window becomes key, inform the selected tab and + * update menu items. + */ +- (void)windowDidBecomeKey:(NSNotification *)notification +{ + [selectedTableDocument tabDidBecomeKey]; + + // Update the "Close window" item + [closeWindowMenuItem setTitle:NSLocalizedString(@"Close Window", @"Close Window menu item")]; + [closeWindowMenuItem setKeyEquivalentModifierMask:(NSCommandKeyMask | NSShiftKeyMask)]; + + // Ensure the "Close tab" item is enabled and has the standard shortcut + [closeTabMenuItem setEnabled:YES]; + [closeTabMenuItem setKeyEquivalent:@"w"]; + [closeTabMenuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; +} + +/** + * When the window resigns key, update menu items. + */ +- (void)windowDidResignKey:(NSNotification *)notification +{ + // Disable the "Close tab" menu item + [closeTabMenuItem setEnabled:NO]; + [closeTabMenuItem setKeyEquivalent:@""]; + + // Update the "Close window" item to show only "Close" + [closeWindowMenuItem setTitle:NSLocalizedString(@"Close", @"Close menu item")]; + [closeWindowMenuItem setKeyEquivalentModifierMask:NSCommandKeyMask]; +} + +/** + * If the window is resized, notify all the tabs. + */ +- (void)windowDidResize:(NSNotification *)notification +{ + for (NSTabViewItem *eachItem in [tabView tabViewItems]) + { + SPDatabaseDocument *eachDocument = [eachItem identifier]; + + [eachDocument tabDidResize]; + } +} + +/** + * If the window is entering fullscreen, update the front tab's titlebar status view visibility. + */ +- (void)windowWillEnterFullScreen:(NSNotification *)notification +{ + [selectedTableDocument updateTitlebarStatusVisibilityForcingHide:YES]; +} + +/** + * If the window exits fullscreen, update the front tab's titlebar status view visibility. + */ +- (void)windowDidExitFullScreen:(NSNotification *)notification +{ + [selectedTableDocument updateTitlebarStatusVisibilityForcingHide:NO]; +} + +#pragma mark - +#pragma mark Tab view delegate methods + +/** + * Called when a tab item is about to be selected. + */ +- (void)tabView:(NSTabView *)tabView willSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + [selectedTableDocument willResignActiveTabInWindow]; +} + +/** + * Called when a tab item was selected. + */ +- (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem +{ + if ([[PSMTabDragAssistant sharedDragAssistant] isDragging]) return; + + selectedTableDocument = [tabViewItem identifier]; + [selectedTableDocument didBecomeActiveTabInWindow]; + + if ([[self window] isKeyWindow]) [selectedTableDocument tabDidBecomeKey]; + + [self updateAllTabTitles:self]; +} + +/** + * Called to determine whether a tab view item can be closed + */ +- (BOOL)tabView:(NSTabView *)aTabView shouldCloseTabViewItem:(NSTabViewItem *)tabViewItem +{ + SPDatabaseDocument *theDocument = [tabViewItem identifier]; + + if (![theDocument parentTabShouldClose]) return NO; + + return YES; +} + +/** + * Called after a tab view item is closed. + */ +- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem +{ + SPDatabaseDocument *theDocument = [tabViewItem identifier]; + + [theDocument removeObserver:self forKeyPath:@"isProcessing"]; + [theDocument parentTabDidClose]; +} + +/** + * Called to allow dragging of tab view items + */ +- (BOOL)tabView:(NSTabView *)aTabView shouldDragTabViewItem:(NSTabViewItem *)tabViewItem fromTabBar:(PSMTabBarControl *)tabBarControl +{ + return YES; +} + +/** + * Called when a tab finishes a drop. This is called with the new tabView. + */ +- (void)tabView:(NSTabView*)aTabView didDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl +{ + SPDatabaseDocument *draggedDocument = [tabViewItem identifier]; + + // Grab a reference to the old window + NSWindow *draggedFromWindow = [draggedDocument parentWindow]; + + // If the window changed, perform additional processing. + if (draggedFromWindow != [tabBarControl window]) { + + // Update the old window, ensuring the toolbar is cleared to prevent issues with toolbars in multiple windows + [draggedFromWindow setToolbar:nil]; + [[draggedFromWindow windowController] updateSelectedTableDocument]; + + // Update the item's document's window and controller + [draggedDocument willResignActiveTabInWindow]; + [draggedDocument setParentWindowController:[[tabBarControl window] windowController]]; + [draggedDocument setParentWindow:[tabBarControl window]]; + [draggedDocument didBecomeActiveTabInWindow]; + + // Update window controller's active tab, and update the document's isProcessing observation + [[[tabBarControl window] windowController] updateSelectedTableDocument]; + [draggedDocument removeObserver:[draggedFromWindow windowController] forKeyPath:@"isProcessing"]; + [[[tabBarControl window] windowController] _updateProgressIndicatorForItem:tabViewItem]; + } + + // Check the window and move it to front if it's key (eg for new window creation) + if ([[tabBarControl window] isKeyWindow]) [[tabBarControl window] orderFront:self]; +} + +/** + * Respond to dragging events entering the tab in the tab bar. + * Allows custom behaviours - for example, if dragging text, switch to the custom + * query view. + */ +- (void)draggingEvent:(id )dragEvent enteredTabBar:(PSMTabBarControl *)tabBarControl tabView:(NSTabViewItem *)tabViewItem +{ + SPDatabaseDocument *theDocument = [tabViewItem identifier]; + + if (![theDocument isCustomQuerySelected] && [[[dragEvent draggingPasteboard] types] indexOfObject:NSStringPboardType] != NSNotFound) + { + [theDocument viewQuery:self]; + } +} + +/** + * Show tooltip for a tab view item. + */ +- (NSString *)tabView:(NSTabView *)aTabView toolTipForTabViewItem:(NSTabViewItem *)tabViewItem +{ + NSInteger tabIndex = [tabView indexOfTabViewItem:tabViewItem]; + + if ([[tabBar cells] count] < (NSUInteger)tabIndex) return @""; + + PSMTabBarCell *theCell = [[tabBar cells] objectAtIndex:tabIndex]; + + // If cell is selected show tooltip if truncated only + if ([theCell tabState] & PSMTab_SelectedMask) { + + CGFloat cellWidth = [theCell width]; + CGFloat titleWidth = [theCell stringSize].width; + CGFloat closeButtonWidth = 0; + + if ([theCell hasCloseButton]) + closeButtonWidth = [theCell closeButtonRectForFrame:[theCell frame]].size.width; + + if (titleWidth > cellWidth - closeButtonWidth) { + return [theCell title]; + } + + return @""; + } + // if cell is not selected show full title plus MySQL version is enabled as tooltip + else { + if ([[tabViewItem identifier] respondsToSelector:@selector(tabTitleForTooltip)]) { + return [[tabViewItem identifier] tabTitleForTooltip]; + } + + return @""; + } +} + +/** + * Allow window closing of the last tab item. + */ +- (void)tabView:(NSTabView *)aTabView closeWindowForLastTabViewItem:(NSTabViewItem *)tabViewItem +{ + [[aTabView window] close]; +} + +/** + * When dragging a tab off a tab bar, add a shadow to the drag window. + */ +- (void)tabViewDragWindowCreated:(NSWindow *)dragWindow +{ + [dragWindow setHasShadow:YES]; +} + +/** + * Allow dragging and dropping of tabs to any position, including out of a tab bar + * to create a new window. + */ +- (BOOL)tabView:(NSTabView*)aTabView shouldDropTabViewItem:(NSTabViewItem *)tabViewItem inTabBar:(PSMTabBarControl *)tabBarControl +{ + return YES; +} + +/** + * When a tab is dragged off a tab bar, create a new window containing a new + * (empty) tab bar to hold it. + */ +- (PSMTabBarControl *)tabView:(NSTabView *)aTabView newTabBarForDraggedTabViewItem:(NSTabViewItem *)tabViewItem atPoint:(NSPoint)point +{ + // Create the new window controller, with no tabs + SPWindowController *newWindowController = [[SPWindowController alloc] initWithWindowNibName:@"MainWindow"]; + NSWindow *newWindow = [newWindowController window]; + + CGFloat toolbarHeight = 0; + + if ([[[self window] toolbar] isVisible]) { + NSRect innerFrame = [NSWindow contentRectForFrameRect:[[self window] frame] styleMask:[[self window] styleMask]]; + toolbarHeight = innerFrame.size.height - [[[self window] contentView] frame].size.height; + } + + // Adjust the positioning as appropriate + point.y += toolbarHeight; + + if ([[NSUserDefaults standardUserDefaults] boolForKey:SPAlwaysShowWindowTabBar]) point.y += kPSMTabBarControlHeight; + + // Set the new window position and size + NSRect targetWindowFrame = [[self window] frame]; + targetWindowFrame.size.height -= toolbarHeight; + [newWindow setFrame:targetWindowFrame display:NO]; + [newWindow setFrameTopLeftPoint:point]; + + // Set the window controller as the window's delegate + [newWindow setDelegate:newWindowController]; + + // Set window title + [newWindow setTitle:[[[tabViewItem identifier] parentWindow] title]]; + + // Return the window's tab bar + return [newWindowController valueForKey:@"tabBar"]; +} + +/** + * When dragging a tab off the tab bar, return an image so that a + * drag placeholder can be displayed. + */ +- (NSImage *)tabView:(NSTabView *)aTabView imageForTabViewItem:(NSTabViewItem *)tabViewItem offset:(NSSize *)offset styleMask:(unsigned int *)styleMask +{ + NSImage *viewImage = [[NSImage alloc] init]; + + // Capture an image of the entire window + CGImageRef windowImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (unsigned int)[[self window] windowNumber], kCGWindowImageBoundsIgnoreFraming); + NSBitmapImageRep *viewRep = [[NSBitmapImageRep alloc] initWithCGImage:windowImage]; + [viewImage addRepresentation:viewRep]; + [viewRep release]; + + // Calculate the titlebar+toolbar height + CGFloat contentViewOffsetY = [[self window] frame].size.height - [[[self window] contentView] frame].size.height; + offset->height = contentViewOffsetY + [tabBar frame].size.height; + + // Draw over the tab bar area + [viewImage lockFocus]; + [[NSColor windowBackgroundColor] set]; + NSRectFill([tabBar frame]); + [viewImage unlockFocus]; + + // Draw the tab bar background in the tab bar area + [viewImage lockFocus]; + NSRect tabFrame = [tabBar frame]; + [[NSColor windowBackgroundColor] set]; + NSRectFill(tabFrame); + + // Draw the background flipped, which is actually the right way up + NSAffineTransform *transform = [NSAffineTransform transform]; + [transform translateXBy:0.0f yBy:[[[self window] contentView] frame].size.height]; + [transform scaleXBy:1.0f yBy:-1.0f]; + [transform concat]; + [(id )[[aTabView delegate] style] drawBackgroundInRect:tabFrame]; + [viewImage unlockFocus]; + + return [viewImage autorelease]; +} + +/** + * Displays the current tab's context menu. + */ +- (NSMenu *)tabView:(NSTabView *)aTabView menuForTabViewItem:(NSTabViewItem *)tabViewItem +{ + NSMenu *menu = [[NSMenu alloc] init]; + + [menu addItemWithTitle:NSLocalizedString(@"Close Tab", @"close tab context menu item") action:@selector(closeTab:) keyEquivalent:@""]; + [menu insertItem:[NSMenuItem separatorItem] atIndex:1]; + [menu addItemWithTitle:NSLocalizedString(@"Open in New Tab", @"open connection in new tab context menu item") action:@selector(openDatabaseInNewTab:) keyEquivalent:@""]; + + return [menu autorelease]; +} + +/** + * When tab drags start, show all the tab bars. This allows adding tabs to windows + * containing only one tab - where the bar is normally hidden. + */ +- (void)tabDragStarted:(id)sender +{ + [tabBar setHideForSingleTab:NO]; +} + +/** + * When tab drags stop, set tab bars to automatically hide again for only one tab. + */ +- (void)tabDragStopped:(id)sender +{ + if (![[NSUserDefaults standardUserDefaults] boolForKey:SPAlwaysShowWindowTabBar]) { + [tabBar setHideForSingleTab:YES]; + } +} + +@end diff --git a/Source/SPXMLExporter.m b/Source/SPXMLExporter.m index 8ff99e0d..1fc29c6f 100644 --- a/Source/SPXMLExporter.m +++ b/Source/SPXMLExporter.m @@ -27,7 +27,7 @@ #import "SPExportFile.h" #import "SPFileHandle.h" #import "SPExportUtilities.h" -#import "SPMySQL.h" +#import @implementation SPXMLExporter @@ -258,7 +258,9 @@ [xmlItem setString:[NSString stringWithString:dataConversionString]]; [dataConversionString release]; - } + } + + // Check for null value using a pointer comparison; as [NSNull null] is a singleton this works correctly. else if (data == [NSNull null]) { dataIsNULL = YES; diff --git a/Source/SPXMLExporterDelegate.m b/Source/SPXMLExporterDelegate.m index 013019b2..8b1d9e73 100644 --- a/Source/SPXMLExporterDelegate.m +++ b/Source/SPXMLExporterDelegate.m @@ -27,7 +27,7 @@ #import "SPXMLExporter.h" #import "SPDatabaseDocument.h" #import "SPExportFile.h" -#import "SPMySQL.h" +#import @implementation SPExportController (SPXMLExporterDelegate) diff --git a/UnitTests/MCPKitTest.h b/UnitTests/MCPKitTest.h deleted file mode 100644 index 926780fa..00000000 --- a/UnitTests/MCPKitTest.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// $Id$ -// -// MCPKitTest.h -// sequel-pro -// -// Created by J Knight on 17/05/09. -// Copyright 2009 J Knight. All rights reserved. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// More info at - -#import - -@class MCPConnection; - -/** - * @class MCPKitTest MCPKitTest.h - * - * MCPKit test case class. - * - * Note that this test case class uses the 'sakila' database to perform it's tests. It is available from: - * - * http://downloads.mysql.com/docs/sakila-db.zip - * - * You must also create a user called 'sp_tester' with no password and all permissions on the database 'sakila'. - */ -@interface MCPKitTest : SenTestCase -{ - MCPConnection *connection; -} - -@end diff --git a/UnitTests/MCPKitTest.m b/UnitTests/MCPKitTest.m deleted file mode 100644 index 559a1407..00000000 --- a/UnitTests/MCPKitTest.m +++ /dev/null @@ -1,123 +0,0 @@ -// -// $Id$ -// -// MCPKitTest.m -// sequel-pro -// -// Created by J Knight on 17/05/09. -// Copyright 2009 J Knight. All rights reserved. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// More info at - -#import - -#import "MCPKitTest.h" - -static NSString *SPTestDatabaseHost = @"127.0.0.1"; -static NSString *SPTestDatabaseName = @"sakila"; -static NSString *SPTestDatabaseUser = @"sp_tester"; -static NSString *SPTestDatabasePassword = @""; - -static const NSInteger SPTestDatabasePort = 3306; - -@implementation MCPKitTest - -#pragma mark - -#pragma mark Setup & tear down - -/** - * Sets up the connection for use in the test cases. - */ -- (void)setUp -{ - connection = [[MCPConnection alloc] initToHost:SPTestDatabaseHost withLogin:SPTestDatabaseUser usingPort:SPTestDatabasePort]; - - [connection setPassword:SPTestDatabasePassword]; - - [connection setConnectionTimeout:10]; - [connection setUseKeepAlive:1]; - [connection setKeepAliveInterval:60]; - - [connection connect]; - - if (![connection isConnected]) { - [connection release], connection = nil; - - STFail(@"Error connecting to database server. No tests were run."); - } - else { - if (![connection selectDB:SPTestDatabaseName]) { - [connection release], connection = nil; - - STFail(@"Error selecting database '%@'. No tests were run.", SPTestDatabaseName); - } - } -} - -/** - * Disconnects the connection if connected. - */ -- (void)tearDown -{ - if (connection && [connection isConnected]) { - [connection disconnect]; - } - - [connection release], connection = nil; -} - -#pragma mark - -#pragma mark Tests - -/** - * Tests the connection's major version number. - */ -- (void)testServerMajorVersion -{ - if ((!connection) || (![connection isConnected])) return; - - STAssertTrue(([connection serverMajorVersion] != 0), @"server major version"); -} - -/** - * Tests the connection's version string. - */ -- (void)testServerVersionString -{ - if ((!connection) || (![connection isConnected])) return; - - STAssertTrue(([[connection serverVersionString] length] > 0), @"server version string"); -} - -/** - * Tests the connection query execution. - */ -- (void)testQueryExexution -{ - if ((!connection) || (![connection isConnected])) return; - - MCPResult *result = [connection queryString:@"SELECT * FROM actor"]; - - if ([connection queryErrored]) { - STFail(@"Query execution failed with error: %@", [connection getLastErrorMessage]); - } - else { - STAssertEquals([result numOfRows], (my_ulonglong)200, @"'actors' table count"); - } -} - -@end diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index b50b810a..6ae0bdac 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -41,6 +41,9 @@ 172A65110F7BED7A001E861A /* SPConsoleMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 172A65100F7BED7A001E861A /* SPConsoleMessage.m */; }; 173284EA1088FEDE0062E892 /* SPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 173284E91088FEDE0062E892 /* SPConstants.m */; }; 1734696B11C1167000AB3D16 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; }; + 17381856151FB34E0078FFE2 /* SPUserManagerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17381855151FB34E0078FFE2 /* SPUserManagerDelegate.m */; }; + 17386E0B15192526002DC206 /* SPTableContentDataSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 17386E0A15192526002DC206 /* SPTableContentDataSource.m */; }; + 17386E0E1519257E002DC206 /* SPTableContentDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17386E0D1519257E002DC206 /* SPTableContentDelegate.m */; }; 173C4362104455CA001F3A30 /* QueryFavoriteManager.xib in Resources */ = {isa = PBXBuildFile; fileRef = 173C4360104455CA001F3A30 /* QueryFavoriteManager.xib */; }; 173C4366104455E0001F3A30 /* SPQueryFavoriteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C4365104455E0001F3A30 /* SPQueryFavoriteManager.m */; }; 173C44D81044A6B0001F3A30 /* SPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C44D71044A6B0001F3A30 /* SPOutlineView.m */; }; @@ -99,10 +102,12 @@ 17A7773411C52D8E001E27B4 /* SPIndexesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17A7773311C52D8E001E27B4 /* SPIndexesController.m */; }; 17A7773811C52E61001E27B4 /* IndexesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17A7773611C52E61001E27B4 /* IndexesView.xib */; }; 17AF787B11FC41C00073D043 /* SPExportFilenameUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */; }; + 17BA2A3215275D8600389803 /* SPExportInterfaceController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17BA2A3115275D8600389803 /* SPExportInterfaceController.m */; }; 17C058880FC9FC390077E9CF /* SPNarrowDownCompletion.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C058870FC9FC390077E9CF /* SPNarrowDownCompletion.m */; }; 17CC97F310B4ABE90034CD7A /* SPAboutController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17CC97F210B4ABE90034CD7A /* SPAboutController.m */; }; 17CC97F710B4AC6C0034CD7A /* AboutPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17CC97F510B4AC6C0034CD7A /* AboutPanel.xib */; }; 17CC993B10B4C9C80034CD7A /* License.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 17CC993A10B4C9C80034CD7A /* License.rtf */; }; + 17D3583F1533768E00A654D7 /* SPWindowControllerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D3583E1533768E00A654D7 /* SPWindowControllerDelegate.m */; }; 17D38EBC12771A1C00672B13 /* SPTableStructureDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D38EBB12771A1C00672B13 /* SPTableStructureDelegate.m */; }; 17D38F701279E23A00672B13 /* SPTableFieldValidation.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D38F6F1279E23A00672B13 /* SPTableFieldValidation.m */; }; 17D390C8127B65AF00672B13 /* SPGeneralPreferencePane.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D390C7127B65AF00672B13 /* SPGeneralPreferencePane.m */; }; @@ -172,7 +177,6 @@ 29A1B7E50FD1293A000B88E8 /* SPPrintAccessory.m in Sources */ = {isa = PBXBuildFile; fileRef = 29A1B7E40FD1293A000B88E8 /* SPPrintAccessory.m */; }; 29FA88231114619E00D1AF3D /* SPTableTriggers.m in Sources */ = {isa = PBXBuildFile; fileRef = 29FA88221114619E00D1AF3D /* SPTableTriggers.m */; }; 380F4EF50FC0B68F00B0BFD7 /* SPStringAdditionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 380F4EF40FC0B68F00B0BFD7 /* SPStringAdditionsTest.m */; }; - 380F4F250FC0C3D300B0BFD7 /* MCPKitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 380F4F240FC0C3D300B0BFD7 /* MCPKitTest.m */; }; 384582C40FB95FF800DDACB6 /* func-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 384582C30FB95FF800DDACB6 /* func-small.png */; }; 384582C70FB9603600DDACB6 /* proc-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 384582C60FB9603600DDACB6 /* proc-small.png */; }; 387BBBA80FBCB6CB00B31746 /* SPTableRelations.m in Sources */ = {isa = PBXBuildFile; fileRef = 387BBBA70FBCB6CB00B31746 /* SPTableRelations.m */; }; @@ -622,6 +626,12 @@ 172A65100F7BED7A001E861A /* SPConsoleMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPConsoleMessage.m; sourceTree = ""; }; 173284E81088FEDE0062E892 /* SPConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPConstants.h; sourceTree = ""; }; 173284E91088FEDE0062E892 /* SPConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPConstants.m; sourceTree = ""; }; + 17381854151FB34E0078FFE2 /* SPUserManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPUserManagerDelegate.h; sourceTree = ""; }; + 17381855151FB34E0078FFE2 /* SPUserManagerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPUserManagerDelegate.m; sourceTree = ""; }; + 17386E0915192526002DC206 /* SPTableContentDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableContentDataSource.h; sourceTree = ""; }; + 17386E0A15192526002DC206 /* SPTableContentDataSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableContentDataSource.m; sourceTree = ""; }; + 17386E0C1519257E002DC206 /* SPTableContentDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableContentDelegate.h; sourceTree = ""; }; + 17386E0D1519257E002DC206 /* SPTableContentDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableContentDelegate.m; sourceTree = ""; }; 173C4361104455CA001F3A30 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/QueryFavoriteManager.xib; sourceTree = ""; }; 173C4364104455E0001F3A30 /* SPQueryFavoriteManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPQueryFavoriteManager.h; sourceTree = ""; }; 173C4365104455E0001F3A30 /* SPQueryFavoriteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPQueryFavoriteManager.m; sourceTree = ""; }; @@ -740,12 +750,16 @@ 17B7B58F1016028F00F057DE /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = /usr/lib/libcrypto.dylib; sourceTree = ""; }; 17B7B591101602AE00F057DE /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = /usr/lib/libssl.dylib; sourceTree = ""; }; 17B7B698101611C800F057DE /* build-mysql-client.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "build-mysql-client.sh"; sourceTree = ""; }; + 17BA2A3015275D8600389803 /* SPExportInterfaceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportInterfaceController.h; sourceTree = ""; }; + 17BA2A3115275D8600389803 /* SPExportInterfaceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportInterfaceController.m; sourceTree = ""; }; 17C058860FC9FC390077E9CF /* SPNarrowDownCompletion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPNarrowDownCompletion.h; sourceTree = ""; }; 17C058870FC9FC390077E9CF /* SPNarrowDownCompletion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPNarrowDownCompletion.m; sourceTree = ""; }; 17CC97F110B4ABE90034CD7A /* SPAboutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPAboutController.h; sourceTree = ""; }; 17CC97F210B4ABE90034CD7A /* SPAboutController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPAboutController.m; sourceTree = ""; }; 17CC97F610B4AC6C0034CD7A /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Interfaces/English.lproj/AboutPanel.xib; sourceTree = ""; }; 17CC993A10B4C9C80034CD7A /* License.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = License.rtf; sourceTree = ""; }; + 17D3583D1533768E00A654D7 /* SPWindowControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPWindowControllerDelegate.h; sourceTree = ""; }; + 17D3583E1533768E00A654D7 /* SPWindowControllerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPWindowControllerDelegate.m; sourceTree = ""; }; 17D38EBA12771A1C00672B13 /* SPTableStructureDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableStructureDelegate.h; sourceTree = ""; }; 17D38EBB12771A1C00672B13 /* SPTableStructureDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPTableStructureDelegate.m; sourceTree = ""; }; 17D38F6E1279E23A00672B13 /* SPTableFieldValidation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableFieldValidation.h; sourceTree = ""; }; @@ -866,7 +880,6 @@ 296DC8A70F909194002A3258 /* MGTemplateEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTemplateEngine.m; sourceTree = ""; }; 296DC8A80F909194002A3258 /* MGTemplateEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTemplateEngine.h; sourceTree = ""; }; 296DC8A90F909194002A3258 /* ICUTemplateMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ICUTemplateMatcher.h; sourceTree = ""; }; - 296DC8AA0F909194002A3258 /* DeepMutableCopy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeepMutableCopy.h; sourceTree = ""; }; 296DC8AB0F909194002A3258 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = ""; }; 296DC8AC0F909194002A3258 /* ICUTemplateMatcher.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ICUTemplateMatcher.m; sourceTree = ""; }; 296DC8AD0F909194002A3258 /* MGTemplateStandardMarkers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTemplateStandardMarkers.m; sourceTree = ""; }; @@ -889,8 +902,6 @@ 380F4ED90FC0B50500B0BFD7 /* Unit Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Unit Tests.octest"; sourceTree = BUILT_PRODUCTS_DIR; }; 380F4EF30FC0B68F00B0BFD7 /* SPStringAdditionsTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPStringAdditionsTest.h; sourceTree = ""; }; 380F4EF40FC0B68F00B0BFD7 /* SPStringAdditionsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPStringAdditionsTest.m; sourceTree = ""; }; - 380F4F230FC0C3D300B0BFD7 /* MCPKitTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MCPKitTest.h; sourceTree = ""; }; - 380F4F240FC0C3D300B0BFD7 /* MCPKitTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MCPKitTest.m; sourceTree = ""; }; 384582C30FB95FF800DDACB6 /* func-small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "func-small.png"; sourceTree = ""; }; 384582C60FB9603600DDACB6 /* proc-small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "proc-small.png"; sourceTree = ""; }; 387BBBA60FBCB6CB00B31746 /* SPTableRelations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPTableRelations.h; sourceTree = ""; }; @@ -1476,6 +1487,30 @@ name = "Bundle Support"; sourceTree = ""; }; + 17381853151FB29C0078FFE2 /* User Manager */ = { + isa = PBXGroup; + children = ( + 4D90B798101E0CDF00D116A1 /* SPUserManager.h */, + 4D90B799101E0CDF00D116A1 /* SPUserManager.m */, + 17381854151FB34E0078FFE2 /* SPUserManagerDelegate.h */, + 17381855151FB34E0078FFE2 /* SPUserManagerDelegate.m */, + ); + name = "User Manager"; + sourceTree = ""; + }; + 17386E08151924E9002DC206 /* Table Content */ = { + isa = PBXGroup; + children = ( + 17E6414E0EF01EF6001BC333 /* SPTableContent.h */, + 17E6414F0EF01EF6001BC333 /* SPTableContent.m */, + 17386E0C1519257E002DC206 /* SPTableContentDelegate.h */, + 17386E0D1519257E002DC206 /* SPTableContentDelegate.m */, + 17386E0915192526002DC206 /* SPTableContentDataSource.h */, + 17386E0A15192526002DC206 /* SPTableContentDataSource.m */, + ); + name = "Table Content"; + sourceTree = ""; + }; 173C836C11AAD24300B8B084 /* Exporters */ = { isa = PBXGroup; children = ( @@ -1550,13 +1585,12 @@ 387BBBA70FBCB6CB00B31746 /* SPTableRelations.m */, 29FA88211114619E00D1AF3D /* SPTableTriggers.h */, 29FA88221114619E00D1AF3D /* SPTableTriggers.m */, - 17E6414E0EF01EF6001BC333 /* SPTableContent.h */, - 17E6414F0EF01EF6001BC333 /* SPTableContent.m */, 17E641500EF01EF6001BC333 /* SPDatabaseDocument.h */, 17E641510EF01EF6001BC333 /* SPDatabaseDocument.m */, 17D3DC1E1281816E002A163A /* SPDatabaseViewController.h */, 17D3DC1F1281816E002A163A /* SPDatabaseViewController.m */, 17D38FC2127B0C9500672B13 /* Connection View */, + 17386E08151924E9002DC206 /* Table Content */, 17D38F691279E17D00672B13 /* Table Structure */, 1792C28910AE1C7200ABE758 /* Controller Categories */, ); @@ -1580,14 +1614,13 @@ 1792C13610AD75C800ABE758 /* SPServerVariablesController.m */, 17E6415E0EF01F15001BC333 /* SPTableInfo.h */, 17E6415F0EF01F15001BC333 /* SPTableInfo.m */, - 4D90B798101E0CDF00D116A1 /* SPUserManager.h */, - 4D90B799101E0CDF00D116A1 /* SPUserManager.m */, 17E641600EF01F15001BC333 /* SPTablesList.h */, 17E641610EF01F15001BC333 /* SPTablesList.m */, BC27779E11514B940034DF6A /* SPNavigatorController.h */, BC27779F11514B940034DF6A /* SPNavigatorController.m */, 17A7773211C52D8E001E27B4 /* SPIndexesController.h */, 17A7773311C52D8E001E27B4 /* SPIndexesController.m */, + 17381853151FB29C0078FFE2 /* User Manager */, 1713C73D140D88D400CFD461 /* Query Controller */, ); name = "Subview Controllers"; @@ -1701,6 +1734,15 @@ path = Scripts; sourceTree = ""; }; + 177486451528EE820036121C /* RegexKitLite */ = { + isa = PBXGroup; + children = ( + 296DC8B00F909194002A3258 /* RegexKitLite.h */, + 296DC8AB0F909194002A3258 /* RegexKitLite.m */, + ); + name = RegexKitLite; + sourceTree = ""; + }; 1792C28910AE1C7200ABE758 /* Controller Categories */ = { isa = PBXGroup; children = ( @@ -1723,6 +1765,17 @@ name = Icons; sourceTree = ""; }; + 17D3583C1533766800A654D7 /* Window */ = { + isa = PBXGroup; + children = ( + 58A8A78F11A036C000B95749 /* SPWindowController.h */, + 58A8A79011A036C000B95749 /* SPWindowController.m */, + 17D3583D1533768E00A654D7 /* SPWindowControllerDelegate.h */, + 17D3583E1533768E00A654D7 /* SPWindowControllerDelegate.m */, + ); + name = Window; + sourceTree = ""; + }; 17D38EFB12777B2300672B13 /* Data Import */ = { isa = PBXGroup; children = ( @@ -1811,6 +1864,7 @@ 584192A0101E57BB0089807F /* NSMutableArray-MultipleSort.m */, 17DC8826126B22F200E9AAEC /* Views */, 58B909A111C3B8EC000826E5 /* Localization */, + 177486451528EE820036121C /* RegexKitLite */, 296DC8A40F90914B002A3258 /* MGTemplateEngine */, ); name = "Third Party"; @@ -1862,15 +1916,6 @@ name = "Text Views"; sourceTree = ""; }; - 17DC885B126B36CF00E9AAEC /* MCPKit */ = { - isa = PBXGroup; - children = ( - 380F4F230FC0C3D300B0BFD7 /* MCPKitTest.h */, - 380F4F240FC0C3D300B0BFD7 /* MCPKitTest.m */, - ); - name = MCPKit; - sourceTree = ""; - }; 17DC886A126B378A00E9AAEC /* Category Additions */ = { isa = PBXGroup; children = ( @@ -1980,10 +2025,9 @@ children = ( 17E6414A0EF01EF6001BC333 /* SPAppController.h */, 17E6414B0EF01EF6001BC333 /* SPAppController.m */, - 58A8A78F11A036C000B95749 /* SPWindowController.h */, - 58A8A79011A036C000B95749 /* SPWindowController.m */, 1798AB8F1267924D000D946A /* SPAppleScriptSupport.h */, 1798AB901267924D000D946A /* SPAppleScriptSupport.m */, + 17D3583C1533766800A654D7 /* Window */, 173567BA12AC1306000DCCEF /* Bundle Support */, 173E70A6107FF61D008733C9 /* Main View Controllers */, 173E70D2107FF687008733C9 /* Subview Controllers */, @@ -2217,6 +2261,8 @@ 17F90E4A1210B43A00274C98 /* SPExportFileUtilities.m */, 17AF787911FC41C00073D043 /* SPExportFilenameUtilities.h */, 17AF787A11FC41C00073D043 /* SPExportFilenameUtilities.m */, + 17BA2A3015275D8600389803 /* SPExportInterfaceController.h */, + 17BA2A3115275D8600389803 /* SPExportInterfaceController.m */, 175EC63312733B36009A7C0F /* SPExportControllerDelegate.h */, 175EC63412733B36009A7C0F /* SPExportControllerDelegate.m */, 582F022F1370B52600B30621 /* SPExportFileNameTokenObject.h */, @@ -2238,14 +2284,6 @@ name = Model; sourceTree = ""; }; - 17FC366814141A4B00AC3602 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 17DC885B126B36CF00E9AAEC /* MCPKit */, - ); - name = Frameworks; - sourceTree = ""; - }; 17FC36AE141425D600AC3602 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -2288,9 +2326,6 @@ 296DC8A70F909194002A3258 /* MGTemplateEngine.m */, 296DC8A90F909194002A3258 /* ICUTemplateMatcher.h */, 296DC8AC0F909194002A3258 /* ICUTemplateMatcher.m */, - 296DC8AA0F909194002A3258 /* DeepMutableCopy.h */, - 296DC8B00F909194002A3258 /* RegexKitLite.h */, - 296DC8AB0F909194002A3258 /* RegexKitLite.m */, 296DC8AF0F909194002A3258 /* NSArray_DeepMutableCopy.h */, 296DC8AE0F909194002A3258 /* NSArray_DeepMutableCopy.m */, 296DC8B20F909194002A3258 /* NSDictionary_DeepMutableCopy.h */, @@ -2331,7 +2366,6 @@ 380F4EF20FC0B67A00B0BFD7 /* Unit Tests */ = { isa = PBXGroup; children = ( - 17FC366814141A4B00AC3602 /* Frameworks */, 1198F5B41174EDDE00670590 /* Database Actions */, 17DC886A126B378A00E9AAEC /* Category Additions */, ); @@ -2352,9 +2386,9 @@ 584754CC120A05660057631F /* QuickLook Plugin */ = { isa = PBXGroup; children = ( + 584754D2120A05910057631F /* main.c */, 584754D0120A05910057631F /* GeneratePreviewForURL.m */, 584754D1120A05910057631F /* GenerateThumbnailForURL.m */, - 584754D2120A05910057631F /* main.c */, ); name = "QuickLook Plugin"; sourceTree = ""; @@ -3054,7 +3088,6 @@ 115D63E3117CBC5900419057 /* SPDatabaseInfo.m in Sources */, 1198F7541174FFCF00670590 /* SPDatabaseCopy.m in Sources */, 380F4EF50FC0B68F00B0BFD7 /* SPStringAdditionsTest.m in Sources */, - 380F4F250FC0C3D300B0BFD7 /* MCPKitTest.m in Sources */, 1760599F1336199D0098E162 /* SPMenuAdditionsTests.m in Sources */, 176059B713361D380098E162 /* SPDatabaseRenameTest.m in Sources */, 176059B813361D380098E162 /* SPDatabaseInfoTest.m in Sources */, @@ -3279,6 +3312,11 @@ 174136931516294000DF1EE6 /* SPFavoritesExporter.m in Sources */, 174136941516294000DF1EE6 /* SPFavoritesImporter.m in Sources */, 174137641516793B00DF1EE6 /* SPDataBase64EncodingAdditions.m in Sources */, + 17386E0B15192526002DC206 /* SPTableContentDataSource.m in Sources */, + 17386E0E1519257E002DC206 /* SPTableContentDelegate.m in Sources */, + 17381856151FB34E0078FFE2 /* SPUserManagerDelegate.m in Sources */, + 17BA2A3215275D8600389803 /* SPExportInterfaceController.m in Sources */, + 17D3583F1533768E00A654D7 /* SPWindowControllerDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4134,6 +4172,8 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/Frameworks/SPMySQLFramework/build/Debug\"", + "\"$(SRCROOT)/Frameworks/QueryKit/build/Debug\"", "\"$(SRCROOT)/Frameworks\"", "\"$(SRCROOT)\"", ); @@ -4141,7 +4181,6 @@ GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Sequel-Pro.pch"; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/Frameworks/SPMySQLFramework/**"; INFOPLIST_FILE = Resources/Plists/Info.plist; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/Frameworks/zlib\""; @@ -4285,13 +4324,14 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Frameworks/SPMySQLFramework/build/Debug\""; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Sequel-Pro.pch"; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/Frameworks/SPMySQLFramework/**"; + HEADER_SEARCH_PATHS = ""; INSTALL_PATH = /usr/local/bin; OTHER_LDFLAGS = ( "-framework", @@ -4310,11 +4350,12 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Frameworks/SPMySQLFramework/build/Debug\""; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Sequel-Pro.pch"; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/Frameworks/SPMySQLFramework/**"; + HEADER_SEARCH_PATHS = ""; INSTALL_PATH = /usr/local/bin; OTHER_LDFLAGS = ( "-framework", @@ -4332,11 +4373,11 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/Frameworks/SPMySQLFramework/build/Debug\""; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Sequel-Pro.pch"; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/Frameworks/SPMySQLFramework/**"; INSTALL_PATH = /usr/local/bin; OTHER_LDFLAGS = ( "-framework", @@ -4355,6 +4396,8 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/Frameworks/QueryKit/build/Debug\"", + "\"$(SRCROOT)/Frameworks/SPMySQLFramework/build/Debug\"", "\"$(SRCROOT)/Frameworks\"", "\"$(SRCROOT)\"", ); @@ -4364,7 +4407,7 @@ GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Sequel-Pro.pch"; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/Frameworks/SPMySQLFramework/**"; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Resources/Plists/Info.plist; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/Frameworks/zlib\""; @@ -4384,6 +4427,8 @@ COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; FRAMEWORK_SEARCH_PATHS = ( + "\"$(SRCROOT)/Frameworks/SPMySQLFramework/build/Debug\"", + "\"$(SRCROOT)/Frameworks/QueryKit/build/Debug\"", "\"$(SRCROOT)/Frameworks\"", "\"$(SRCROOT)\"", ); @@ -4391,7 +4436,7 @@ GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Source/Sequel-Pro.pch"; - HEADER_SEARCH_PATHS = "${PROJECT_DIR}/Frameworks/SPMySQLFramework/**"; + HEADER_SEARCH_PATHS = ""; INFOPLIST_FILE = Resources/Plists/Info.plist; INSTALL_PATH = "$(HOME)/Applications"; LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/Frameworks/zlib\""; -- cgit v1.2.3