aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DBView.xib254
-rw-r--r--Source/CMCopyTable.m17
-rw-r--r--Source/CustomQuery.h3
-rw-r--r--Source/CustomQuery.m32
4 files changed, 262 insertions, 44 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index dc251b32..01547322 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -23,13 +23,13 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="27"/>
+ <integer value="663"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.brandonwalkin.BWToolkit</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.WebKitIBPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -59,7 +59,7 @@
<string key="NSWindowTitle">Sequel Pro</string>
<string key="NSWindowClass">NSWindow</string>
<string key="NSViewClass">View</string>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{780, 480}</string>
<object class="NSView" key="NSWindowView" id="579726586">
<reference key="NSNextResponder"/>
@@ -237,7 +237,7 @@
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor" id="1001122760">
<int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
+ <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
</object>
</object>
<reference key="NSTextColor" ref="454249633"/>
@@ -2140,7 +2140,7 @@
<object class="NSTabViewItem" id="624106058">
<string key="NSIdentifier">content</string>
<object class="NSView" key="NSView" id="1013108064">
- <reference key="NSNextResponder" ref="714795046"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2880,7 +2880,6 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {700, 544}}</string>
- <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Content</string>
<reference key="NSColor" ref="62854682"/>
@@ -2889,7 +2888,7 @@
<object class="NSTabViewItem" id="105987292">
<string key="NSIdentifier">customQuery</string>
<object class="NSView" key="NSView" id="746504912">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder" ref="714795046"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2916,6 +2915,29 @@
<object class="NSTextView" id="1055190999">
<reference key="NSNextResponder" ref="1072692119"/>
<int key="NSvFlags">6418</int>
+ <object class="NSMutableSet" key="NSDragTypes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="set.sortedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>Apple HTML pasteboard type</string>
+ <string>Apple PDF pasteboard type</string>
+ <string>Apple PICT pasteboard type</string>
+ <string>Apple PNG pasteboard type</string>
+ <string>Apple URL pasteboard type</string>
+ <string>CorePasteboardFlavorType 0x6D6F6F76</string>
+ <string>NSColor pasteboard type</string>
+ <string>NSFilenamesPboardType</string>
+ <string>NSStringPboardType</string>
+ <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
+ <string>NeXT RTFD pasteboard type</string>
+ <string>NeXT Rich Text Format v1.0 pasteboard type</string>
+ <string>NeXT TIFF v4.0 pasteboard type</string>
+ <string>NeXT font pasteboard type</string>
+ <string>NeXT ruler pasteboard type</string>
+ <string>WebURLsWithTitlesPboardType</string>
+ <string>public.url</string>
+ </object>
+ </object>
<string key="NSFrameSize">{688, 14}</string>
<reference key="NSSuperview" ref="1072692119"/>
<object class="NSTextContainer" key="NSTextContainer" id="326170846">
@@ -3762,6 +3784,7 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {700, 544}}</string>
+ <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Custom Query</string>
<reference key="NSColor" ref="62854682"/>
@@ -4806,14 +4829,14 @@
<reference key="NSTabView" ref="714795046"/>
</object>
</object>
- <reference key="NSSelectedTabViewItem" ref="624106058"/>
+ <reference key="NSSelectedTabViewItem" ref="105987292"/>
<reference key="NSFont" ref="26"/>
<int key="NSTvFlags">134217731</int>
<bool key="NSAllowTruncatedLabels">YES</bool>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1013108064"/>
+ <reference ref="746504912"/>
</object>
</object>
</object>
@@ -4833,7 +4856,7 @@
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{780, 502}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSFrameAutosaveName"/>
</object>
<object class="NSWindowTemplate" id="554105051">
@@ -6009,7 +6032,7 @@
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="329225443">
<nil key="NSNextResponder"/>
@@ -6289,7 +6312,7 @@
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{213, 129}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="734744289">
<int key="NSWindowStyleMask">1</int>
@@ -6301,7 +6324,7 @@
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="234287744">
<nil key="NSNextResponder"/>
@@ -6457,7 +6480,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{213, 129}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="787219800">
<int key="NSWindowStyleMask">1</int>
@@ -6467,7 +6490,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSWindowTitle">New Relation</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="842408319">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -7068,7 +7091,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSFrameSize">{302, 307}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="1066802919">
<int key="NSWindowStyleMask">3</int>
@@ -7080,7 +7103,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{213, 50}</string>
<object class="NSView" key="NSWindowView" id="525490268">
<nil key="NSNextResponder"/>
@@ -7200,7 +7223,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{213, 72}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="553728448">
<int key="NSWindowStyleMask">9</int>
@@ -7212,7 +7235,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="1052076676">
<nil key="NSNextResponder"/>
@@ -7347,7 +7370,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{213, 129}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="828950706">
<int key="NSWindowStyleMask">15</int>
@@ -7359,7 +7382,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{350, 200}</string>
<object class="NSView" key="NSWindowView" id="749598685">
<nil key="NSNextResponder"/>
@@ -7561,7 +7584,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMinSize">{350, 222}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="466147946">
<int key="NSWindowStyleMask">9</int>
@@ -7573,7 +7596,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{213, 107}</string>
<object class="NSView" key="NSWindowView" id="860968037">
<nil key="NSNextResponder"/>
@@ -7722,7 +7745,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{213, 129}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="78186995">
<int key="NSWindowStyleMask">31</int>
@@ -7732,7 +7755,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSWindowTitle">MySQL Help</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{351, 120}</string>
<object class="NSView" key="NSWindowView" id="539508428">
<nil key="NSNextResponder"/>
@@ -8126,7 +8149,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 1002}}</string>
<string key="NSMinSize">{351, 136}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSFrameAutosaveName">MYSQL_HELP_WINDOW</string>
</object>
<object class="NSWindowTemplate" id="176945499">
@@ -8139,7 +8162,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSMutableString" key="NSViewClass">
<characters key="NS.bytes">View</characters>
</object>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{350, 250}</string>
<object class="NSView" key="NSWindowView" id="1024486775">
<nil key="NSNextResponder"/>
@@ -8530,7 +8553,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{350, 272}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSWindowTemplate" id="434046103">
<int key="NSWindowStyleMask">9</int>
@@ -8663,7 +8686,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSWindowTitle">Secure Text Input Sheet</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
- <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="978976687">
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -8767,7 +8790,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSFrameSize">{338, 138}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
- <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
</object>
<object class="NSCustomView" id="139279766">
<nil key="NSNextResponder"/>
@@ -10633,7 +10656,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string key="NSColorName">disabledControlTextColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes>
+ <bytes key="NSWhite">MC4zMzMzMzMzNDMzAA</bytes>
</object>
</object>
</object>
@@ -14779,6 +14802,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">6666</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">customQueryScrollView</string>
+ <reference key="source" ref="601471102"/>
+ <reference key="destination" ref="678281118"/>
+ </object>
+ <int key="connectionID">6667</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -23000,10 +23031,10 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{58, 306}, {944, 550}}</string>
+ <string>{{313, 430}, {944, 550}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO"/>
- <string>{{58, 306}, {944, 550}}</string>
+ <string>{{313, 430}, {944, 550}}</string>
<integer value="1"/>
<integer value="1"/>
<string>{{62, 352}, {845, 504}}</string>
@@ -24117,7 +24148,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">6666</int>
+ <int key="maxID">6667</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -25619,6 +25650,161 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
</object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">CustomQuery</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>chooseQueryFavorite:</string>
+ <string>chooseQueryHistory:</string>
+ <string>closeSheet:</string>
+ <string>filterQueryFavorites:</string>
+ <string>filterQueryHistory:</string>
+ <string>gearMenuItemSelected:</string>
+ <string>helpSearchFindNextInPage:</string>
+ <string>helpSearchFindPreviousInPage:</string>
+ <string>helpSegmentDispatcher:</string>
+ <string>helpSelectHelpTargetMySQL:</string>
+ <string>helpSelectHelpTargetPage:</string>
+ <string>helpSelectHelpTargetWeb:</string>
+ <string>helpTargetDispatcher:</string>
+ <string>runAllQueries:</string>
+ <string>runSelectedQueries:</string>
+ <string>showAutoHelpForCurrentWord:</string>
+ <string>showHelpForCurrentWord:</string>
+ <string>showHelpForSearchString:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>affectedRowsText</string>
+ <string>autohelpMenuItem</string>
+ <string>autoindentMenuItem</string>
+ <string>autopairMenuItem</string>
+ <string>autouppercaseKeywordsMenuItem</string>
+ <string>clearHistoryMenuItem</string>
+ <string>commentCurrentQueryMenuItem</string>
+ <string>commentLineOrSelectionMenuItem</string>
+ <string>completionListMenuItem</string>
+ <string>customQueryScrollView</string>
+ <string>customQueryView</string>
+ <string>editorFontMenuItem</string>
+ <string>errorText</string>
+ <string>helpNavigator</string>
+ <string>helpSearchField</string>
+ <string>helpSearchFieldCell</string>
+ <string>helpTargetSelector</string>
+ <string>helpWebView</string>
+ <string>helpWebViewWindow</string>
+ <string>multipleLineEditingButton</string>
+ <string>queryFavoriteNameTextField</string>
+ <string>queryFavoritesButton</string>
+ <string>queryFavoritesSaveAllMenuItem</string>
+ <string>queryFavoritesSaveAsMenuItem</string>
+ <string>queryFavoritesSearchField</string>
+ <string>queryFavoritesSearchFieldView</string>
+ <string>queryFavoritesSearchMenuItem</string>
+ <string>queryFavoritesSheet</string>
+ <string>queryHistoryButton</string>
+ <string>queryHistorySearchField</string>
+ <string>queryHistorySearchFieldView</string>
+ <string>queryHistorySearchMenuItem</string>
+ <string>runAllButton</string>
+ <string>runAllMenuItem</string>
+ <string>runSelectionButton</string>
+ <string>runSelectionMenuItem</string>
+ <string>saveQueryFavoriteButton</string>
+ <string>saveQueryFavoriteGlobal</string>
+ <string>shiftLeftMenuItem</string>
+ <string>shiftRightMenuItem</string>
+ <string>tableDocumentInstance</string>
+ <string>tableWindow</string>
+ <string>textView</string>
+ <string>valueSheet</string>
+ <string>valueTextField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSScrollView</string>
+ <string>CMCopyTable</string>
+ <string>NSMenuItem</string>
+ <string>id</string>
+ <string>NSSegmentedControl</string>
+ <string>NSSearchField</string>
+ <string>NSSearchFieldCell</string>
+ <string>NSSegmentedControl</string>
+ <string>WebView</string>
+ <string>NSWindow</string>
+ <string>id</string>
+ <string>NSTextField</string>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>NSSearchField</string>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>NSWindow</string>
+ <string>id</string>
+ <string>NSSearchField</string>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>NSButton</string>
+ <string>id</string>
+ <string>NSMenuItem</string>
+ <string>NSMenuItem</string>
+ <string>id</string>
+ <string>id</string>
+ <string>CMTextView</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../Source/CustomQuery.h</string>
+ </object>
+ </object>
+ </object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m
index 8893696d..64875cea 100644
--- a/Source/CMCopyTable.m
+++ b/Source/CMCopyTable.m
@@ -443,8 +443,23 @@ int MENU_EDIT_COPY_AS_SQL = 2002;
}
}
}
+ if([[[[self delegate] class] description] isEqualToString:@"CustomQuery"]) {
+ id tableContentView = [[self delegate] valueForKeyPath:@"customQueryView"];
+ if([tableContentView numberOfSelectedRows] == 1 && ([theEvent keyCode] == 36 || [theEvent keyCode] == 76)) {
+
+ // TODO: this works until the user presses OK in the Field Editor Sheet!!
+ // in the future we should store the new row data temporarily and then
+ // after editing the last column update the db field by field (ask HansJB)
+ NSInteger colNum = [[tableContentView tableColumns] count];
+ NSInteger i;
+ for(i=0; i<colNum; i++) {
+ [[self delegate] tableView:tableContentView shouldEditTableColumn:[[tableContentView tableColumns] objectAtIndex:i] row:[tableContentView selectedRow]];
+ }
+ return;
+ }
+ }
- [super keyDown:theEvent];
+ [super keyDown:theEvent];
}
@end
diff --git a/Source/CustomQuery.h b/Source/CustomQuery.h
index ba0e456d..121b4853 100644
--- a/Source/CustomQuery.h
+++ b/Source/CustomQuery.h
@@ -72,6 +72,7 @@
IBOutlet CMTextView *textView;
IBOutlet CMCopyTable *customQueryView;
+ IBOutlet NSScrollView *customQueryScrollView;
IBOutlet id errorText;
IBOutlet id affectedRowsText;
IBOutlet id valueSheet;
@@ -126,6 +127,8 @@
NSInteger fullResultCount;
NSArray *cqColumnDefinition;
NSString *lastExecutedQuery;
+ NSInteger editedRow;
+ NSRect editedScrollViewRect;
BOOL isWorking;
BOOL tableReloadAfterEditing;
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 71ed2ec4..ebcf1259 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -408,8 +408,10 @@
// Reset the current table view as necessary to avoid redraw and reload issues.
// Restore the view position to the top left to be within the results for all datasets.
- [customQueryView scrollRowToVisible:0];
- [customQueryView scrollColumnToVisible:0];
+ if(editedRow == -1) {
+ [customQueryView scrollRowToVisible:0];
+ [customQueryView scrollColumnToVisible:0];
+ }
// Remove all the columns
if(!tableReloadAfterEditing) {
@@ -576,7 +578,6 @@
if(!databaseWasChanged && [query isMatchedByRegex:@"(?i)\\b(use|drop\\s+database|drop\\s+schema)\\b\\s+."])
databaseWasChanged = YES;
}
-
// If the query was cancelled, end all queries.
if ([mySQLConnection queryCancelled]) break;
}
@@ -761,14 +762,20 @@
}
}
+ [customQueryView reloadData];
+
if(tableReloadAfterEditing) {
- // scroll to last edited row after refreshing data
- // TODO: should be improved
- [customQueryView scrollRowToVisible:[customQueryView selectedRow]];
+ // scroll to last edited row/view port after refreshing data
+ if(editedRow > -1) {
+ [customQueryView selectRowIndexes:[NSIndexSet indexSetWithIndex:editedRow] byExtendingSelection:NO];
+ [[customQueryScrollView contentView] scrollToPoint:NSMakePoint(editedScrollViewRect.origin.x, editedScrollViewRect.origin.y)];
+ [customQueryScrollView reflectScrolledClipView:[customQueryScrollView contentView]];
+ editedRow = -1;
+ } else {
+ [customQueryView scrollRowToVisible:[customQueryView selectedRow]];
+ }
}
- [customQueryView reloadData];
-
// Init copyTable with necessary information for copying selected rows as SQL INSERT
[customQueryView setTableInstance:self withTableData:fullResult withColumns:cqColumnDefinition withTableName:resultTableName withConnection:mySQLConnection];
@@ -1506,6 +1513,7 @@
// On success reload table data by executing the last query
tableReloadAfterEditing = YES;
+
[self performQueries:[NSArray arrayWithObject:lastExecutedQuery] withCallback:NULL];
} else {
@@ -1753,7 +1761,7 @@
/*
* Double-click action on a field
*/
-- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
{
// Only allow editing if a task is not active
@@ -1819,6 +1827,11 @@
SPFieldEditorController *fieldEditor = [[SPFieldEditorController alloc] init];
+
+ // Remember edited row for reselecting and setting the scroll view after reload
+ editedRow = rowIndex;
+ editedScrollViewRect = [customQueryScrollView documentVisibleRect];
+
// Set max text length
if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"string"]
&& [columnDefinition valueForKey:@"char_length"])
@@ -2844,6 +2857,7 @@
// init tableView's data source
fullResultCount = 0;
fullResult = [[NSMutableArray alloc] init];
+ editedRow = -1;
prefs = [NSUserDefaults standardUserDefaults];
}