diff options
-rw-r--r-- | Interfaces/English.lproj/IndexesView.xib | 1573 | ||||
-rw-r--r-- | Source/SPArrayAdditions.m | 2 | ||||
-rw-r--r-- | Source/SPFileHandle.m | 2 | ||||
-rw-r--r-- | Source/SPIndexesController.h | 43 | ||||
-rw-r--r-- | Source/SPIndexesController.m | 588 | ||||
-rw-r--r-- | Source/SPSQLExporter.m | 2 | ||||
-rw-r--r-- | Source/SPTableStructure.m | 3 |
7 files changed, 1809 insertions, 404 deletions
diff --git a/Interfaces/English.lproj/IndexesView.xib b/Interfaces/English.lproj/IndexesView.xib index dc8f2e2d..98344fbb 100644 --- a/Interfaces/English.lproj/IndexesView.xib +++ b/Interfaces/English.lproj/IndexesView.xib @@ -7,15 +7,25 @@ <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">461.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">788</string> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.brandonwalkin.BWToolkit</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>788</string> + <string>1.2.5</string> + </object> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="3"/> + <integer value="55"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> + <string>com.brandonwalkin.BWToolkit</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> @@ -39,17 +49,17 @@ <string key="NSClassName">NSApplication</string> </object> <object class="NSWindowTemplate" id="880032408"> - <int key="NSWindowStyleMask">1</int> + <int key="NSWindowStyleMask">9</int> <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{512, 379}, {267, 139}}</string> + <string key="NSWindowRect">{{512, 244}, {267, 274}}</string> <int key="NSWTFlags">1886913536</int> <string key="NSWindowTitle">New Index</string> <string key="NSWindowClass">NSWindow</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="NSWindowContentMinSize">{213, 107}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMinSize">{267, 274}</string> <object class="NSView" key="NSWindowView" id="762677578"> <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -57,8 +67,8 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSPopUpButton" id="708230399"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{122, 98}, {128, 22}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{83, 233}, {167, 22}}</string> <reference key="NSSuperview" ref="762677578"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="431781347"> @@ -79,18 +89,18 @@ </object> <int key="NSPeriodicDelay">400</int> <int key="NSPeriodicInterval">75</int> - <object class="NSMenuItem" key="NSMenuItem" id="577529272"> + <object class="NSMenuItem" key="NSMenuItem" id="262306657"> <reference key="NSMenu" ref="71441725"/> - <string key="NSTitle">PRIMARY KEY</string> + <string key="NSTitle">INDEX</string> <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> <int key="NSState">1</int> - <object class="NSCustomResource" key="NSOnImage" id="163659607"> + <object class="NSCustomResource" key="NSOnImage" id="195240984"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSMenuCheckmark</string> </object> - <object class="NSCustomResource" key="NSMixedImage" id="144930260"> + <object class="NSCustomResource" key="NSMixedImage" id="81373676"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSMenuMixedState</string> </object> @@ -104,26 +114,15 @@ </object> <object class="NSMutableArray" key="NSMenuItems"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="577529272"/> - <object class="NSMenuItem" id="262306657"> - <reference key="NSMenu" ref="71441725"/> - <string key="NSTitle">INDEX</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="163659607"/> - <reference key="NSMixedImage" ref="144930260"/> - <string key="NSAction">_popUpItemAction:</string> - <reference key="NSTarget" ref="431781347"/> - </object> + <reference ref="262306657"/> <object class="NSMenuItem" id="453090810"> <reference key="NSMenu" ref="71441725"/> <string key="NSTitle">UNIQUE</string> <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="163659607"/> - <reference key="NSMixedImage" ref="144930260"/> + <reference key="NSOnImage" ref="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> <string key="NSAction">_popUpItemAction:</string> <reference key="NSTarget" ref="431781347"/> </object> @@ -133,8 +132,8 @@ <string key="NSKeyEquiv"/> <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="163659607"/> - <reference key="NSMixedImage" ref="144930260"/> + <reference key="NSOnImage" ref="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> <string key="NSAction">_popUpItemAction:</string> <reference key="NSTarget" ref="431781347"/> </object> @@ -148,8 +147,8 @@ </object> <object class="NSTextField" id="978293712"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{125, 76}, {122, 19}}</string> + <int key="NSvFlags">266</int> + <string key="NSFrame">{{86, 211}, {161, 19}}</string> <reference key="NSSuperview" ref="762677578"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1000744513"> @@ -182,8 +181,8 @@ </object> <object class="NSTextField" id="452572425"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{-3, 78}, {123, 14}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 213}, {64, 14}}</string> <reference key="NSSuperview" ref="762677578"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="568966163"> @@ -198,7 +197,7 @@ <string key="NSColorName">controlColor</string> <object class="NSColor" key="NSColor" id="1009303974"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> + <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> </object> </object> <object class="NSColor" key="NSTextColor" id="723855329"> @@ -211,8 +210,8 @@ </object> <object class="NSTextField" id="832689269"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{-3, 103}, {123, 14}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{17, 238}, {64, 14}}</string> <reference key="NSSuperview" ref="762677578"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="217993475"> @@ -225,121 +224,464 @@ <reference key="NSTextColor" ref="723855329"/> </object> </object> - <object class="NSComboBox" id="730968946"> + <object class="NSScrollView" id="561916229"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{125, 48}, {125, 22}}</string> - <reference key="NSSuperview" ref="762677578"/> - <bool key="NSEnabled">YES</bool> - <object class="NSComboBoxCell" key="NSCell" id="64392286"> - <int key="NSCellFlags">343014976</int> - <int key="NSCellFlags2">132096</int> - <object class="NSMutableString" key="NSContents" id="652718850"> - <characters key="NS.bytes"/> - </object> - <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="730968946"/> - <bool key="NSDrawsBackground">YES</bool> - <reference key="NSBackgroundColor" ref="253907032"/> - <reference key="NSTextColor" ref="723855329"/> - <int key="NSVisibleItemCount">5</int> - <bool key="NSHasVerticalScroller">YES</bool> - <bool key="NSCompletes">YES</bool> - <reference key="NSDelegate" ref="730968946"/> - <object class="NSComboTableView" key="NSTableView" id="602877304"> - <reference key="NSNextResponder"/> - <int key="NSvFlags">274</int> - <string key="NSFrameSize">{15, 0}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> - <bool key="NSEnabled">YES</bool> - <object class="NSMutableArray" key="NSTableColumns"> + <int key="NSvFlags">274</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSClipView" id="726923866"> + <reference key="NSNextResponder" ref="561916229"/> + <int key="NSvFlags">2304</int> + <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTableColumn"> - <integer value="0" key="NSIdentifier"/> - <double key="NSWidth">12</double> - <double key="NSMinWidth">10</double> - <double key="NSMaxWidth">1000</double> - <object class="NSTableHeaderCell" key="NSHeaderCell"> - <int key="NSCellFlags">75628032</int> - <int key="NSCellFlags2">0</int> - <reference key="NSContents" ref="652718850"/> - <object class="NSFont" key="NSSupport"> - <string key="NSName">LucidaGrande</string> - <double key="NSSize">12</double> - <int key="NSfFlags">16</int> + <object class="NSTableView" id="633969417"> + <reference key="NSNextResponder" ref="726923866"/> + <int key="NSvFlags">256</int> + <string key="NSFrameSize">{267, 80}</string> + <reference key="NSSuperview" ref="726923866"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTableHeaderView" key="NSHeaderView" id="1016340205"> + <reference key="NSNextResponder" ref="218049294"/> + <int key="NSvFlags">256</int> + <string key="NSFrameSize">{267, 17}</string> + <reference key="NSSuperview" ref="218049294"/> + <reference key="NSTableView" ref="633969417"/> + </object> + <object class="_NSCornerView" key="NSCornerView" id="310534340"> + <reference key="NSNextResponder" ref="561916229"/> + <int key="NSvFlags">-2147483392</int> + <string key="NSFrame">{{224, 0}, {16, 17}}</string> + <reference key="NSSuperview" ref="561916229"/> + </object> + <object class="NSMutableArray" key="NSTableColumns"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTableColumn" id="785937115"> + <string key="NSIdentifier">name</string> + <double key="NSWidth">264</double> + <double key="NSMinWidth">40</double> + <double key="NSMaxWidth">1000</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628096</int> + <int key="NSCellFlags2">2048</int> + <string key="NSContents">Field</string> + <reference key="NSSupport" ref="26"/> + <object class="NSColor" key="NSBackgroundColor" id="652562078"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes> + </object> + <object class="NSColor" key="NSTextColor" id="837168059"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">headerTextColor</string> + <reference key="NSColor" ref="771094286"/> + </object> + </object> + <object class="NSComboBoxCell" key="NSDataCell" id="996805300"> + <int key="NSCellFlags">70385217</int> + <int key="NSCellFlags2">272761856</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="633969417"/> + <reference key="NSBackgroundColor" ref="253907032"/> + <reference key="NSTextColor" ref="723855329"/> + <int key="NSVisibleItemCount">5</int> + <bool key="NSHasVerticalScroller">YES</bool> + <bool key="NSUsesDataSource">YES</bool> + <nil key="NSDataSource"/> + <object class="NSComboTableView" key="NSTableView" id="1069941899"> + <reference key="NSNextResponder"/> + <int key="NSvFlags">274</int> + <string key="NSFrameSize">{15, 0}</string> + <reference key="NSSuperview"/> + <reference key="NSWindow"/> + <bool key="NSEnabled">YES</bool> + <object class="NSMutableArray" key="NSTableColumns"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTableColumn"> + <integer value="0" key="NSIdentifier"/> + <double key="NSWidth">12</double> + <double key="NSMinWidth">10</double> + <double key="NSMaxWidth">1000</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628032</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents"/> + <object class="NSFont" key="NSSupport"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">12</double> + <int key="NSfFlags">16</int> + </object> + <object class="NSColor" key="NSBackgroundColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes> + </object> + <reference key="NSTextColor" ref="789483775"/> + </object> + <object class="NSTextFieldCell" key="NSDataCell"> + <int key="NSCellFlags">338820672</int> + <int key="NSCellFlags2">1024</int> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="1069941899"/> + <bool key="NSDrawsBackground">YES</bool> + <object class="NSColor" key="NSBackgroundColor" id="433719363"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlBackgroundColor</string> + <reference key="NSColor" ref="1009303974"/> + </object> + <reference key="NSTextColor" ref="723855329"/> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <reference key="NSTableView" ref="1069941899"/> + </object> + </object> + <double key="NSIntercellSpacingWidth">3</double> + <double key="NSIntercellSpacingHeight">2</double> + <reference key="NSBackgroundColor" ref="433719363"/> + <object class="NSColor" key="NSGridColor" id="850521285"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">gridColor</string> + <object class="NSColor" key="NSColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC41AA</bytes> + </object> + </object> + <double key="NSRowHeight">16</double> + <string key="NSAction">tableViewAction:</string> + <int key="NSTvFlags">-767524864</int> + <reference key="NSDelegate" ref="996805300"/> + <reference key="NSTarget" ref="996805300"/> + <int key="NSColumnAutoresizingStyle">1</int> + <int key="NSDraggingSourceMaskForLocal">15</int> + <int key="NSDraggingSourceMaskForNonLocal">0</int> + <bool key="NSAllowsTypeSelect">YES</bool> + <int key="NSTableViewDraggingDestinationStyle">0</int> + </object> + <bool key="NSButtonBordered">NO</bool> + </object> + <int key="NSResizingMask">1</int> + <bool key="NSIsResizeable">YES</bool> + <reference key="NSTableView" ref="633969417"/> </object> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes> + <object class="NSTableColumn" id="785090057"> + <string key="NSIdentifier">Size</string> + <double key="NSWidth">76</double> + <double key="NSMinWidth">40</double> + <double key="NSMaxWidth">1000</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628096</int> + <int key="NSCellFlags2">2048</int> + <string key="NSContents">Size</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSBackgroundColor" ref="652562078"/> + <reference key="NSTextColor" ref="837168059"/> + </object> + <object class="NSTextFieldCell" key="NSDataCell" id="305657856"> + <int key="NSCellFlags">337772096</int> + <int key="NSCellFlags2">133120</int> + <string key="NSContents">Text Cell</string> + <reference key="NSSupport" ref="26"/> + <string key="NSPlaceholderString">optional</string> + <reference key="NSControlView" ref="633969417"/> + <reference key="NSBackgroundColor" ref="433719363"/> + <reference key="NSTextColor" ref="723855329"/> + </object> + <bool key="NSIsEditable">YES</bool> + <reference key="NSTableView" ref="633969417"/> + <bool key="NSHidden">YES</bool> </object> - <reference key="NSTextColor" ref="789483775"/> </object> - <object class="NSTextFieldCell" key="NSDataCell"> - <int key="NSCellFlags">338820672</int> - <int key="NSCellFlags2">1024</int> - <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="602877304"/> - <bool key="NSDrawsBackground">YES</bool> - <object class="NSColor" key="NSBackgroundColor" id="433719363"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlBackgroundColor</string> - <reference key="NSColor" ref="1009303974"/> + <double key="NSIntercellSpacingWidth">3</double> + <double key="NSIntercellSpacingHeight">2</double> + <reference key="NSBackgroundColor" ref="789483775"/> + <reference key="NSGridColor" ref="850521285"/> + <double key="NSRowHeight">14</double> + <int key="NSTvFlags">46137344</int> + <reference key="NSDelegate"/> + <reference key="NSDataSource"/> + <int key="NSGridStyleMask">1</int> + <int key="NSColumnAutoresizingStyle">4</int> + <int key="NSDraggingSourceMaskForLocal">15</int> + <int key="NSDraggingSourceMaskForNonLocal">0</int> + <bool key="NSAllowsTypeSelect">NO</bool> + <int key="NSTableViewDraggingDestinationStyle">0</int> + </object> + </object> + <string key="NSFrame">{{1, 17}, {267, 80}}</string> + <reference key="NSSuperview" ref="561916229"/> + <reference key="NSNextKeyView" ref="633969417"/> + <reference key="NSDocView" ref="633969417"/> + <reference key="NSBGColor" ref="433719363"/> + <int key="NScvFlags">4</int> + </object> + <object class="NSScroller" id="181568637"> + <reference key="NSNextResponder" ref="561916229"/> + <int key="NSvFlags">-2147483392</int> + <string key="NSFrame">{{224, 17}, {15, 102}}</string> + <reference key="NSSuperview" ref="561916229"/> + <reference key="NSTarget" ref="561916229"/> + <string key="NSAction">_doScroller:</string> + <double key="NSPercent">0.80263155698776245</double> + </object> + <object class="NSScroller" id="673873503"> + <reference key="NSNextResponder" ref="561916229"/> + <int key="NSvFlags">-2147483392</int> + <string key="NSFrame">{{-100, -100}, {225, 11}}</string> + <reference key="NSSuperview" ref="561916229"/> + <int key="NSsFlags">257</int> + <reference key="NSTarget" ref="561916229"/> + <string key="NSAction">_doScroller:</string> + <double key="NSPercent">0.99557524919509888</double> + </object> + <object class="NSClipView" id="218049294"> + <reference key="NSNextResponder" ref="561916229"/> + <int key="NSvFlags">2304</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1016340205"/> + </object> + <string key="NSFrame">{{1, 0}, {267, 17}}</string> + <reference key="NSSuperview" ref="561916229"/> + <reference key="NSNextKeyView" ref="1016340205"/> + <reference key="NSDocView" ref="1016340205"/> + <reference key="NSBGColor" ref="433719363"/> + <int key="NScvFlags">4</int> + </object> + <reference ref="310534340"/> + </object> + <string key="NSFrame">{{-1, 97}, {269, 98}}</string> + <reference key="NSSuperview" ref="762677578"/> + <reference key="NSNextKeyView" ref="726923866"/> + <int key="NSsFlags">530</int> + <reference key="NSVScroller" ref="181568637"/> + <reference key="NSHScroller" ref="673873503"/> + <reference key="NSContentView" ref="726923866"/> + <reference key="NSHeaderClipView" ref="218049294"/> + <reference key="NSCornerView" ref="310534340"/> + <bytes key="NSScrollAmts">QSAAAEEgAABBgAAAQYAAAA</bytes> + </object> + <object class="NSCustomView" id="30022357"> + <reference key="NSNextResponder" ref="762677578"/> + <int key="NSvFlags">-2147483358</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSBox" id="197030792"> + <reference key="NSNextResponder" ref="30022357"/> + <int key="NSvFlags">34</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSView" id="361997881"> + <reference key="NSNextResponder" ref="197030792"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTextField" id="925790600"> + <reference key="NSNextResponder" ref="361997881"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{15, 16}, {78, 14}}</string> + <reference key="NSSuperview" ref="361997881"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="971022587"> + <int key="NSCellFlags">68288064</int> + <int key="NSCellFlags2">272761856</int> + <string key="NSContents">Storage Type:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="925790600"/> + <reference key="NSBackgroundColor" ref="224183994"/> + <reference key="NSTextColor" ref="723855329"/> + </object> + </object> + <object class="NSPopUpButton" id="645455211"> + <reference key="NSNextResponder" ref="361997881"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{95, 11}, {168, 22}}</string> + <reference key="NSSuperview" ref="361997881"/> + <bool key="NSEnabled">YES</bool> + <object class="NSPopUpButtonCell" key="NSCell" id="747441327"> + <int key="NSCellFlags">-2076049856</int> + <int key="NSCellFlags2">133120</int> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="645455211"/> + <int key="NSButtonFlags">109199615</int> + <int key="NSButtonFlags2">129</int> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + <object class="NSMenuItem" key="NSMenuItem" id="445820372"> + <reference key="NSMenu" ref="358986900"/> + <string key="NSTitle">Default</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <int key="NSState">1</int> + <reference key="NSOnImage" ref="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="747441327"/> + </object> + <bool key="NSMenuItemRespectAlignment">YES</bool> + <object class="NSMenu" key="NSMenu" id="358986900"> + <string key="NSTitle">OtherViews</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="445820372"/> + <object class="NSMenuItem" id="13091714"> + <reference key="NSMenu" ref="358986900"/> + <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="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="747441327"/> + </object> + <object class="NSMenuItem" id="488157807"> + <reference key="NSMenu" ref="358986900"/> + <string key="NSTitle">BTREE</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="747441327"/> + </object> + <object class="NSMenuItem" id="795464334"> + <reference key="NSMenu" ref="358986900"/> + <string key="NSTitle">HASH</string> + <string key="NSKeyEquiv"/> + <int key="NSKeyEquivModMask">1048576</int> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> + <string key="NSAction">_popUpItemAction:</string> + <reference key="NSTarget" ref="747441327"/> + </object> + </object> + <object class="NSFont" key="NSMenuFont" id="18667027"> + <string key="NSName">LucidaGrande</string> + <double key="NSSize">13</double> + <int key="NSfFlags">1044</int> + </object> + </object> + <int key="NSPreferredEdge">1</int> + <bool key="NSUsesItemFromMenu">YES</bool> + <bool key="NSAltersState">YES</bool> + <int key="NSArrowPosition">2</int> + </object> </object> - <reference key="NSTextColor" ref="723855329"/> </object> - <int key="NSResizingMask">3</int> - <bool key="NSIsResizeable">YES</bool> - <reference key="NSTableView" ref="602877304"/> + <string key="NSFrame">{{1, 1}, {278, 45}}</string> + <reference key="NSSuperview" ref="197030792"/> </object> </object> - <double key="NSIntercellSpacingWidth">3</double> - <double key="NSIntercellSpacingHeight">2</double> - <reference key="NSBackgroundColor" ref="433719363"/> - <object class="NSColor" key="NSGridColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">gridColor</string> - <object class="NSColor" key="NSColor"> + <string key="NSFrame">{{-5, -4}, {280, 47}}</string> + <reference key="NSSuperview" ref="30022357"/> + <string key="NSOffsets">{0, 0}</string> + <object class="NSTextFieldCell" key="NSTitleCell"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Box</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSBackgroundColor" ref="253907032"/> + <object class="NSColor" key="NSTextColor"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC41AA</bytes> + <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes> </object> </object> - <double key="NSRowHeight">16</double> - <string key="NSAction">tableViewAction:</string> - <int key="NSTvFlags">-767524864</int> - <reference key="NSDelegate" ref="64392286"/> - <reference key="NSDataSource" ref="64392286"/> - <reference key="NSTarget" ref="64392286"/> - <int key="NSColumnAutoresizingStyle">1</int> - <int key="NSDraggingSourceMaskForLocal">15</int> - <int key="NSDraggingSourceMaskForNonLocal">0</int> - <bool key="NSAllowsTypeSelect">YES</bool> - <int key="NSTableViewDraggingDestinationStyle">0</int> + <reference key="NSContentView" ref="361997881"/> + <int key="NSBorderType">1</int> + <int key="NSBoxType">0</int> + <int key="NSTitlePosition">0</int> + <bool key="NSTransparent">NO</bool> + </object> + <object class="NSButton" id="226972970"> + <reference key="NSNextResponder" ref="30022357"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{-83, 15}, {100, 18}}</string> + <reference key="NSSuperview" ref="30022357"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="708153532"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="226972970"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSSwitch</string> + </object> + <object class="NSButtonImageSource" key="NSAlternateImage"> + <string key="NSImageName">NSSwitch</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> </object> </object> + <string key="NSFrame">{{-2, -4}, {272, 41}}</string> + <reference key="NSSuperview" ref="762677578"/> + <string key="NSClassName">NSView</string> </object> - <object class="NSTextField" id="371013460"> + <object class="NSButton" id="1003402112"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{-3, 52}, {123, 14}}</string> + <int key="NSvFlags">292</int> + <string key="NSFrame">{{0, 40}, {29, 26}}</string> <reference key="NSSuperview" ref="762677578"/> <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="50291809"> + <object class="NSButtonCell" key="NSCell" id="782137189"> <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">71303168</int> - <string key="NSContents">Indexed Columns:</string> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="18667027"/> + <reference key="NSControlView" ref="1003402112"/> + <int key="NSButtonFlags">-1195491073</int> + <int key="NSButtonFlags2">402653253</int> + <reference key="NSAlternateImage" ref="18667027"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent">a</string> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <object class="NSButton" id="928710921"> + <reference key="NSNextResponder" ref="762677578"/> + <int key="NSvFlags">292</int> + <string key="NSFrame">{{24, 41}, {214, 22}}</string> + <reference key="NSSuperview" ref="762677578"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="958218934"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Advanced</string> <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="371013460"/> - <reference key="NSBackgroundColor" ref="224183994"/> - <reference key="NSTextColor" ref="723855329"/> + <reference key="NSControlView" ref="928710921"/> + <int key="NSButtonFlags">-2046410497</int> + <int key="NSButtonFlags2">1</int> + <object class="NSFont" key="NSAlternateImage"> + <string key="NSName">LucidaGrande-Bold</string> + <double key="NSSize">11</double> + <int key="NSfFlags">16</int> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> </object> </object> <object class="NSButton" id="587008277"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{152, 13}, {100, 28}}</string> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{132, 13}, {100, 28}}</string> <reference key="NSSuperview" ref="762677578"/> <int key="NSTag">1</int> <bool key="NSEnabled">YES</bool> @@ -364,8 +706,8 @@ </object> <object class="NSButton" id="948801180"> <reference key="NSNextResponder" ref="762677578"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{54, 13}, {100, 28}}</string> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{34, 13}, {100, 28}}</string> <reference key="NSSuperview" ref="762677578"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="758521208"> @@ -383,13 +725,88 @@ <int key="NSPeriodicInterval">25</int> </object> </object> + <object class="BWAnchoredButtonBar" id="797179406"> + <reference key="NSNextResponder" ref="762677578"/> + <int key="NSvFlags">290</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="BWAnchoredButton" id="151970696"> + <reference key="NSNextResponder" ref="797179406"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{1, 0}, {32, 24}}</string> + <reference key="NSSuperview" ref="797179406"/> + <bool key="NSEnabled">YES</bool> + <object class="BWAnchoredButtonCell" key="NSCell" id="78847401"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="151970696"/> + <int key="NSButtonFlags">-2033958657</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSAddTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="BWAnchoredButton" id="446458161"> + <reference key="NSNextResponder" ref="797179406"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{32, 0}, {32, 24}}</string> + <reference key="NSSuperview" ref="797179406"/> + <bool key="NSEnabled">YES</bool> + <object class="BWAnchoredButtonCell" key="NSCell" id="88287488"> + <int key="NSCellFlags">604110336</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="446458161"/> + <int key="NSButtonFlags">-2033434369</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSRemoveTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + </object> + <string key="NSFrame">{{-2, 74}, {270, 24}}</string> + <reference key="NSSuperview" ref="762677578"/> + <bool key="BWABBIsResizable">NO</bool> + <bool key="BWABBIsAtBottom">NO</bool> + <bool key="BWABBHandleIsRightAligned">NO</bool> + <int key="BWABBSelectedIndex">2</int> + </object> </object> - <string key="NSFrameSize">{267, 139}</string> + <string key="NSFrameSize">{267, 274}</string> <reference key="NSSuperview"/> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> - <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMinSize">{267, 296}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + </object> + <object class="NSMenu" id="644710844"> + <string key="NSTitle"/> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="373410164"> + <reference key="NSMenu" ref="644710844"/> + <string key="NSTitle">Remove Field</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="195240984"/> + <reference key="NSMixedImage" ref="81373676"/> + </object> + </object> </object> </object> <object class="IBObjectContainer" key="IBDocument.Objects"> @@ -437,51 +854,211 @@ </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">indexedColumnsComboBox</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="730968946"/> + <string key="label">delegate</string> + <reference key="source" ref="978293712"/> + <reference key="destination" ref="1001"/> </object> - <int key="connectionID">32</int> + <int key="connectionID">35</int> </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> <string key="label">closeSheet:</string> <reference key="source" ref="1001"/> - <reference key="destination" ref="948801180"/> + <reference key="destination" ref="587008277"/> </object> - <int key="connectionID">33</int> + <int key="connectionID">84</int> </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> <string key="label">closeSheet:</string> <reference key="source" ref="1001"/> + <reference key="destination" ref="948801180"/> + </object> + <int key="connectionID">85</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexAdvancedOptionsViewButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="1003402112"/> + </object> + <int key="connectionID">94</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexAdvancedOptionsViewLabelButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="928710921"/> + </object> + <int key="connectionID">95</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexedColumnsScrollView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="561916229"/> + </object> + <int key="connectionID">96</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexedColumnsTableView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="633969417"/> + </object> + <int key="connectionID">97</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">addIndexButton</string> + <reference key="source" ref="1001"/> <reference key="destination" ref="587008277"/> </object> - <int key="connectionID">34</int> + <int key="connectionID">98</int> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">delegate</string> - <reference key="source" ref="978293712"/> + <string key="label">indexAdvancedOptionsView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="30022357"/> + </object> + <int key="connectionID">99</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAdvancedIndexOptionsView:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="1003402112"/> + </object> + <int key="connectionID">100</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAdvancedIndexOptionsView:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="928710921"/> + </object> + <int key="connectionID">101</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexNameLabel</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="452572425"/> + </object> + <int key="connectionID">103</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexTypeLabel</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="832689269"/> + </object> + <int key="connectionID">104</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexSizeTableColumn</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="785090057"/> + </object> + <int key="connectionID">112</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">addIndexedColumnButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="151970696"/> + </object> + <int key="connectionID">113</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">removeIndexedColumnButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="446458161"/> + </object> + <int key="connectionID">114</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">indexStorageTypePopUpButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="645455211"/> + </object> + <int key="connectionID">115</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">addIndexedField:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="151970696"/> + </object> + <int key="connectionID">118</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">removeIndexedField:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="446458161"/> + </object> + <int key="connectionID">119</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">dataSource</string> + <reference key="source" ref="633969417"/> <reference key="destination" ref="1001"/> </object> - <int key="connectionID">35</int> + <int key="connectionID">120</int> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> <string key="label">delegate</string> - <reference key="source" ref="730968946"/> + <reference key="source" ref="633969417"/> <reference key="destination" ref="1001"/> </object> - <int key="connectionID">36</int> + <int key="connectionID">121</int> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">addIndexButton</string> + <string key="label">dataSource</string> + <reference key="source" ref="996805300"/> + <reference key="destination" ref="1001"/> + </object> + <int key="connectionID">122</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">removeIndexedField:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="373410164"/> + </object> + <int key="connectionID">127</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">menu</string> + <reference key="source" ref="633969417"/> + <reference key="destination" ref="644710844"/> + </object> + <int key="connectionID">128</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">confirmAddIndexButton</string> <reference key="source" ref="1001"/> <reference key="destination" ref="587008277"/> </object> - <int key="connectionID">37</int> + <int key="connectionID">130</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">anchoredButtonBar</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="797179406"/> + </object> + <int key="connectionID">131</int> </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> @@ -526,27 +1103,21 @@ <reference key="object" ref="762677578"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="371013460"/> <reference ref="832689269"/> <reference ref="452572425"/> - <reference ref="587008277"/> - <reference ref="730968946"/> <reference ref="978293712"/> <reference ref="708230399"/> + <reference ref="30022357"/> + <reference ref="1003402112"/> + <reference ref="587008277"/> <reference ref="948801180"/> + <reference ref="928710921"/> + <reference ref="561916229"/> + <reference ref="797179406"/> </object> <reference key="parent" ref="880032408"/> </object> <object class="IBObjectRecord"> - <int key="objectID">5</int> - <reference key="object" ref="371013460"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="50291809"/> - </object> - <reference key="parent" ref="762677578"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">6</int> <reference key="object" ref="832689269"/> <object class="NSMutableArray" key="children"> @@ -565,33 +1136,6 @@ <reference key="parent" ref="762677578"/> </object> <object class="IBObjectRecord"> - <int key="objectID">8</int> - <reference key="object" ref="948801180"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="758521208"/> - </object> - <reference key="parent" ref="762677578"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">9</int> - <reference key="object" ref="587008277"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="289434200"/> - </object> - <reference key="parent" ref="762677578"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">10</int> - <reference key="object" ref="730968946"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="64392286"/> - </object> - <reference key="parent" ref="762677578"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">11</int> <reference key="object" ref="978293712"/> <object class="NSMutableArray" key="children"> @@ -623,24 +1167,13 @@ <reference key="object" ref="71441725"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="577529272"/> - <reference ref="262306657"/> <reference ref="453090810"/> <reference ref="71932948"/> + <reference ref="262306657"/> </object> <reference key="parent" ref="431781347"/> </object> <object class="IBObjectRecord"> - <int key="objectID">15</int> - <reference key="object" ref="577529272"/> - <reference key="parent" ref="71441725"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">16</int> - <reference key="object" ref="262306657"/> - <reference key="parent" ref="71441725"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">17</int> <reference key="object" ref="453090810"/> <reference key="parent" ref="71441725"/> @@ -656,34 +1189,292 @@ <reference key="parent" ref="978293712"/> </object> <object class="IBObjectRecord"> - <int key="objectID">20</int> - <reference key="object" ref="64392286"/> - <reference key="parent" ref="730968946"/> + <int key="objectID">23</int> + <reference key="object" ref="568966163"/> + <reference key="parent" ref="452572425"/> </object> <object class="IBObjectRecord"> - <int key="objectID">21</int> - <reference key="object" ref="289434200"/> - <reference key="parent" ref="587008277"/> + <int key="objectID">24</int> + <reference key="object" ref="217993475"/> + <reference key="parent" ref="832689269"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">52</int> + <reference key="object" ref="561916229"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="181568637"/> + <reference ref="673873503"/> + <reference ref="633969417"/> + <reference ref="1016340205"/> + </object> + <reference key="parent" ref="762677578"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">53</int> + <reference key="object" ref="181568637"/> + <reference key="parent" ref="561916229"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">54</int> + <reference key="object" ref="673873503"/> + <reference key="parent" ref="561916229"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">55</int> + <reference key="object" ref="633969417"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="785937115"/> + <reference ref="785090057"/> + </object> + <reference key="parent" ref="561916229"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">56</int> + <reference key="object" ref="1016340205"/> + <reference key="parent" ref="561916229"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">57</int> + <reference key="object" ref="785937115"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="996805300"/> + </object> + <reference key="parent" ref="633969417"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">58</int> + <reference key="object" ref="785090057"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="305657856"/> + </object> + <reference key="parent" ref="633969417"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">59</int> + <reference key="object" ref="305657856"/> + <reference key="parent" ref="785090057"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">61</int> + <reference key="object" ref="996805300"/> + <reference key="parent" ref="785937115"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">62</int> + <reference key="object" ref="30022357"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="197030792"/> + <reference ref="226972970"/> + </object> + <reference key="parent" ref="762677578"/> + <string key="objectName">Advanced View for INSERT</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">63</int> + <reference key="object" ref="1003402112"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="782137189"/> + </object> + <reference key="parent" ref="762677578"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">66</int> + <reference key="object" ref="782137189"/> + <reference key="parent" ref="1003402112"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">67</int> + <reference key="object" ref="197030792"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="925790600"/> + <reference ref="645455211"/> + </object> + <reference key="parent" ref="30022357"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">68</int> + <reference key="object" ref="226972970"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="708153532"/> + </object> + <reference key="parent" ref="30022357"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">69</int> + <reference key="object" ref="708153532"/> + <reference key="parent" ref="226972970"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">64</int> + <reference key="object" ref="928710921"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="958218934"/> + </object> + <reference key="parent" ref="762677578"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">65</int> + <reference key="object" ref="958218934"/> + <reference key="parent" ref="928710921"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">80</int> + <reference key="object" ref="587008277"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="289434200"/> + </object> + <reference key="parent" ref="762677578"/> </object> <object class="IBObjectRecord"> - <int key="objectID">22</int> + <int key="objectID">81</int> + <reference key="object" ref="948801180"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="758521208"/> + </object> + <reference key="parent" ref="762677578"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">82</int> <reference key="object" ref="758521208"/> <reference key="parent" ref="948801180"/> </object> <object class="IBObjectRecord"> - <int key="objectID">23</int> - <reference key="object" ref="568966163"/> - <reference key="parent" ref="452572425"/> + <int key="objectID">83</int> + <reference key="object" ref="289434200"/> + <reference key="parent" ref="587008277"/> </object> <object class="IBObjectRecord"> - <int key="objectID">24</int> - <reference key="object" ref="217993475"/> - <reference key="parent" ref="832689269"/> + <int key="objectID">92</int> + <reference key="object" ref="925790600"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="971022587"/> + </object> + <reference key="parent" ref="197030792"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">93</int> + <reference key="object" ref="971022587"/> + <reference key="parent" ref="925790600"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">86</int> + <reference key="object" ref="645455211"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="747441327"/> + </object> + <reference key="parent" ref="197030792"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">87</int> + <reference key="object" ref="747441327"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="358986900"/> + </object> + <reference key="parent" ref="645455211"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">88</int> + <reference key="object" ref="358986900"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="445820372"/> + <reference ref="488157807"/> + <reference ref="795464334"/> + <reference ref="13091714"/> + </object> + <reference key="parent" ref="747441327"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">89</int> + <reference key="object" ref="445820372"/> + <reference key="parent" ref="358986900"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">90</int> + <reference key="object" ref="488157807"/> + <reference key="parent" ref="358986900"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">91</int> + <reference key="object" ref="795464334"/> + <reference key="parent" ref="358986900"/> </object> <object class="IBObjectRecord"> - <int key="objectID">25</int> - <reference key="object" ref="50291809"/> - <reference key="parent" ref="371013460"/> + <int key="objectID">107</int> + <reference key="object" ref="797179406"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="151970696"/> + <reference ref="446458161"/> + </object> + <reference key="parent" ref="762677578"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">108</int> + <reference key="object" ref="151970696"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="78847401"/> + </object> + <reference key="parent" ref="797179406"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">109</int> + <reference key="object" ref="78847401"/> + <reference key="parent" ref="151970696"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">110</int> + <reference key="object" ref="446458161"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="88287488"/> + </object> + <reference key="parent" ref="797179406"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">111</int> + <reference key="object" ref="88287488"/> + <reference key="parent" ref="446458161"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">123</int> + <reference key="object" ref="644710844"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="373410164"/> + </object> + <reference key="parent" ref="0"/> + <string key="objectName">Context Menu</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">124</int> + <reference key="object" ref="373410164"/> + <reference key="parent" ref="644710844"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">16</int> + <reference key="object" ref="262306657"/> + <reference key="parent" ref="71441725"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">129</int> + <reference key="object" ref="13091714"/> + <reference key="parent" ref="358986900"/> </object> </object> </object> @@ -692,21 +1483,27 @@ <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>-3.IBPluginDependency</string> - <string>10.IBAttributePlaceholdersKey</string> - <string>10.IBPluginDependency</string> - <string>10.ImportedFromIB2</string> + <string>107.IBPluginDependency</string> + <string>108.IBAttributePlaceholdersKey</string> + <string>108.IBPluginDependency</string> + <string>109.IBPluginDependency</string> <string>11.IBAttributePlaceholdersKey</string> <string>11.IBPluginDependency</string> <string>11.ImportedFromIB2</string> + <string>110.IBAttributePlaceholdersKey</string> + <string>110.IBPluginDependency</string> + <string>111.IBPluginDependency</string> <string>12.IBAttributePlaceholdersKey</string> <string>12.IBPluginDependency</string> <string>12.ImportedFromIB2</string> + <string>123.IBEditorWindowLastContentRect</string> + <string>123.IBPluginDependency</string> + <string>124.IBPluginDependency</string> + <string>129.IBPluginDependency</string> <string>13.IBPluginDependency</string> <string>14.IBEditorWindowLastContentRect</string> <string>14.IBPluginDependency</string> <string>14.ImportedFromIB2</string> - <string>15.IBPluginDependency</string> - <string>15.ImportedFromIB2</string> <string>16.IBPluginDependency</string> <string>16.ImportedFromIB2</string> <string>17.IBPluginDependency</string> @@ -714,12 +1511,8 @@ <string>18.IBPluginDependency</string> <string>18.ImportedFromIB2</string> <string>19.IBPluginDependency</string> - <string>20.IBPluginDependency</string> - <string>21.IBPluginDependency</string> - <string>22.IBPluginDependency</string> <string>23.IBPluginDependency</string> <string>24.IBPluginDependency</string> - <string>25.IBPluginDependency</string> <string>3.IBEditorWindowLastContentRect</string> <string>3.IBPluginDependency</string> <string>3.IBWindowTemplateEditedContentRect</string> @@ -730,30 +1523,60 @@ <string>3.windowTemplate.minSize</string> <string>4.IBPluginDependency</string> <string>4.ImportedFromIB2</string> - <string>5.IBPluginDependency</string> - <string>5.ImportedFromIB2</string> + <string>52.IBPluginDependency</string> + <string>53.IBPluginDependency</string> + <string>54.IBPluginDependency</string> + <string>55.IBPluginDependency</string> + <string>56.IBPluginDependency</string> + <string>57.IBPluginDependency</string> + <string>58.IBPluginDependency</string> + <string>59.IBPluginDependency</string> <string>6.IBPluginDependency</string> <string>6.ImportedFromIB2</string> + <string>61.IBPluginDependency</string> + <string>62.IBEditorWindowLastContentRect</string> + <string>62.IBPluginDependency</string> + <string>63.IBAttributePlaceholdersKey</string> + <string>63.IBPluginDependency</string> + <string>64.IBAttributePlaceholdersKey</string> + <string>64.IBPluginDependency</string> + <string>65.IBPluginDependency</string> + <string>66.IBPluginDependency</string> + <string>67.IBPluginDependency</string> + <string>68.IBPluginDependency</string> + <string>69.IBPluginDependency</string> <string>7.IBPluginDependency</string> <string>7.ImportedFromIB2</string> - <string>8.IBPluginDependency</string> - <string>8.ImportedFromIB2</string> - <string>9.IBPluginDependency</string> - <string>9.ImportedFromIB2</string> + <string>80.IBPluginDependency</string> + <string>80.ImportedFromIB2</string> + <string>81.IBPluginDependency</string> + <string>81.ImportedFromIB2</string> + <string>82.IBPluginDependency</string> + <string>83.IBPluginDependency</string> + <string>86.IBPluginDependency</string> + <string>87.IBPluginDependency</string> + <string>88.IBEditorWindowLastContentRect</string> + <string>88.IBPluginDependency</string> + <string>89.IBPluginDependency</string> + <string>90.IBPluginDependency</string> + <string>91.IBPluginDependency</string> + <string>92.IBPluginDependency</string> + <string>93.IBPluginDependency</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.brandonwalkin.BWToolkit</string> <object class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> <object class="IBToolTipAttribute" key="NS.object.0"> <string key="name">ToolTip</string> - <reference key="object" ref="730968946"/> - <string key="toolTip">Choose the column(s) to be indexed (enter multiple columns comma separated)</string> + <reference key="object" ref="151970696"/> + <string key="toolTip">Add indexed field</string> </object> </object> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> + <string>com.brandonwalkin.BWToolkit</string> + <string>com.brandonwalkin.BWToolkit</string> <object class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> <object class="IBToolTipAttribute" key="NS.object.0"> @@ -768,51 +1591,102 @@ <string key="NS.key.0">ToolTip</string> <object class="IBToolTipAttribute" key="NS.object.0"> <string key="name">ToolTip</string> + <reference key="object" ref="446458161"/> + <string key="toolTip">Remove indexed field</string> + </object> + </object> + <string>com.brandonwalkin.BWToolkit</string> + <string>com.brandonwalkin.BWToolkit</string> + <object class="NSMutableDictionary"> + <string key="NS.key.0">ToolTip</string> + <object class="IBToolTipAttribute" key="NS.object.0"> + <string key="name">ToolTip</string> <reference key="object" ref="708230399"/> <string key="toolTip">Choose the type of the index</string> </object> </object> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> + <string>{{663, 479}, {142, 23}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{736, 413}, {131, 71}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> + <string>{{631, 783}, {167, 54}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{695, 411}, {267, 274}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{644, 219}, {267, 139}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{644, 219}, {267, 139}}</string> + <string>{{695, 411}, {267, 274}}</string> <integer value="1"/> <integer value="0"/> <integer value="1"/> <string>{3.40282e+38, 3.40282e+38}</string> - <string>{213, 107}</string> + <string>{267, 274}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> + <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.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{63, 565}, {360, 157}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <object class="NSMutableDictionary"> + <string key="NS.key.0">ToolTip</string> + <object class="IBToolTipAttribute" key="NS.object.0"> + <string key="name">ToolTip</string> + <reference key="object" ref="1003402112"/> + <string key="toolTip">Advanced index settings</string> + </object> + </object> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <object class="NSMutableDictionary"> + <string key="NS.key.0">ToolTip</string> + <object class="IBToolTipAttribute" key="NS.object.0"> + <string key="name">ToolTip</string> + <reference key="object" ref="928710921"/> + <string key="toolTip">Advanced index settings</string> + </object> + </object> + <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.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> + <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>{{772, 286}, {168, 64}}</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> </object> </object> <object class="NSMutableDictionary" key="unlocalizedProperties"> @@ -831,7 +1705,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">51</int> + <int key="maxID">131</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -1983,9 +2857,12 @@ <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>addIndex:</string> + <string>addIndexedField:</string> <string>chooseIndexType:</string> <string>closeSheet:</string> <string>removeIndex:</string> + <string>removeIndexedField:</string> + <string>toggleAdvancedIndexOptionsView:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -1993,6 +2870,9 @@ <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"> @@ -2000,9 +2880,12 @@ <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>addIndex:</string> + <string>addIndexedField:</string> <string>chooseIndexType:</string> <string>closeSheet:</string> <string>removeIndex:</string> + <string>removeIndexedField:</string> + <string>toggleAdvancedIndexOptionsView:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -2011,6 +2894,10 @@ <string key="candidateClassName">id</string> </object> <object class="IBActionInfo"> + <string key="name">addIndexedField:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> <string key="name">chooseIndexType:</string> <string key="candidateClassName">id</string> </object> @@ -2022,6 +2909,14 @@ <string key="name">removeIndex:</string> <string key="candidateClassName">id</string> </object> + <object class="IBActionInfo"> + <string key="name">removeIndexedField:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> + <string key="name">toggleAdvancedIndexOptionsView:</string> + <string key="candidateClassName">id</string> + </object> </object> </object> <object class="NSMutableDictionary" key="outlets"> @@ -2029,12 +2924,24 @@ <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>addIndexButton</string> + <string>addIndexedColumnButton</string> + <string>anchoredButtonBar</string> + <string>confirmAddIndexButton</string> <string>dbDocument</string> + <string>indexAdvancedOptionsView</string> + <string>indexAdvancedOptionsViewButton</string> + <string>indexAdvancedOptionsViewLabelButton</string> + <string>indexNameLabel</string> <string>indexNameTextField</string> + <string>indexSizeTableColumn</string> + <string>indexStorageTypePopUpButton</string> + <string>indexTypeLabel</string> <string>indexTypePopUpButton</string> - <string>indexedColumnsComboBox</string> + <string>indexedColumnsScrollView</string> + <string>indexedColumnsTableView</string> <string>indexesTableView</string> <string>removeIndexButton</string> + <string>removeIndexedColumnButton</string> <string>tableData</string> <string>tableStructure</string> <string>tablesList</string> @@ -2042,11 +2949,23 @@ <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSButton</string> + <string>NSButton</string> + <string>BWAnchoredButtonBar</string> + <string>NSButton</string> <string>SPDatabaseDocument</string> + <string>NSView</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSTableColumn</string> + <string>NSPopUpButton</string> <string>NSTextField</string> <string>NSPopUpButton</string> - <string>NSComboBox</string> + <string>NSScrollView</string> <string>NSTableView</string> + <string>NSTableView</string> + <string>NSButton</string> <string>NSButton</string> <string>SPTableData</string> <string>SPTableStructure</string> @@ -2058,12 +2977,24 @@ <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> <string>addIndexButton</string> + <string>addIndexedColumnButton</string> + <string>anchoredButtonBar</string> + <string>confirmAddIndexButton</string> <string>dbDocument</string> + <string>indexAdvancedOptionsView</string> + <string>indexAdvancedOptionsViewButton</string> + <string>indexAdvancedOptionsViewLabelButton</string> + <string>indexNameLabel</string> <string>indexNameTextField</string> + <string>indexSizeTableColumn</string> + <string>indexStorageTypePopUpButton</string> + <string>indexTypeLabel</string> <string>indexTypePopUpButton</string> - <string>indexedColumnsComboBox</string> + <string>indexedColumnsScrollView</string> + <string>indexedColumnsTableView</string> <string>indexesTableView</string> <string>removeIndexButton</string> + <string>removeIndexedColumnButton</string> <string>tableData</string> <string>tableStructure</string> <string>tablesList</string> @@ -2075,20 +3006,64 @@ <string key="candidateClassName">NSButton</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">addIndexedColumnButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">anchoredButtonBar</string> + <string key="candidateClassName">BWAnchoredButtonBar</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">confirmAddIndexButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">dbDocument</string> <string key="candidateClassName">SPDatabaseDocument</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">indexAdvancedOptionsView</string> + <string key="candidateClassName">NSView</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">indexAdvancedOptionsViewButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">indexAdvancedOptionsViewLabelButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">indexNameLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">indexNameTextField</string> <string key="candidateClassName">NSTextField</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">indexSizeTableColumn</string> + <string key="candidateClassName">NSTableColumn</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">indexStorageTypePopUpButton</string> + <string key="candidateClassName">NSPopUpButton</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">indexTypeLabel</string> + <string key="candidateClassName">NSTextField</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">indexTypePopUpButton</string> <string key="candidateClassName">NSPopUpButton</string> </object> <object class="IBToOneOutletInfo"> - <string key="name">indexedColumnsComboBox</string> - <string key="candidateClassName">NSComboBox</string> + <string key="name">indexedColumnsScrollView</string> + <string key="candidateClassName">NSScrollView</string> + </object> + <object class="IBToOneOutletInfo"> + <string key="name">indexedColumnsTableView</string> + <string key="candidateClassName">NSTableView</string> </object> <object class="IBToOneOutletInfo"> <string key="name">indexesTableView</string> @@ -2099,6 +3074,10 @@ <string key="candidateClassName">NSButton</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">removeIndexedColumnButton</string> + <string key="candidateClassName">NSButton</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">tableData</string> <string key="candidateClassName">SPTableData</string> </object> @@ -2171,6 +3150,7 @@ <string>reloadTable:</string> <string>removeField:</string> <string>resetAutoIncrement:</string> + <string>showOptimizedFieldType:</string> <string>unhideIndexesView:</string> </object> <object class="NSMutableArray" key="dict.values"> @@ -2183,6 +3163,7 @@ <string>id</string> <string>id</string> <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="actionInfosByName"> @@ -2196,6 +3177,7 @@ <string>reloadTable:</string> <string>removeField:</string> <string>resetAutoIncrement:</string> + <string>showOptimizedFieldType:</string> <string>unhideIndexesView:</string> </object> <object class="NSMutableArray" key="dict.values"> @@ -2229,6 +3211,10 @@ <string key="candidateClassName">id</string> </object> <object class="IBActionInfo"> + <string key="name">showOptimizedFieldType:</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBActionInfo"> <string key="name">unhideIndexesView:</string> <string key="candidateClassName">id</string> </object> @@ -2242,7 +3228,9 @@ <string>addIndexButton</string> <string>chooseKeyButton</string> <string>copyFieldButton</string> + <string>databaseDataInstance</string> <string>editTableButton</string> + <string>encodingPopupCell</string> <string>extendedTableInfoInstance</string> <string>indexesController</string> <string>indexesShowButton</string> @@ -2272,6 +3260,8 @@ <string>id</string> <string>id</string> <string>id</string> + <string>id</string> + <string>id</string> <string>NSButton</string> <string>id</string> <string>id</string> @@ -2299,7 +3289,9 @@ <string>addIndexButton</string> <string>chooseKeyButton</string> <string>copyFieldButton</string> + <string>databaseDataInstance</string> <string>editTableButton</string> + <string>encodingPopupCell</string> <string>extendedTableInfoInstance</string> <string>indexesController</string> <string>indexesShowButton</string> @@ -2339,10 +3331,18 @@ <string key="candidateClassName">id</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">databaseDataInstance</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">editTableButton</string> <string key="candidateClassName">id</string> </object> <object class="IBToOneOutletInfo"> + <string key="name">encodingPopupCell</string> + <string key="candidateClassName">id</string> + </object> + <object class="IBToOneOutletInfo"> <string key="name">extendedTableInfoInstance</string> <string key="candidateClassName">id</string> </object> @@ -2841,6 +3841,30 @@ <object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBPartialClassDescription"> + <string key="className">BWAnchoredButton</string> + <string key="superclassName">NSButton</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">BWToolkitFramework.framework/Headers/BWAnchoredButton.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">BWAnchoredButtonBar</string> + <string key="superclassName">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">BWToolkitFramework.framework/Headers/BWAnchoredButtonBar.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">BWAnchoredButtonCell</string> + <string key="superclassName">NSButtonCell</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">BWToolkitFramework.framework/Headers/BWAnchoredButtonCell.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSActionCell</string> <string key="superclassName">NSCell</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -2931,14 +3955,6 @@ </object> </object> <object class="IBPartialClassDescription"> - <string key="className">NSComboBox</string> - <string key="superclassName">NSTextField</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBFrameworkSource</string> - <string key="minorKey">AppKit.framework/Headers/NSComboBox.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> <string key="className">NSComboBoxCell</string> <string key="superclassName">NSTextFieldCell</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -3248,6 +4264,13 @@ <string key="className">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">PrintCore.framework/Headers/PDEPluginInterface.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> <string key="minorKey">Sparkle.framework/Headers/SUAppcast.h</string> </object> </object> @@ -3360,6 +4383,22 @@ </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSScrollView</string> + <string key="superclassName">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSScrollView.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSScroller</string> + <string key="superclassName">NSControl</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSScroller.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSSearchField</string> <string key="superclassName">NSTextField</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -3400,6 +4439,22 @@ </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSTableColumn</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSTableColumn.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSTableHeaderView</string> + <string key="superclassName">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSTableHeaderView.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSTableView</string> <string key="superclassName">NSControl</string> <reference key="sourceIdentifier" ref="752577895"/> @@ -3533,13 +4588,19 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSAddTemplate</string> <string>NSMenuCheckmark</string> <string>NSMenuMixedState</string> + <string>NSRemoveTemplate</string> + <string>NSSwitch</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> + <string>{8, 8}</string> <string>{9, 8}</string> <string>{7, 2}</string> + <string>{8, 8}</string> + <string>{15, 15}</string> </object> </object> </data> diff --git a/Source/SPArrayAdditions.m b/Source/SPArrayAdditions.m index 6dd9aa30..e7ad01fe 100644 --- a/Source/SPArrayAdditions.m +++ b/Source/SPArrayAdditions.m @@ -39,7 +39,7 @@ for (NSString *component in self) { if ([result length]) - [result appendString: @","]; + [result appendString: @", "]; [result appendString:[component backtickQuotedString]]; } diff --git a/Source/SPFileHandle.m b/Source/SPFileHandle.m index 7e856c2a..ff583ddc 100644 --- a/Source/SPFileHandle.m +++ b/Source/SPFileHandle.m @@ -420,7 +420,7 @@ pthread_mutex_unlock(&bufferLock); // Write out the data - long bufferLengthWrittenOut; + long bufferLengthWrittenOut = 0; if (useCompression) { switch (compressionFormat) diff --git a/Source/SPIndexesController.h b/Source/SPIndexesController.h index 8fe7c88d..cd049e57 100644 --- a/Source/SPIndexesController.h +++ b/Source/SPIndexesController.h @@ -23,7 +23,13 @@ // // More info at <http://code.google.com/p/sequel-pro/> -@class SPDatabaseDocument, SPTablesList, SPTableData, SPTableStructure, MCPConnection; +@class SPDatabaseDocument, SPTablesList, SPTableData, SPTableStructure, MCPConnection, BWAnchoredButtonBar; + +// Constants +extern NSString *SPNewIndexIndexName; +extern NSString *SPNewIndexIndexType; +extern NSString *SPNewIndexIndexedColumns; +extern NSString *SPNewIndexStorageType; @interface SPIndexesController : NSWindowController { @@ -41,18 +47,45 @@ // New index sheet IBOutlet NSPopUpButton *indexTypePopUpButton; IBOutlet NSTextField *indexNameTextField; - IBOutlet NSComboBox *indexedColumnsComboBox; + IBOutlet NSTableView *indexedColumnsTableView; + IBOutlet NSScrollView *indexedColumnsScrollView; + IBOutlet NSTextField *indexTypeLabel; + IBOutlet NSTextField *indexNameLabel; + IBOutlet NSTableColumn *indexSizeTableColumn; + IBOutlet NSButton *addIndexedColumnButton; + IBOutlet NSButton *removeIndexedColumnButton; + IBOutlet NSButton *confirmAddIndexButton; + IBOutlet BWAnchoredButtonBar *anchoredButtonBar; + // Advanced options view + IBOutlet NSButton *indexAdvancedOptionsViewButton; + IBOutlet NSView *indexAdvancedOptionsView; + IBOutlet NSButton *indexAdvancedOptionsViewLabelButton; + IBOutlet NSPopUpButton *indexStorageTypePopUpButton; + NSString *table; - NSMutableArray *fields, *indexes; + NSMutableArray *fields, *indexes, *indexedFields, *supportsLength, *requiresLength; NSUserDefaults *prefs; MCPConnection *connection; + + BOOL showAdvancedView; + + NSInteger heightOffset; + NSUInteger windowMinWidth; + NSUInteger windowMinHeigth; } +/** + * @property table The table currently being viewed + */ @property (readwrite, retain) NSString *table; + +/** + * @property connection The MySQL connection to use + */ @property (readwrite, assign) MCPConnection *connection; - (IBAction)addIndex:(id)sender; @@ -60,6 +93,10 @@ - (IBAction)chooseIndexType:(id)sender; - (IBAction)closeSheet:(id)sender; +- (IBAction)addIndexedField:(id)sender; +- (IBAction)removeIndexedField:(id)sender; +- (IBAction)toggleAdvancedIndexOptionsView:(id)sender; + - (void)setFields:(NSArray *)tableFields; - (void)setIndexes:(NSArray *)tableIndexes; diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m index fdd5b886..ddd80354 100644 --- a/Source/SPIndexesController.m +++ b/Source/SPIndexesController.m @@ -27,11 +27,21 @@ #import "SPConstants.h" #import "SPAlertSheets.h" +// Constants +NSString *SPNewIndexIndexName = @"IndexName"; +NSString *SPNewIndexIndexType = @"IndexType"; +NSString *SPNewIndexIndexedColumns = @"IndexedColumns"; +NSString *SPNewIndexStorageType = @"IndexStorageType"; + @interface SPIndexesController (PrivateAPI) +- (void)_reloadIndexedColumnsTableData; + - (void)_addIndexUsingDetails:(NSDictionary *)indexDetails; - (void)_removeIndexUsingDeatails:(NSDictionary *)indexDetails; +- (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta; + @end @implementation SPIndexesController @@ -47,15 +57,32 @@ - (id)init { if ((self = [super initWithWindowNibName:@"IndexesView"])) { - + table = @""; - + fields = [[NSMutableArray alloc] init]; indexes = [[NSMutableArray alloc] init]; - + indexedFields = [[NSMutableArray alloc] init]; + prefs = [NSUserDefaults standardUserDefaults]; + + showAdvancedView = NO; + + heightOffset = 0; + windowMinWidth = [[self window] minSize].width; + windowMinHeigth = [[self window] minSize].height; + + // Create an array of field types that supporting specifying an index length prefix + supportsLength = [[NSArray alloc] initWithObjects: + @"CHAR", @"VARCHAR", @"TINYTEXT", @"TEXT", @"MEDIUMTEXT", @"LONGTEXT", + @"BINARY", @"VARBINARY", @"TINYBLOB", @"BLOB", @"MEDIUMBLOB", @"LONGBLOB", nil]; + + // Create an array of field types that require an index length prefix + requiresLength = [[NSArray alloc] initWithObjects: + @"TINYTEXT", @"TEXT", @"MEDIUMTEXT", @"LONGTEXT", + @"TINYBLOB", @"BLOB", @"MEDIUMBLOB", @"LONGBLOB", nil]; } - + return self; } @@ -63,18 +90,23 @@ * Nib awakening. */ - (void)awakeFromNib -{ +{ // Set the index tables view's vertical gridlines if required [indexesTableView setGridStyleMask:([prefs boolForKey:SPDisplayTableViewVerticalGridlines]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone]; - + // Set the strutcture and index view's font BOOL useMonospacedFont = [prefs boolForKey:SPUseMonospacedFonts]; - + for (NSTableColumn *indexColumn in [indexesTableView tableColumns]) { [[indexColumn dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; } - + + for (NSTableColumn *fieldColumn in [indexedColumnsTableView tableColumns]) + { + [[fieldColumn dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + [prefs addObserver:self forKeyPath:SPDisplayTableViewVerticalGridlines options:NSKeyValueObservingOptionNew context:NULL]; } @@ -85,50 +117,49 @@ * Opens the add new index sheet. */ - (IBAction)addIndex:(id)sender -{ +{ // Check whether a save of the current field row is required. if (![tableStructure saveRowOnDeselect]) return; - + + [indexTypePopUpButton insertItemWithTitle:@"PRIMARY KEY" atIndex:0]; + // Set sheet defaults - key type PRIMARY, key name PRIMARY and disabled [indexTypePopUpButton selectItemAtIndex:0]; [indexNameTextField setEnabled:NO]; [indexNameTextField setStringValue:@"PRIMARY"]; - - [[self window] makeFirstResponder:indexedColumnsComboBox]; - + // Check to see whether a primary key already exists for the table, and if so select an INDEX instead - for (NSDictionary *field in fields) + for (NSDictionary *field in fields) { - if ([[field objectForKey:@"Key"] isEqualToString:@"PRI"]) { - [indexTypePopUpButton selectItemAtIndex:1]; + if ([field objectForKey:@"isprimarykey"]) { + + [indexTypePopUpButton removeItemAtIndex:0]; + + // Select INDEX type + [indexTypePopUpButton selectItemAtIndex:0]; [indexNameTextField setEnabled:YES]; [indexNameTextField setStringValue:@""]; - + [[self window] makeFirstResponder:indexNameTextField]; - + break; } } - - // Update the default values array and the indexed column fields control - [indexedColumnsComboBox removeAllItems]; - - for (NSDictionary *field in fields) - { - [indexedColumnsComboBox addItemWithObjectValue:[field objectForKey:@"name"]]; - } - - // Only show up to ten items in the indexed column fields combo box - [indexedColumnsComboBox setNumberOfVisibleItems:([fields count] < 10) ? [fields count] : 10]; - - // Select the first column - [indexedColumnsComboBox selectItemAtIndex:0]; - + + [addIndexedColumnButton setEnabled:([indexedFields count] < [fields count])]; + + // Index storage types (HASH & BTREE) are only available some storage engines + NSString *engine = [[tableData statusValues] objectForKey:@"Engine"]; + + // MyISAM and InnoDB tables only support BTREE storage types so disable the storage type popup button + // as it's the default anyway. + [indexStorageTypePopUpButton setEnabled:(!([engine isEqualToString:@"MyISAM"] || [engine isEqualToString:@"InnoDB"]))]; + // Begin the sheet [NSApp beginSheet:[self window] - modalForWindow:[dbDocument parentWindow] + modalForWindow:[dbDocument parentWindow] modalDelegate:self - didEndSelector:@selector(addIndexSheetDidEnd:returnCode:contextInfo:) + didEndSelector:@selector(addIndexSheetDidEnd:returnCode:contextInfo:) contextInfo:nil]; } @@ -138,20 +169,20 @@ - (IBAction)removeIndex:(id)sender { if (![indexesTableView numberOfSelectedRows]) return; - + // Check whether a save of the current fields row is required. if (![tableStructure saveRowOnDeselect]) return; - + NSInteger index = [indexesTableView selectedRow]; - + if ((index == -1) || (index > ([indexes count] - 1))) return; - + NSString *keyName = [[indexes objectAtIndex:index] objectForKey:@"Key_name"]; NSString *columnName = [[indexes objectAtIndex:index] objectForKey:@"Column_name"]; - + BOOL hasForeignKey = NO; NSString *constraintName = @""; - + // Check to see whether the user is attempting to remove an index that a foreign key constraint depends on // thus would result in an error if not dropped before removing the index. for (NSDictionary *constraint in [tableData getConstraints]) @@ -165,22 +196,22 @@ } } } - + NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Delete index '%@'?", @"delete index message"), keyName] defaultButton:NSLocalizedString(@"Delete", @"delete button") alternateButton:NSLocalizedString(@"Cancel", @"cancel button") - otherButton:nil + otherButton:nil informativeTextWithFormat:(hasForeignKey) ? [NSString stringWithFormat:NSLocalizedString(@"The foreign key relationship '%@' has a dependency on this index. This relationship must be removed before the index can be deleted.\n\nAre you sure you want to continue to delete the relationship and the index? This action cannot be undone.", @"delete index and foreign key informative message"), constraintName] : [NSString stringWithFormat:NSLocalizedString(@"Are you sure you want to delete the index '%@'? This action cannot be undone.", @"delete index informative message"), keyName]]; - + [alert setAlertStyle:NSCriticalAlertStyle]; - + NSArray *buttons = [alert buttons]; - + // 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"]; - + [alert beginSheetModalForWindow:[dbDocument parentWindow] modalDelegate:self didEndSelector:@selector(removeIndexSheetDidEnd:returnCode:contextInfo:) contextInfo:(hasForeignKey) ? @"removeIndexAndForeignKey" : @"removeIndex"]; } @@ -192,10 +223,10 @@ if ([[indexTypePopUpButton titleOfSelectedItem] isEqualToString:@"PRIMARY KEY"] ) { [indexNameTextField setEnabled:NO]; [indexNameTextField setStringValue:@"PRIMARY"]; - } + } else { [indexNameTextField setEnabled:YES]; - + if ([[indexNameTextField stringValue] isEqualToString:@"PRIMARY"]) { [indexNameTextField setStringValue:@""]; } @@ -203,100 +234,229 @@ } /** - * Close the current sheet + * Close the current sheet. */ - (IBAction)closeSheet:(id)sender { + // Close the advanced options view if it's open + [indexAdvancedOptionsView setHidden:YES]; + [indexAdvancedOptionsViewButton setState:NSOffState]; + + [indexSizeTableColumn setHidden:YES]; + + [self _resizeWindowForAdvancedOptionsViewByHeightDelta:0]; + [NSApp endSheet:[sender window] returnCode:[sender tag]]; [[sender window] orderOut:self]; } +/** + * Adds a new field to be included in the index. + */ +- (IBAction)addIndexedField:(id)sender +{ + if ([indexedFields count] <= ([fields count] - 1)) { + + // Add a field that hasn't already been added + for (NSDictionary *field in fields) + { + if (![indexedFields containsObject:field]) { + [indexedFields addObject:[[field mutableCopy] autorelease]]; + break; + } + } + + // If the field type is foud within the requires length array then a length prefix is required so + // display the size column. + if ([requiresLength containsObject:[[[indexedFields objectAtIndex:([indexedFields count] - 1)] objectForKey:@"type"] uppercaseString]]) [indexSizeTableColumn setHidden:NO]; + } + + [self _reloadIndexedColumnsTableData]; + + [addIndexedColumnButton setEnabled:([indexedFields count] < [fields count])]; +} + +/** + * Removes a field from those that are to be included in the index. + */ +- (IBAction)removeIndexedField:(id)sender +{ + [indexedFields removeObjectAtIndex:[indexedColumnsTableView selectedRow]]; + + [self _reloadIndexedColumnsTableData]; + + [addIndexedColumnButton setEnabled:([indexedFields count] < [fields count])]; +} + +/** + * Toggles the display of the advanced options view. + */ +- (IBAction)toggleAdvancedIndexOptionsView:(id)sender +{ + showAdvancedView = (!showAdvancedView); + + [indexAdvancedOptionsViewButton setState:showAdvancedView]; + [indexAdvancedOptionsView setHidden:(!showAdvancedView)]; + + [indexSizeTableColumn setHidden:(!showAdvancedView)]; + + [self _resizeWindowForAdvancedOptionsViewByHeightDelta:(showAdvancedView) ? ([indexAdvancedOptionsView frame].size.height + 10) : 0]; +} + #pragma mark - #pragma mark TableView datasource methods -- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView +- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { - return [indexes count]; + return (tableView == indexesTableView) ? [indexes count] : [indexedFields count]; } - (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex { - return [[indexes objectAtIndex:rowIndex] objectForKey:[tableColumn identifier]]; + return [[(tableView == indexesTableView) ? indexes : indexedFields objectAtIndex:rowIndex] objectForKey:[tableColumn identifier]]; +} + +- (void)tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ + [[indexedFields objectAtIndex:rowIndex] setObject:object forKey:[tableColumn identifier]]; + + if ([[tableColumn identifier] isEqualToString:@"name"]) { + // If the field type is foud within the requires length array then a length prefix is required so + // display the size column. + if ([requiresLength containsObject:[[object objectForKey:@"type"] uppercaseString]]) [indexSizeTableColumn setHidden:NO]; + } + + [self _reloadIndexedColumnsTableData]; +} + +- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ + if ([[tableColumn identifier] isEqualToString:@"Size"]) { + + // If the field is of type TEXT or BLOB then a index prefix length is required so change the default + // placeholder of 'optional' to 'required'. + [cell setPlaceholderString:([requiresLength containsObject:[[[indexedFields objectAtIndex:rowIndex] objectForKey:@"type"] uppercaseString]]) ? NSLocalizedString(@"required", @"required placeholder string") : NSLocalizedString(@"optional", @"optional placeholder string")]; + } } #pragma mark - -#pragma mark TableView delegate methods +#pragma mark ComboBoxCell datasource methods /** - * Performs various interface validation + * Returns the number items that are to be shown in the combo box cell. */ -- (void)tableViewSelectionDidChange:(NSNotification *)notification -{ - if ([notification object] == indexesTableView) { - - // Check if there is currently an index selected and change button state accordingly - [removeIndexButton setEnabled:([indexesTableView numberOfSelectedRows] > 0 && [tablesList tableType] == SPTableTypeTable)]; - } +- (NSInteger)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell +{ + return [fields count]; +} +/** + * Returns the item to be displayed in the combo box cell as the supplied index. + */ +- (id)comboBoxCell:(NSComboBoxCell *)comboBoxCell objectValueForItemAtIndex:(NSInteger)index +{ + return [[fields objectAtIndex:index] objectForKey:@"name"]; } #pragma mark - -#pragma mark Text field delegate methods +#pragma mark TableView delegate methods /** - * Only enable the add button if there is at least one indexed column. + * UI control validation. */ -- (void)controlTextDidChange:(NSNotification *)notification +- (void)tableViewSelectionDidChange:(NSNotification *)notification { - if ([notification object] == indexedColumnsComboBox) { - [addIndexButton setEnabled:([[[indexedColumnsComboBox stringValue] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length] > 0)]; + if ([notification object] == indexesTableView) { + + // Check if there is currently an index selected and change button state accordingly + [removeIndexButton setEnabled:([indexesTableView numberOfSelectedRows] > 0 && [tablesList tableType] == SPTableTypeTable)]; + } + else if ([notification object] == indexedColumnsTableView) { + [removeIndexedColumnButton setEnabled:(([indexedFields count] > 1) && ([indexedColumnsTableView numberOfSelectedRows] == 1))]; } } #pragma mark - -#pragma mark Other methods +#pragma mark Accessor methods /** * Sets the current table's fields. + * + * @param tableFields An array of table fields (NSDictionary instances) */ - (void)setFields:(NSArray *)tableFields { [fields removeAllObjects]; - + [fields setArray:tableFields]; + + [indexedFields removeAllObjects]; + + if ([fields count]) [indexedFields addObject:[[[fields objectAtIndex:0] mutableCopy] autorelease]]; } /** * Sets the current table's indexes. + * + * @param tableIndexes An array of table indexes (NSDictionary instances) */ - (void)setIndexes:(NSArray *)tableIndexes { [indexes removeAllObjects]; - + [indexes setArray:tableIndexes]; } +#pragma mark - +#pragma mark Other methods + /** * Process the new index sheet closing, adding the index if appropriate */ - (void)addIndexSheetDidEnd:(NSWindow *)theSheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { [theSheet orderOut:nil]; - + if (returnCode == NSOKButton) { [dbDocument startTaskWithDescription:NSLocalizedString(@"Adding index...", @"adding index task status message")]; - + + NSUInteger i, j; NSMutableDictionary *indexDetails = [NSMutableDictionary dictionary]; - - [indexDetails setObject:[[indexedColumnsComboBox stringValue] componentsSeparatedByString:@","] forKey:@"IndexedColumns"]; - [indexDetails setObject:[indexNameTextField stringValue] forKey:@"IndexName"]; - [indexDetails setObject:[indexTypePopUpButton titleOfSelectedItem] forKey:@"IndexType"]; - + + // Loop the indexed fields array and remove duplicates + NSArray *copy = [indexedFields copy]; + + for (i = ([copy count] - 1); i > 0; i--) + { + NSDictionary *field = [[copy objectAtIndex:i] objectForKey:@"name"]; + + for (j = 0; j < i; j++) + { + if ([[[copy objectAtIndex:j] objectForKey:@"name"] isEqualToString:field]) { + [indexedFields removeObjectAtIndex:i]; + } + } + } + + [copy release]; + + // In the event that we removed duplicate columns reload the table view to ensure that the next time + // it is open we don't cause the table view to ask for rows that no longer exist. + [indexedColumnsTableView reloadData]; + + [indexDetails setObject:indexedFields forKey:SPNewIndexIndexedColumns]; + [indexDetails setObject:[indexNameTextField stringValue] forKey:SPNewIndexIndexName]; + [indexDetails setObject:[indexTypePopUpButton titleOfSelectedItem] forKey:SPNewIndexIndexType]; + + if ([indexStorageTypePopUpButton indexOfSelectedItem] > 0) { + [indexDetails setObject:[indexStorageTypePopUpButton titleOfSelectedItem] forKey:SPNewIndexStorageType]; + } + if ([NSThread isMainThread]) { [NSThread detachNewThreadSelector:@selector(_addIndexUsingDetails:) toTarget:self withObject:indexDetails]; - - [dbDocument enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL]; - } + + [dbDocument enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL]; + } else { [self _addIndexUsingDetails:indexDetails]; } @@ -311,20 +471,20 @@ { // Order out current sheet to suppress overlapping of sheets [[alert window] orderOut:nil]; - + if (returnCode == NSAlertDefaultReturn) { [dbDocument startTaskWithDescription:NSLocalizedString(@"Removing index...", @"removing index task status message")]; - + NSMutableDictionary *indexDetails = [NSMutableDictionary dictionary]; - + [indexDetails setObject:[indexes objectAtIndex:[indexesTableView selectedRow]] forKey:@"Index"]; [indexDetails setObject:[NSNumber numberWithBool:[contextInfo hasSuffix:@"AndForeignKey"]] forKey:@"RemoveForeignKey"]; - + if ([NSThread isMainThread]) { [NSThread detachNewThreadSelector:@selector(_removeIndexUsingDeatails:) toTarget:self withObject:indexDetails]; - + [dbDocument enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL]; - } + } else { [self _removeIndexUsingDeatails:indexDetails]; } @@ -335,42 +495,53 @@ * This method is called as part of Key Value Observing which is used to watch for preference changes which effect the interface. */ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ +{ // Display table veiew vertical gridlines preference changed if ([keyPath isEqualToString:SPDisplayTableViewVerticalGridlines]) { [indexesTableView setGridStyleMask:([[change objectForKey:NSKeyValueChangeNewKey] boolValue]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone]; } // Use monospaced fonts preference changed else if ([keyPath isEqualToString:SPUseMonospacedFonts]) { - + BOOL useMonospacedFont = [[change objectForKey:NSKeyValueChangeNewKey] boolValue]; - + for (NSTableColumn *indexColumn in [indexesTableView tableColumns]) { [[indexColumn dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; } - + + for (NSTableColumn *indexColumn in [indexedColumnsTableView tableColumns]) + { + [[indexColumn dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + [indexesTableView reloadData]; + [self _reloadIndexedColumnsTableData]; } } /** - * Menu validation + * Menu item validation. */ - (BOOL)validateMenuItem:(NSMenuItem *)menuItem -{ +{ // Remove index if ([menuItem action] == @selector(removeIndex:)) { return ([indexesTableView numberOfSelectedRows] == 1); } - + // Reset AUTO_INCREMENT - if ([menuItem action] == @selector(resetAutoIncrement:)) { - return ([indexesTableView numberOfSelectedRows] == 1 - && [[indexes objectAtIndex:[indexesTableView selectedRow]] objectForKey:@"Key_name"] + if ([menuItem action] == @selector(resetAutoIncrement:)) { + return ([indexesTableView numberOfSelectedRows] == 1 + && [[indexes objectAtIndex:[indexesTableView selectedRow]] objectForKey:@"Key_name"] && [[[indexes objectAtIndex:[indexesTableView selectedRow]] objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"]); } - + + // Remove indexed field + if ([menuItem action] == @selector(removeIndexedField:)) { + return (([indexedFields count] > 1) && ([indexedColumnsTableView numberOfSelectedRows] == 1)); + } + return YES; } @@ -378,77 +549,141 @@ #pragma mark Private API methods /** + * Reloads the indexed columns table view data and displays the size column if required. + */ +- (void)_reloadIndexedColumnsTableData +{ + NSUInteger c = 0; + + for (NSDictionary *field in indexedFields) + { + if ([requiresLength containsObject:[[field objectForKey:@"type"] uppercaseString]]) c++; + } + + [indexSizeTableColumn setHidden:(!c)]; + [confirmAddIndexButton setEnabled:(!c)]; + + [indexedColumnsTableView reloadData]; +} + +/** * Adds an index to the current table. + * + * @param indexDeatails A dictionary containing the details of the new index to be added */ - (void)_addIndexUsingDetails:(NSDictionary *)indexDetails { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - + // Check whether a save of the current fields row is required. if (![[tableStructure onMainThread] saveRowOnDeselect]) return; - - NSString *indexName = [indexDetails objectForKey:@"IndexName"]; - NSString *indexType = [indexDetails objectForKey:@"IndexType"]; - NSArray *indexedColumns = [indexDetails objectForKey:@"IndexedColumns"]; - - // Interface validation should prevent this + + // Retrive index details + NSString *indexName = [indexDetails objectForKey:SPNewIndexIndexName]; + NSString *indexType = [indexDetails objectForKey:SPNewIndexIndexType]; + NSString *indexStorageType = [indexDetails objectForKey:SPNewIndexStorageType]; + NSArray *indexedColumns = [indexDetails objectForKey:SPNewIndexIndexedColumns]; + + // Interface validation should prevent this, but just to be safe if ([indexedColumns count] > 0) { - + NSMutableArray *tempIndexedColumns = [[NSMutableArray alloc] init]; - - if ([indexName isEqualToString:@"PRIMARY"]) { + + if ([indexType isEqualToString:@"PRIMARY KEY"]) { indexName = @""; - } + } else { indexName = ([indexName isEqualToString:@""]) ? @"" : [indexName backtickQuotedString]; } - + // For each column strip leading and trailing whitespace and add it to the temp array - for (NSString *column in indexedColumns) - { - [tempIndexedColumns addObject:[column stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]]; + for (NSDictionary *column in indexedColumns) + { + NSString *columnName = [[column objectForKey:@"name"] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; + NSString *columnType = [column objectForKey:@"type"]; + + if ((![columnName length]) || (![columnType length])) continue; + + // If this field type requires a length and one hasn't been specified (interface validation + // should ensure this doesn't happen), then skip it. + if ([requiresLength containsObject:[columnType uppercaseString]] && (![[column objectForKey:@"Size"] length])) continue; + + if ([column objectForKey:@"Size"] && [supportsLength containsObject:columnType]) { + + [tempIndexedColumns addObject:[NSString stringWithFormat:@"%@ (%@)", [columnName backtickQuotedString], [column objectForKey:@"Size"]]]; + } + else { + [tempIndexedColumns addObject:[columnName backtickQuotedString]]; + } } - + + // Build the query + NSMutableString *query = [NSMutableString stringWithFormat:@"ALTER TABLE %@ ADD %@", [table backtickQuotedString], indexType]; + + // If supplied specify the index's name + if ([indexName length]) { + [query appendString:@" "]; + [query appendString:indexName]; + } + + // Add the columns + [query appendFormat:@" (%@)", [tempIndexedColumns componentsJoinedByCommas]]; + + // If supplied specify the index's storage type + if (indexStorageType) { + [query appendString:@" USING "]; + [query appendString:indexStorageType]; + } + // Execute the query - [connection queryString:[NSString stringWithFormat:@"ALTER TABLE %@ ADD %@ %@ (%@)", [table backtickQuotedString], indexType, indexName, [tempIndexedColumns componentsJoinedAndBacktickQuoted]]]; - + [connection queryString:query]; + + // Get rid of temp arrays + [supportsLength release]; + [requiresLength release]; [tempIndexedColumns release]; - + // Check for errors, but only if the query wasn't cancelled if ([connection queryErrored] && ![connection queryCancelled]) { - SPBeginAlertSheet(NSLocalizedString(@"Unable to add index", @"add index error message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [dbDocument parentWindow], self, nil, nil, + SPBeginAlertSheet(NSLocalizedString(@"Unable to add index", @"add index error message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [dbDocument parentWindow], self, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to add the index.\n\nMySQL said: %@", @"add index error informative message"), [connection getLastErrorMessage]]); } else { [tableData resetAllData]; [tablesList setStatusRequiresReload:YES]; - + [tableStructure loadTable:table]; } } - + + // Reset indexed fields to default + [indexedFields removeAllObjects]; + [indexedFields addObject:[[[fields objectAtIndex:0] mutableCopy] autorelease]]; + [dbDocument endTask]; - + [pool drain]; } /** * Removes an index from the current table using the supplied details. + * + * @param indexDetails A dictionary containing the details of the index to be removed */ - (void)_removeIndexUsingDeatails:(NSDictionary *)indexDetails { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - + NSDictionary *index = [indexDetails objectForKey:@"Index"]; BOOL removeForeignKey = [[indexDetails objectForKey:@"RemoveForeignKey"] boolValue]; - + // Remove the foreign key dependency before the index if required if (removeForeignKey) { - + NSString *columnName = [index objectForKey:@"Column_name"]; - + NSString *constraintName = @""; - + // Check to see whether the user is attempting to remove an index that a foreign key constraint depends on // thus would result in an error if not dropped before removing the index. for (NSDictionary *constraint in [tableData getConstraints]) @@ -461,20 +696,20 @@ } } } - + [connection queryString:[NSString stringWithFormat:@"ALTER TABLE %@ DROP FOREIGN KEY %@", [table backtickQuotedString], [constraintName backtickQuotedString]]]; - + // Check for errors, but only if the query wasn't cancelled if ([connection queryErrored] && ![connection queryCancelled]) { NSMutableDictionary *errorDictionary = [NSMutableDictionary dictionary]; - + [errorDictionary setObject:NSLocalizedString(@"Unable to delete relation", @"error deleting relation message") forKey:@"title"]; [errorDictionary setObject:[NSString stringWithFormat:NSLocalizedString(@"An error occurred while trying to delete the relation '%@'.\n\nMySQL said: %@", @"error deleting relation informative message"), constraintName, [connection getLastErrorMessage]] forKey:@"message"]; - + [[tableStructure onMainThread] showErrorSheetWith:errorDictionary]; - } + } } - + if ([[index objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"]) { [connection queryString:[NSString stringWithFormat:@"ALTER TABLE %@ DROP PRIMARY KEY", [table backtickQuotedString]]]; } @@ -482,39 +717,106 @@ [connection queryString:[NSString stringWithFormat:@"ALTER TABLE %@ DROP INDEX %@", [table backtickQuotedString], [[index objectForKey:@"Key_name"] backtickQuotedString]]]; } - + // Check for errors, but only if the query wasn't cancelled if ([connection queryErrored] && ![connection queryCancelled]) { NSMutableDictionary *errorDictionary = [NSMutableDictionary dictionary]; - + [errorDictionary setObject:NSLocalizedString(@"Unable to delete index", @"error deleting index message") forKey:@"title"]; [errorDictionary setObject:[NSString stringWithFormat:NSLocalizedString(@"An error occured while trying to delete the index.\n\nMySQL said: %@", @"error deleting index informative message"), [connection getLastErrorMessage]] forKey:@"message"]; - + [[tableStructure onMainThread] showErrorSheetWith:errorDictionary]; - } + } else { [tableData resetAllData]; [tablesList setStatusRequiresReload:YES]; - + [tableStructure loadTable:table]; } - + [dbDocument endTask]; - + [pool drain]; } +/** + * Resizes the new index sheet'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 popUpMask = [indexTypePopUpButton autoresizingMask]; + NSUInteger nameFieldMask = [indexNameTextField autoresizingMask]; + NSUInteger scrollMask = [indexedColumnsScrollView autoresizingMask]; + NSUInteger buttonMask = [indexAdvancedOptionsViewButton autoresizingMask]; + NSUInteger textFieldMask = [indexAdvancedOptionsViewLabelButton autoresizingMask]; + NSUInteger advancedViewMask = [indexAdvancedOptionsView autoresizingMask]; + NSUInteger typeLabelMask = [indexTypeLabel autoresizingMask]; + NSUInteger nameLabelMask = [indexNameLabel autoresizingMask]; + NSUInteger buttonBarMask = [anchoredButtonBar autoresizingMask]; + + NSRect frame = [[self window] frame]; + + if (frame.size.height > 600 && delta > heightOffset) { + frame.origin.y += [indexAdvancedOptionsView frame].size.height; + frame.size.height -= [indexAdvancedOptionsView frame].size.height; + + [[self window] setFrame:frame display:YES animate:YES]; + } + + [indexTypePopUpButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexNameTextField setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexedColumnsScrollView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexAdvancedOptionsViewButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexAdvancedOptionsViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexTypeLabel setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [indexNameLabel setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [anchoredButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + + NSInteger newMinHeight = (windowMinHeigth - heightOffset + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset + delta; + + [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; + + frame.origin.y += heightOffset; + frame.size.height -= heightOffset; + + heightOffset= delta; + + frame.origin.y -= heightOffset; + frame.size.height += heightOffset; + + [[self window] setFrame:frame display:YES animate:YES]; + + [indexTypePopUpButton setAutoresizingMask:popUpMask]; + [indexNameTextField setAutoresizingMask:nameFieldMask]; + [indexedColumnsScrollView setAutoresizingMask:scrollMask]; + [indexAdvancedOptionsViewButton setAutoresizingMask:buttonMask]; + [indexAdvancedOptionsViewLabelButton setAutoresizingMask:textFieldMask]; + [indexAdvancedOptionsView setAutoresizingMask:advancedViewMask]; + [indexTypeLabel setAutoresizingMask:typeLabelMask]; + [indexNameLabel setAutoresizingMask:nameLabelMask]; + [anchoredButtonBar setAutoresizingMask:buttonBarMask]; +} + #pragma mark - /** * Dealloc. */ - (void)dealloc -{ - [table release]; - [indexes release]; - [fields release]; - +{ + [table release], table = nil; + [indexes release], indexes = nil; + [fields release], fields = nil; + + [supportsLength release], supportsLength = nil; + [requiresLength release], requiresLength = nil; + + if (indexedFields) [indexedFields release], indexedFields = nil; + [super dealloc]; } diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index 186243b1..323c01b3 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -545,6 +545,8 @@ { // Check for cancellation flag if ([self isCancelled]) { + [errors release]; + [sqlString release]; [pool release]; return; } diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 4d9a496f..a5aa45af 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -132,10 +132,13 @@ selector:@selector(startDocumentTaskForTab:) name:SPDocumentTaskStartNotification object:tableDocumentInstance]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(endDocumentTaskForTab:) name:SPDocumentTaskEndNotification object:tableDocumentInstance]; + + [prefs addObserver:indexesController forKeyPath:SPUseMonospacedFonts options:NSKeyValueObservingOptionNew context:NULL]; } #pragma mark - |