aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--English.lproj/DBView.xib53
-rw-r--r--TableContent.h5
-rw-r--r--TableContent.m9
3 files changed, 52 insertions, 15 deletions
diff --git a/English.lproj/DBView.xib b/English.lproj/DBView.xib
index 6a3f5332..c8102000 100644
--- a/English.lproj/DBView.xib
+++ b/English.lproj/DBView.xib
@@ -1,18 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">9F33</string>
- <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.34</string>
<string key="IBDocument.HIToolboxVersion">352.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="27"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="105205302">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="427689665">
@@ -35,7 +45,7 @@
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{780, 480}</string>
<object class="NSView" key="NSWindowView" id="579726586">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -963,6 +973,7 @@
</object>
<string key="NSFrame">{{1, 1}, {194, 396}}</string>
<reference key="NSSuperview" ref="233472824"/>
+ <reference key="NSNextKeyView" ref="251040077"/>
<reference key="NSDocView" ref="251040077"/>
<reference key="NSBGColor" ref="1024678221"/>
<int key="NScvFlags">4</int>
@@ -989,6 +1000,7 @@
</object>
<string key="NSFrameSize">{196, 398}</string>
<reference key="NSSuperview" ref="355288374"/>
+ <reference key="NSNextKeyView" ref="73685676"/>
<int key="NSsFlags">530</int>
<reference key="NSVScroller" ref="693168867"/>
<reference key="NSHScroller" ref="656188692"/>
@@ -1073,6 +1085,7 @@
</object>
<string key="NSFrame">{{1, 1}, {194, 123}}</string>
<reference key="NSSuperview" ref="298226231"/>
+ <reference key="NSNextKeyView" ref="347093764"/>
<reference key="NSDocView" ref="347093764"/>
<reference key="NSBGColor" ref="1024678221"/>
<int key="NScvFlags">4</int>
@@ -1099,6 +1112,7 @@
</object>
<string key="NSFrame">{{0, 407}, {196, 125}}</string>
<reference key="NSSuperview" ref="355288374"/>
+ <reference key="NSNextKeyView" ref="685057119"/>
<int key="NSsFlags">530</int>
<reference key="NSVScroller" ref="245346414"/>
<reference key="NSHScroller" ref="353686052"/>
@@ -1129,7 +1143,7 @@
<object class="NSTabViewItem" id="831053945">
<string key="NSIdentifier">source</string>
<object class="NSView" key="NSView" id="461236772">
- <reference key="NSNextResponder" ref="714795046"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1851,6 +1865,7 @@
</object>
<string key="NSFrame">{{1, 17}, {626, 282}}</string>
<reference key="NSSuperview" ref="22340145"/>
+ <reference key="NSNextKeyView" ref="715508012"/>
<reference key="NSDocView" ref="715508012"/>
<reference key="NSBGColor" ref="1024678221"/>
<int key="NScvFlags">4</int>
@@ -1883,6 +1898,7 @@
</object>
<string key="NSFrame">{{1, 0}, {626, 17}}</string>
<reference key="NSSuperview" ref="22340145"/>
+ <reference key="NSNextKeyView" ref="926883367"/>
<reference key="NSDocView" ref="926883367"/>
<reference key="NSBGColor" ref="1024678221"/>
<int key="NScvFlags">4</int>
@@ -1891,6 +1907,7 @@
</object>
<string key="NSFrame">{{-1, 24}, {628, 300}}</string>
<reference key="NSSuperview" ref="220777809"/>
+ <reference key="NSNextKeyView" ref="16936123"/>
<int key="NSsFlags">562</int>
<reference key="NSVScroller" ref="943144555"/>
<reference key="NSHScroller" ref="456666876"/>
@@ -2321,6 +2338,7 @@
</object>
<string key="NSFrame">{{1, 17}, {626, 138}}</string>
<reference key="NSSuperview" ref="376224367"/>
+ <reference key="NSNextKeyView" ref="584834515"/>
<reference key="NSDocView" ref="584834515"/>
<reference key="NSBGColor" ref="1024678221"/>
<int key="NScvFlags">4</int>
@@ -2353,6 +2371,7 @@
</object>
<string key="NSFrame">{{1, 0}, {626, 17}}</string>
<reference key="NSSuperview" ref="376224367"/>
+ <reference key="NSNextKeyView" ref="459548655"/>
<reference key="NSDocView" ref="459548655"/>
<reference key="NSBGColor" ref="1024678221"/>
<int key="NScvFlags">4</int>
@@ -2361,6 +2380,7 @@
</object>
<string key="NSFrame">{{-1, 22}, {628, 156}}</string>
<reference key="NSSuperview" ref="1063281455"/>
+ <reference key="NSNextKeyView" ref="794929378"/>
<int key="NSsFlags">562</int>
<reference key="NSVScroller" ref="1019209947"/>
<reference key="NSHScroller" ref="328951385"/>
@@ -2469,7 +2489,6 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {638, 544}}</string>
- <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Structure</string>
<reference key="NSColor" ref="62854682"/>
@@ -2478,7 +2497,7 @@
<object class="NSTabViewItem" id="624106058">
<string key="NSIdentifier">content</string>
<object class="NSView" key="NSView" id="1013108064">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder" ref="714795046"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -3069,6 +3088,7 @@
</object>
</object>
<string key="NSFrame">{{10, 7}, {638, 544}}</string>
+ <reference key="NSSuperview" ref="714795046"/>
</object>
<string key="NSLabel">Content</string>
<reference key="NSColor" ref="62854682"/>
@@ -3933,14 +3953,14 @@
<reference key="NSTabView" ref="714795046"/>
</object>
</object>
- <reference key="NSSelectedTabViewItem" ref="831053945"/>
+ <reference key="NSSelectedTabViewItem" ref="624106058"/>
<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="461236772"/>
+ <reference ref="1013108064"/>
</object>
</object>
</object>
@@ -3974,6 +3994,7 @@
</object>
</object>
<string key="NSFrameSize">{863, 550}</string>
+ <reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMinSize">{780, 502}</string>
@@ -11728,6 +11749,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<int key="connectionID">4683</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleFilterField:</string>
+ <reference key="source" ref="392169872"/>
+ <reference key="destination" ref="744029762"/>
+ </object>
+ <int key="connectionID">4685</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -19251,8 +19280,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
- <string>{{774, 505}, {863, 550}}</string>
- <string>{{774, 505}, {863, 550}}</string>
+ <string>{{299, 286}, {863, 550}}</string>
+ <string>{{299, 286}, {863, 550}}</string>
<reference ref="9"/>
<reference ref="9"/>
<string>{{62, 352}, {845, 504}}</string>
@@ -19665,7 +19694,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">4683</int>
+ <int key="maxID">4685</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -19877,6 +19906,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>setCompareTypes:</string>
<string>showAll:</string>
<string>stepLimitRows:</string>
+ <string>toggleFilterField:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -19893,6 +19923,7 @@ Y2hhbmdlIHRoZSBvcmRlcg</string>
<string>id</string>
<string>id</string>
<string>id</string>
+ <string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
diff --git a/TableContent.h b/TableContent.h
index 64a57060..54ad2481 100644
--- a/TableContent.h
+++ b/TableContent.h
@@ -78,6 +78,7 @@
- (IBAction)reloadTableValues:(id)sender;
- (IBAction)filterTable:(id)sender;
- (IBAction)showAll:(id)sender;
+- (IBAction)toggleFilterField:(id)sender;
//edit methods
- (IBAction)addRow:(id)sender;
@@ -131,8 +132,4 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
//textView delegate methods
- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector;
-//last but not least
-- (id)init;
-- (void)dealloc;
-
@end
diff --git a/TableContent.m b/TableContent.m
index e6ee519d..edf6a359 100644
--- a/TableContent.m
+++ b/TableContent.m
@@ -599,6 +599,15 @@
[countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]];
}
+/**
+ * Enables or disables the filter input field based on the selected filter type.
+ */
+- (IBAction)toggleFilterField:(id)sender
+{
+ // If the user is filtering for NULLs then disabled the filter field, otherwise enable it.
+ [argumentField setEnabled:(![[[compareField selectedItem] title] hasSuffix:@"NULL"])];
+}
+
//edit methods
- (IBAction)addRow:(id)sender