aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/DBView.xib757
-rw-r--r--Source/SPTableContent.h15
-rw-r--r--Source/SPTableContent.m68
3 files changed, 820 insertions, 20 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib
index b8a999ce..19cd1ac2 100644
--- a/Interfaces/English.lproj/DBView.xib
+++ b/Interfaces/English.lproj/DBView.xib
@@ -23,9 +23,8 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="7518"/>
- <integer value="6210"/>
<integer value="27"/>
+ <integer value="7503"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3774,7 +3773,7 @@
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
- <object class="NSCustomResource" key="NSImage">
+ <object class="NSCustomResource" key="NSImage" id="968214082">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">button_action</string>
</object>
@@ -9277,12 +9276,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<int key="NSWindowStyleMask">8347</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 159}, {480, 270}}</string>
- <int key="NSWTFlags">1685585920</int>
+ <int key="NSWTFlags">-461896704</int>
<string key="NSWindowTitle">Filter</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="NSWindowContentMinSize">{240, 170}</string>
+ <string key="NSWindowContentMinSize">{340, 170}</string>
<object class="NSView" key="NSWindowView" id="257361103">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
@@ -9443,13 +9442,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="_NSCornerView" key="NSCornerView" id="651821776">
<reference key="NSNextResponder" ref="332689220"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{224, 0}, {16, 17}}</string>
+ <string key="NSFrame">{{464, 0}, {16, 17}}</string>
<reference key="NSSuperview" ref="332689220"/>
</object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="435560165">
- <double key="NSWidth">242</double>
+ <double key="NSWidth">475</double>
<double key="NSMinWidth">40</double>
<double key="NSMaxWidth">1000</double>
<object class="NSTableHeaderCell" key="NSHeaderCell">
@@ -9510,7 +9509,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSScroller" id="281953763">
<reference key="NSNextResponder" ref="332689220"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{224, 17}, {15, 102}}</string>
+ <string key="NSFrame">{{464, 17}, {15, 72}}</string>
<reference key="NSSuperview" ref="332689220"/>
<reference key="NSTarget" ref="332689220"/>
<string key="NSAction">_doScroller:</string>
@@ -9519,7 +9518,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<object class="NSScroller" id="784489290">
<reference key="NSNextResponder" ref="332689220"/>
<int key="NSvFlags">-2147483392</int>
- <string key="NSFrame">{{1, 119}, {223, 15}}</string>
+ <string key="NSFrame">{{1, 89}, {463, 15}}</string>
<reference key="NSSuperview" ref="332689220"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="332689220"/>
@@ -9739,12 +9738,148 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<int key="BWSVCollapsiblePopupSelection">0</int>
<bool key="BWSVDividerCanCollapse">NO</bool>
</object>
+ <object class="BWTransparentCheckbox" id="631288327">
+ <reference key="NSNextResponder" ref="257361103"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{68, 27}, {139, 18}}</string>
+ <reference key="NSSuperview" ref="257361103"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="BWTransparentCheckboxCell" key="NSCell" id="1038452661">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">131072</int>
+ <string key="NSContents">Negate Clause</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="631288327"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="653588312"/>
+ <reference key="NSAlternateImage" ref="386686735"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="BWTransparentCheckbox" id="158170126">
+ <reference key="NSNextResponder" ref="257361103"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{68, 9}, {139, 18}}</string>
+ <reference key="NSSuperview" ref="257361103"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="BWTransparentCheckboxCell" key="NSCell" id="146098012">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">131072</int>
+ <string key="NSContents">Select Distinct</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="158170126"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="653588312"/>
+ <reference key="NSAlternateImage" ref="386686735"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSPopUpButton" id="743894180">
+ <reference key="NSNextResponder" ref="257361103"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{14, 13}, {49, 31}}</string>
+ <reference key="NSSuperview" ref="257361103"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSPopUpButtonCell" key="NSCell" id="131977594">
+ <int key="NSCellFlags">71433792</int>
+ <int key="NSCellFlags2">2048</int>
+ <reference key="NSSupport" ref="244931163"/>
+ <reference key="NSControlView" ref="743894180"/>
+ <int key="NSButtonFlags">-2041954049</int>
+ <int key="NSButtonFlags2">32</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">400</int>
+ <int key="NSPeriodicInterval">75</int>
+ <object class="NSMenuItem" key="NSMenuItem" id="926461989">
+ <reference key="NSMenu" ref="435787029"/>
+ <bool key="NSIsHidden">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <int key="NSState">1</int>
+ <reference key="NSImage" ref="968214082"/>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="131977594"/>
+ </object>
+ <bool key="NSMenuItemRespectAlignment">YES</bool>
+ <object class="NSMenu" key="NSMenu" id="435787029">
+ <string key="NSTitle">OtherViews</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="926461989"/>
+ <object class="NSMenuItem" id="906365069">
+ <reference key="NSMenu" ref="435787029"/>
+ <string key="NSTitle">Set Default Operator</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="131977594"/>
+ </object>
+ <object class="NSMenuItem" id="250649762">
+ <reference key="NSMenu" ref="435787029"/>
+ <string key="NSTitle">Look into all Fields</string>
+ <string key="NSKeyEquiv">a</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">1</int>
+ <reference key="NSTarget" ref="131977594"/>
+ </object>
+ <object class="NSMenuItem" id="799609780">
+ <reference key="NSMenu" ref="435787029"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <reference key="NSTarget" ref="131977594"/>
+ </object>
+ <object class="NSMenuItem" id="182251176">
+ <reference key="NSMenu" ref="435787029"/>
+ <string key="NSTitle">Swap Table</string>
+ <string key="NSKeyEquiv">s</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="450876295"/>
+ <reference key="NSMixedImage" ref="414351669"/>
+ <string key="NSAction">_popUpItemAction:</string>
+ <int key="NSTag">2</int>
+ <reference key="NSTarget" ref="131977594"/>
+ </object>
+ </object>
+ <reference key="NSMenuFont" ref="244931163"/>
+ </object>
+ <bool key="NSPullDown">YES</bool>
+ <int key="NSPreferredEdge">1</int>
+ <bool key="NSUsesItemFromMenu">YES</bool>
+ <bool key="NSAltersState">YES</bool>
+ </object>
+ </object>
</object>
<string key="NSFrameSize">{480, 270}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
- <string key="NSMinSize">{240, 189}</string>
+ <string key="NSMinSize">{340, 189}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSFrameAutosaveName">SPTableFilterPanel</string>
</object>
@@ -15330,6 +15465,62 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">7536</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">filterTableNegateCheckbox</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="631288327"/>
+ </object>
+ <int key="connectionID">7571</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">setDefaultOperator:</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="906365069"/>
+ </object>
+ <int key="connectionID">7572</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleLookAllFieldsMode:</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="250649762"/>
+ </object>
+ <int key="connectionID">7573</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">filterTableGearLookAllFields</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="250649762"/>
+ </object>
+ <int key="connectionID">7574</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">swapFilterTable:</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="182251176"/>
+ </object>
+ <int key="connectionID">7575</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleNegateClause:</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="631288327"/>
+ </object>
+ <int key="connectionID">7576</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleNegateClause:</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="158170126"/>
+ </object>
+ <int key="connectionID">7579</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -21377,6 +21568,9 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference ref="672293521"/>
<reference ref="389089658"/>
<reference ref="875855507"/>
+ <reference ref="158170126"/>
+ <reference ref="631288327"/>
+ <reference ref="743894180"/>
</object>
<reference key="parent" ref="633448481"/>
</object>
@@ -21552,6 +21746,90 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<reference key="object" ref="212274460"/>
<reference key="parent" ref="873734510"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7537</int>
+ <reference key="object" ref="631288327"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1038452661"/>
+ </object>
+ <reference key="parent" ref="257361103"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7538</int>
+ <reference key="object" ref="1038452661"/>
+ <reference key="parent" ref="631288327"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7563</int>
+ <reference key="object" ref="743894180"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="131977594"/>
+ </object>
+ <reference key="parent" ref="257361103"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7564</int>
+ <reference key="object" ref="131977594"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="435787029"/>
+ </object>
+ <reference key="parent" ref="743894180"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7565</int>
+ <reference key="object" ref="435787029"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="182251176"/>
+ <reference ref="799609780"/>
+ <reference ref="250649762"/>
+ <reference ref="906365069"/>
+ <reference ref="926461989"/>
+ </object>
+ <reference key="parent" ref="131977594"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7570</int>
+ <reference key="object" ref="182251176"/>
+ <reference key="parent" ref="435787029"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7569</int>
+ <reference key="object" ref="799609780"/>
+ <reference key="parent" ref="435787029"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7568</int>
+ <reference key="object" ref="250649762"/>
+ <reference key="parent" ref="435787029"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7567</int>
+ <reference key="object" ref="906365069"/>
+ <reference key="parent" ref="435787029"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7566</int>
+ <reference key="object" ref="926461989"/>
+ <reference key="parent" ref="435787029"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7577</int>
+ <reference key="object" ref="158170126"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="146098012"/>
+ </object>
+ <reference key="parent" ref="257361103"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7578</int>
+ <reference key="object" ref="146098012"/>
+ <reference key="parent" ref="158170126"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -22798,6 +23076,19 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>7525.IBPluginDependency</string>
<string>7533.IBPluginDependency</string>
<string>7534.IBPluginDependency</string>
+ <string>7537.IBPluginDependency</string>
+ <string>7538.IBPluginDependency</string>
+ <string>7563.IBPluginDependency</string>
+ <string>7564.IBPluginDependency</string>
+ <string>7565.IBEditorWindowLastContentRect</string>
+ <string>7565.IBPluginDependency</string>
+ <string>7566.IBPluginDependency</string>
+ <string>7567.IBPluginDependency</string>
+ <string>7568.IBPluginDependency</string>
+ <string>7569.IBPluginDependency</string>
+ <string>7570.IBPluginDependency</string>
+ <string>7577.IBPluginDependency</string>
+ <string>7578.IBPluginDependency</string>
<string>858.IBPluginDependency</string>
<string>858.ImportedFromIB2</string>
<string>959.IBEditorWindowLastContentRect</string>
@@ -24445,12 +24736,12 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{153, 361}, {480, 270}}</string>
+ <string>{{242, 511}, {480, 270}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{153, 361}, {480, 270}}</string>
+ <string>{{242, 511}, {480, 270}}</string>
<boolean value="NO"/>
<boolean value="YES"/>
- <string>{240, 170}</string>
+ <string>{340, 170}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
@@ -24478,6 +24769,19 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.brandonwalkin.BWToolkit</string>
+ <string>com.brandonwalkin.BWToolkit</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{429, 466}, {188, 81}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.brandonwalkin.BWToolkit</string>
+ <string>com.brandonwalkin.BWToolkit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{265, 489}, {405, 267}}</string>
@@ -24516,7 +24820,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">7536</int>
+ <int key="maxID">7579</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -29873,6 +30177,431 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
</object>
</object>
+ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.1+">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">SPTableContent</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>addRow:</string>
+ <string>copyRow:</string>
+ <string>filterTable:</string>
+ <string>navigatePaginationFromButton:</string>
+ <string>reloadTable:</string>
+ <string>removeRow:</string>
+ <string>setCompareTypes:</string>
+ <string>setDefaultOperator:</string>
+ <string>showTableFilter:</string>
+ <string>swapFilterTable:</string>
+ <string>tableFilterClear:</string>
+ <string>tableFilterExecute:</string>
+ <string>toggleFilterField:</string>
+ <string>toggleLookAllFieldsMode:</string>
+ <string>toggleNegateClause:</string>
+ <string>togglePagination:</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>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addRow:</string>
+ <string>copyRow:</string>
+ <string>filterTable:</string>
+ <string>navigatePaginationFromButton:</string>
+ <string>reloadTable:</string>
+ <string>removeRow:</string>
+ <string>setCompareTypes:</string>
+ <string>setDefaultOperator:</string>
+ <string>showTableFilter:</string>
+ <string>swapFilterTable:</string>
+ <string>tableFilterClear:</string>
+ <string>tableFilterExecute:</string>
+ <string>toggleFilterField:</string>
+ <string>toggleLookAllFieldsMode:</string>
+ <string>toggleNegateClause:</string>
+ <string>togglePagination:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">addRow:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">copyRow:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">filterTable:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">navigatePaginationFromButton:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">reloadTable:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">removeRow:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">setCompareTypes:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">setDefaultOperator:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">showTableFilter:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">swapFilterTable:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">tableFilterClear:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">tableFilterExecute:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">toggleFilterField:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">toggleLookAllFieldsMode:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">toggleNegateClause:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">togglePagination:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addButton</string>
+ <string>argumentField</string>
+ <string>betweenTextField</string>
+ <string>compareField</string>
+ <string>contentFilterManager</string>
+ <string>contentViewPane</string>
+ <string>copyButton</string>
+ <string>countText</string>
+ <string>fieldField</string>
+ <string>filterButton</string>
+ <string>filterTableClearButton</string>
+ <string>filterTableFilterButton</string>
+ <string>filterTableGearLookAllFields</string>
+ <string>filterTableNegateCheckbox</string>
+ <string>filterTableView</string>
+ <string>filterTableWhereClause</string>
+ <string>filterTableWindow</string>
+ <string>firstBetweenField</string>
+ <string>limitRowsButton</string>
+ <string>limitRowsField</string>
+ <string>limitRowsStepper</string>
+ <string>multipleLineEditingButton</string>
+ <string>paginationButton</string>
+ <string>paginationNextButton</string>
+ <string>paginationPageField</string>
+ <string>paginationPageStepper</string>
+ <string>paginationPreviousButton</string>
+ <string>paginationView</string>
+ <string>reloadButton</string>
+ <string>removeButton</string>
+ <string>secondBetweenField</string>
+ <string>spHistoryControllerInstance</string>
+ <string>tableContentView</string>
+ <string>tableDataInstance</string>
+ <string>tableDocumentInstance</string>
+ <string>tableInfoInstance</string>
+ <string>tableSourceInstance</string>
+ <string>tablesListInstance</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>NSView</string>
+ <string>id</string>
+ <string>id</string>
+ <string>NSPopUpButton</string>
+ <string>id</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSMenuItem</string>
+ <string>id</string>
+ <string>SPCopyTable</string>
+ <string>SPTextView</string>
+ <string>NSPanel</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSTextField</string>
+ <string>NSStepper</string>
+ <string>NSButton</string>
+ <string>NSView</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>SPHistoryController</string>
+ <string>SPCopyTable</string>
+ <string>id</string>
+ <string>id</string>
+ <string>SPTableInfo</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addButton</string>
+ <string>argumentField</string>
+ <string>betweenTextField</string>
+ <string>compareField</string>
+ <string>contentFilterManager</string>
+ <string>contentViewPane</string>
+ <string>copyButton</string>
+ <string>countText</string>
+ <string>fieldField</string>
+ <string>filterButton</string>
+ <string>filterTableClearButton</string>
+ <string>filterTableFilterButton</string>
+ <string>filterTableGearLookAllFields</string>
+ <string>filterTableNegateCheckbox</string>
+ <string>filterTableView</string>
+ <string>filterTableWhereClause</string>
+ <string>filterTableWindow</string>
+ <string>firstBetweenField</string>
+ <string>limitRowsButton</string>
+ <string>limitRowsField</string>
+ <string>limitRowsStepper</string>
+ <string>multipleLineEditingButton</string>
+ <string>paginationButton</string>
+ <string>paginationNextButton</string>
+ <string>paginationPageField</string>
+ <string>paginationPageStepper</string>
+ <string>paginationPreviousButton</string>
+ <string>paginationView</string>
+ <string>reloadButton</string>
+ <string>removeButton</string>
+ <string>secondBetweenField</string>
+ <string>spHistoryControllerInstance</string>
+ <string>tableContentView</string>
+ <string>tableDataInstance</string>
+ <string>tableDocumentInstance</string>
+ <string>tableInfoInstance</string>
+ <string>tableSourceInstance</string>
+ <string>tablesListInstance</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">addButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">argumentField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">betweenTextField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">compareField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">contentFilterManager</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">contentViewPane</string>
+ <string key="candidateClassName">NSView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">copyButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">countText</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fieldField</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableClearButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableFilterButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableGearLookAllFields</string>
+ <string key="candidateClassName">NSMenuItem</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableNegateCheckbox</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableView</string>
+ <string key="candidateClassName">SPCopyTable</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableWhereClause</string>
+ <string key="candidateClassName">SPTextView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">filterTableWindow</string>
+ <string key="candidateClassName">NSPanel</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">firstBetweenField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">limitRowsButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">limitRowsField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">limitRowsStepper</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">multipleLineEditingButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">paginationButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">paginationNextButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">paginationPageField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">paginationPageStepper</string>
+ <string key="candidateClassName">NSStepper</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">paginationPreviousButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">paginationView</string>
+ <string key="candidateClassName">NSView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">reloadButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">removeButton</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">secondBetweenField</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">spHistoryControllerInstance</string>
+ <string key="candidateClassName">SPHistoryController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tableContentView</string>
+ <string key="candidateClassName">SPCopyTable</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tableDataInstance</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tableDocumentInstance</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tableInfoInstance</string>
+ <string key="candidateClassName">SPTableInfo</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tableSourceInstance</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tablesListInstance</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBDocumentRelativeSource</string>
+ <string key="minorKey">../../Source/SPTableContent.h</string>
+ </object>
+ </object>
+ </object>
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h
index fca3fdae..e6d41ca9 100644
--- a/Source/SPTableContent.h
+++ b/Source/SPTableContent.h
@@ -71,6 +71,9 @@
IBOutlet NSButton *filterTableFilterButton;
IBOutlet NSButton *filterTableClearButton;
IBOutlet SPTextView *filterTableWhereClause;
+ IBOutlet id filterTableNegateCheckbox;
+ IBOutlet id filterTableDistinctCheckbox;
+ IBOutlet NSMenuItem *filterTableGearLookAllFields;
MCPConnection *mySQLConnection;
@@ -82,7 +85,6 @@
NSString *selectedTable, *usedQuery;
SPDataStorage *tableValues;
NSMutableArray *dataColumns, *keys, *oldRow;
- NSMutableDictionary *filterTableData;
NSUInteger tableRowsCount, previousTableRowsCount;
NSString *compareType;
NSNumber *sortCol;
@@ -97,6 +99,12 @@
id contentFilterManager;
NSUInteger contentPage;
+ NSMutableDictionary *filterTableData;
+ BOOL filterTableNegate;
+ BOOL filterTableDistinct;
+ NSString *filterTableDefaultOperator;
+ NSString *lastEditedFilterTableValue;
+
BOOL sortColumnToRestoreIsAsc;
BOOL tableRowsSelectable;
NSString *sortColumnToRestore;
@@ -154,6 +162,11 @@
- (IBAction)tableFilterExecute:(id)sender;
- (IBAction)tableFilterClear:(id)sender;
- (IBAction)showTableFilter:(id)sender;
+- (IBAction)toggleNegateClause:(id)sender;
+- (IBAction)toggleDistinctSelect:(id)sender;
+- (IBAction)setDefaultOperator:(id)sender;
+- (IBAction)swapFilterTable:(id)sender;
+- (IBAction)toggleLookAllFieldsMode:(id)sender;
// Getter methods
- (NSArray *)currentResult;
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 153718f8..b63c6062 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -70,7 +70,11 @@
previousTableRowsCount = 0;
dataColumns = [[NSMutableArray alloc] init];
oldRow = [[NSMutableArray alloc] init];
+
filterTableData = [[NSMutableDictionary alloc] initWithCapacity:1];
+ filterTableNegate = NO;
+ filterTableDistinct = NO;
+ lastEditedFilterTableValue = nil;
selectedTable = nil;
sortCol = nil;
@@ -166,6 +170,11 @@
[paginationView setFrame:paginationViewFrame];
[contentViewPane addSubview:paginationView];
+ // Init Filter Table GUI
+ [filterTableDistinctCheckbox setState:(filterTableDistinct) ? NSOnState : NSOffState];
+ [filterTableNegateCheckbox setState:(filterTableNegate) ? NSOnState : NSOffState];
+ filterTableDefaultOperator = @"LIKE '%%%@%%'";
+
// Add observers for document task activity
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(startDocumentTaskForTab:)
@@ -2800,6 +2809,8 @@
- (IBAction)tableFilterClear:(id)sender
{
+ [filterTableView abortEditing];
+
for(NSNumber *col in [filterTableData allKeys])
[[filterTableData objectForKey:col] setObject:[NSMutableArray arrayWithObjects:@"", @"", @"", @"", @"", @"", @"", @"", @"", @"", nil] forKey:@"filter"];
@@ -2821,7 +2832,33 @@
[filterTableWhereClause setCompletionWasReinvokedAutomatically:NO];
[filterTableWhereClause insertText:@""];
[filterTableWhereClause didChangeText];
- [[NSApp keyWindow] makeFirstResponder:filterTableView];
+ [[tableDocumentInstance parentWindow] makeFirstResponder:filterTableView];
+}
+
+- (IBAction)toggleNegateClause:(id)sender
+{
+ filterTableNegate = !filterTableNegate;
+}
+
+- (IBAction)toggleDistinctSelect:(id)sender
+{
+ filterTableDistinct = !filterTableDistinct;
+}
+
+- (IBAction)setDefaultOperator:(id)sender
+{
+ NSLog(@"DEFAULT");
+}
+
+- (IBAction)swapFilterTable:(id)sender
+{
+ NSLog(@"SWAP");
+}
+
+- (IBAction)toggleLookAllFieldsMode:(id)sender
+{
+ NSLog(@"ddd %@", lastEditedFilterTableValue);
+ // [self tableFilterClear:nil];
}
#pragma mark -
@@ -3878,7 +3915,14 @@
- (void)controlTextDidChange:(NSNotification *)notification
{
if ([notification object] == filterTableView) {
- [self updateFilterTableClause:[[[[notification userInfo] objectForKey:@"NSFieldEditor"] textStorage] string]];
+
+ NSString *str = [[[[notification userInfo] objectForKey:@"NSFieldEditor"] textStorage] string];
+ if(str && [str length]) {
+ if(lastEditedFilterTableValue) [lastEditedFilterTableValue release];
+ lastEditedFilterTableValue = [[NSString stringWithString:str] retain];
+ }
+ [self updateFilterTableClause:lastEditedFilterTableValue];
+
}
}
/**
@@ -4034,7 +4078,6 @@
NSString *re1 = @"^\\s*(<|>|!?=)\\s*(.*?)\\s*$";
NSString *re2 = @"(?i)^\\s*(.*)\\s+(.*?)\\s*$";
- NSString *defaultOperator = @"LIKE '%%%@%%'";
NSCharacterSet *whiteSpaceCharSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
for(NSInteger i=0; i<numberOfRows; i++) {
@@ -4058,7 +4101,21 @@
NSString *fieldName = [[filterCellData objectForKey:@"name"] backtickQuotedString];
opRange = [filterCell rangeOfString:@"`@`"];
- if(opRange.length) {
+ if([filterCell isMatchedByRegex:@"^\\s*['\"]"]) {
+ if([filterTableDefaultOperator isMatchedByRegex:@"['\"]"]) {
+ NSArray *matches = [filterCell arrayOfCaptureComponentsMatchedByRegex:@"^\\s*(['\"])(.*)\\1\\s*$"];
+ if([matches count] && [matches = NSArrayObjectAtIndex(matches,0) count] == 3) {
+ [clause appendFormat:[NSString stringWithFormat:@"%%@ %@", filterTableDefaultOperator], fieldName, NSArrayObjectAtIndex(matches, 2)];
+ } else {
+ matches = [filterCell arrayOfCaptureComponentsMatchedByRegex:@"^\\s*(['\"])(.*)\\s*$"];
+ if([matches count] && [matches = NSArrayObjectAtIndex(matches,0) count] == 3)
+ [clause appendFormat:[NSString stringWithFormat:@"%%@ %@", filterTableDefaultOperator], fieldName, NSArrayObjectAtIndex(matches, 2)];
+ }
+ } else {
+ [clause appendFormat:[NSString stringWithFormat:@"%%@ %@", filterTableDefaultOperator], fieldName, filterCell];
+ }
+ }
+ else if(opRange.length) {
filterCell = [filterCell stringByReplacingOccurrencesOfString:@"`@`" withString:fieldName];
[clause appendString:[filterCell stringByReplacingOccurrencesOfString:@"`@`" withString:fieldName]];
}
@@ -4076,7 +4133,7 @@
[clause appendFormat:@"%@ %@ %@", fieldName, [NSArrayObjectAtIndex(matches, 1) uppercaseString], NSArrayObjectAtIndex(matches, 2)];
}
else {
- [clause appendFormat:[NSString stringWithFormat:@"%%@ %@", defaultOperator], fieldName, filterCell];
+ [clause appendFormat:[NSString stringWithFormat:@"%%@ %@", filterTableDefaultOperator], fieldName, filterCell];
}
numberOfValues++;
@@ -4135,6 +4192,7 @@
[dataColumns release];
[oldRow release];
[filterTableData release];
+ if(lastEditedFilterTableValue) [lastEditedFilterTableValue release];
if (selectedTable) [selectedTable release];
if (contentFilters) [contentFilters release];
if (numberOfDefaultFilters) [numberOfDefaultFilters release];