diff options
49 files changed, 7204 insertions, 1766 deletions
diff --git a/Interfaces/English.lproj/DBView.xib b/Interfaces/English.lproj/DBView.xib index 731850fe..c78192b9 100644 --- a/Interfaces/English.lproj/DBView.xib +++ b/Interfaces/English.lproj/DBView.xib @@ -2,7 +2,7 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10D2094</string> + <string key="IBDocument.SystemVersion">10D573</string> <string key="IBDocument.InterfaceBuilderVersion">762</string> <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">460.00</string> @@ -23,14 +23,13 @@ </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="3994"/> - <integer value="5824"/> + <integer value="7052"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.brandonwalkin.BWToolkit</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.WebKitIBPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -92,6 +91,7 @@ <int key="NSvFlags">290</int> <string key="NSFrame">{{5, 2}, {204, 19}}</string> <reference key="NSSuperview" ref="801427893"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSSearchFieldCell" key="NSCell" id="134854992"> <int key="NSCellFlags">343014976</int> @@ -184,6 +184,7 @@ <int key="NSvFlags">4362</int> <string key="NSFrameSize">{218, 38}</string> <reference key="NSSuperview" ref="494991824"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -228,7 +229,7 @@ <string key="NSColorName">controlColor</string> <object class="NSColor" key="NSColor" id="1001122760"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes> + <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> </object> </object> <reference key="NSTextColor" ref="454249633"/> @@ -273,6 +274,7 @@ </object> <string key="NSFrame">{{1, 1}, {218, 38}}</string> <reference key="NSSuperview" ref="607475905"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="970881282"/> <reference key="NSDocView" ref="970881282"/> <object class="NSColor" key="NSBGColor" id="1024678221"> @@ -288,6 +290,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {15, 8}}</string> <reference key="NSSuperview" ref="607475905"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="607475905"/> <string key="NSAction">_doScroller:</string> <double key="NSPercent">0.42105263471603394</double> @@ -297,6 +300,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {223, 15}}</string> <reference key="NSSuperview" ref="607475905"/> + <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="607475905"/> <string key="NSAction">_doScroller:</string> @@ -305,6 +309,7 @@ </object> <string key="NSFrame">{{-1, -13}, {220, 40}}</string> <reference key="NSSuperview" ref="801427893"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="494991824"/> <int key="NSsFlags">2</int> <reference key="NSVScroller" ref="196112633"/> @@ -315,6 +320,7 @@ </object> <string key="NSFrameSize">{214, 26}</string> <reference key="NSSuperview" ref="213762440"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="BWCustomView" id="1017775084"> @@ -337,6 +343,7 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{214, 354}</string> <reference key="NSSuperview" ref="73685676"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -403,6 +410,7 @@ </object> <string key="NSFrameSize">{214, 354}</string> <reference key="NSSuperview" ref="233472824"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="251040077"/> <reference key="NSDocView" ref="251040077"/> <reference key="NSBGColor" ref="1024678221"/> @@ -413,6 +421,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{197, 0}, {15, 292}}</string> <reference key="NSSuperview" ref="233472824"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="233472824"/> <string key="NSAction">_doScroller:</string> <double key="NSCurValue">0.096045196056365967</double> @@ -423,6 +432,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {141, 11}}</string> <reference key="NSSuperview" ref="233472824"/> + <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="233472824"/> <string key="NSAction">_doScroller:</string> @@ -431,6 +441,7 @@ </object> <string key="NSFrameSize">{214, 354}</string> <reference key="NSSuperview" ref="1017775084"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="73685676"/> <int key="NSsFlags">528</int> <reference key="NSVScroller" ref="693168867"/> @@ -441,11 +452,13 @@ </object> <string key="NSFrame">{{0, 27}, {214, 354}}</string> <reference key="NSSuperview" ref="213762440"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrameSize">{214, 381}</string> <reference key="NSSuperview" ref="131633443"/> + <reference key="NSWindow"/> <int key="NSDividerStyle">2</int> <object class="NSColor" key="BWSVColor"> <int key="NSColorSpace">6</int> @@ -479,6 +492,7 @@ </object> <string key="NSFrameSize">{214, 381}</string> <reference key="NSSuperview" ref="298095498"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="BWCustomView" id="192579410"> @@ -501,6 +515,7 @@ <int key="NSvFlags">4352</int> <string key="NSFrameSize">{214, 145}</string> <reference key="NSSuperview" ref="685057119"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="_NSCornerView" key="NSCornerView"> <nil key="NSNextResponder"/> @@ -567,6 +582,7 @@ </object> <string key="NSFrameSize">{214, 145}</string> <reference key="NSSuperview" ref="298226231"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="347093764"/> <reference key="NSDocView" ref="347093764"/> <reference key="NSBGColor" ref="1024678221"/> @@ -577,6 +593,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {15, 20}}</string> <reference key="NSSuperview" ref="298226231"/> + <reference key="NSWindow"/> <reference key="NSTarget" ref="298226231"/> <string key="NSAction">_doScroller:</string> <double key="NSCurValue">0.48965516686439514</double> @@ -587,6 +604,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {141, 11}}</string> <reference key="NSSuperview" ref="298226231"/> + <reference key="NSWindow"/> <int key="NSsFlags">257</int> <reference key="NSTarget" ref="298226231"/> <string key="NSAction">_doScroller:</string> @@ -595,6 +613,7 @@ </object> <string key="NSFrameSize">{214, 145}</string> <reference key="NSSuperview" ref="192579410"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="685057119"/> <int key="NSsFlags">512</int> <reference key="NSVScroller" ref="245346414"/> @@ -605,11 +624,13 @@ </object> <string key="NSFrame">{{0, 382}, {214, 145}}</string> <reference key="NSSuperview" ref="298095498"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrame">{{0, 23}, {214, 527}}</string> <reference key="NSSuperview" ref="372294785"/> + <reference key="NSWindow"/> <int key="NSDividerStyle">2</int> <reference key="BWSVColor" ref="304829493"/> <bool key="BWSVColorIsEnabled">NO</bool> @@ -660,6 +681,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{-1, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredButtonCell" key="NSCell" id="283448047"> <int key="NSCellFlags">67239424</int> @@ -684,6 +706,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{30, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredPopUpButtonCell" key="NSCell" id="321871356"> <int key="NSCellFlags">71433792</int> @@ -811,6 +834,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{61, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredButtonCell" key="NSCell" id="227511715"> <int key="NSCellFlags">67239424</int> @@ -835,6 +859,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{92, -1}, {32, 24}}</string> <reference key="NSSuperview" ref="28219887"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="BWAnchoredButtonCell" key="NSCell" id="708016222"> <int key="NSCellFlags">-2080244224</int> @@ -861,6 +886,7 @@ </object> <string key="NSFrameSize">{214, 23}</string> <reference key="NSSuperview" ref="372294785"/> + <reference key="NSWindow"/> <bool key="BWABBIsResizable">YES</bool> <bool key="BWABBIsAtBottom">YES</bool> <bool key="BWABBHandleIsRightAligned">NO</bool> @@ -869,6 +895,7 @@ </object> <string key="NSFrameSize">{214, 550}</string> <reference key="NSSuperview" ref="937377983"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="604818293"> @@ -881,6 +908,7 @@ <int key="NSvFlags">274</int> <string key="NSFrame">{{-7, -10}, {741, 564}}</string> <reference key="NSSuperview" ref="604818293"/> + <reference key="NSWindow"/> <object class="NSMutableArray" key="NSTabViewItems"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTabViewItem" id="831053945"> @@ -3932,6 +3960,7 @@ </object> <string key="NSFrameSize">{542, 14}</string> <reference key="NSSuperview" ref="78677381"/> + <reference key="NSWindow"/> <object class="NSTextContainer" key="NSTextContainer" id="708157837"> <object class="NSLayoutManager" key="NSLayoutManager"> <object class="NSTextStorage" key="NSTextStorage"> @@ -3996,6 +4025,7 @@ </object> <string key="NSFrame">{{1, 1}, {542, 69}}</string> <reference key="NSSuperview" ref="709531668"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="69074373"/> <reference key="NSDocView" ref="69074373"/> <reference key="NSBGColor" ref="449903125"/> @@ -4007,6 +4037,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{543, 1}, {11, 69}}</string> <reference key="NSSuperview" ref="709531668"/> + <reference key="NSWindow"/> <int key="NSsFlags">256</int> <reference key="NSTarget" ref="709531668"/> <string key="NSAction">_doScroller:</string> @@ -4017,6 +4048,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {87, 18}}</string> <reference key="NSSuperview" ref="709531668"/> + <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="709531668"/> <string key="NSAction">_doScroller:</string> @@ -4026,6 +4058,7 @@ </object> <string key="NSFrame">{{96, 0}, {555, 71}}</string> <reference key="NSSuperview" ref="259390764"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="78677381"/> <int key="NSsFlags">18</int> <reference key="NSVScroller" ref="892376800"/> @@ -4037,6 +4070,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{22, 57}, {69, 14}}</string> <reference key="NSSuperview" ref="259390764"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="647656972"> <int key="NSCellFlags">68288064</int> @@ -4051,6 +4085,7 @@ </object> <string key="NSFrameSize">{651, 71}</string> <reference key="NSSuperview" ref="501779393"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="983998494"> @@ -4073,6 +4108,7 @@ <int key="NSvFlags">2322</int> <string key="NSFrameSize">{542, 14}</string> <reference key="NSSuperview" ref="637054939"/> + <reference key="NSWindow"/> <object class="NSTextContainer" key="NSTextContainer" id="194867362"> <object class="NSLayoutManager" key="NSLayoutManager"> <object class="NSTextStorage" key="NSTextStorage"> @@ -4134,6 +4170,7 @@ </object> <string key="NSFrame">{{1, 1}, {542, 196}}</string> <reference key="NSSuperview" ref="449863508"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="421486962"/> <reference key="NSDocView" ref="421486962"/> <reference key="NSBGColor" ref="449903125"/> @@ -4145,6 +4182,7 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{543, 1}, {11, 196}}</string> <reference key="NSSuperview" ref="449863508"/> + <reference key="NSWindow"/> <int key="NSsFlags">256</int> <reference key="NSTarget" ref="449863508"/> <string key="NSAction">_doScroller:</string> @@ -4155,6 +4193,7 @@ <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{-100, -100}, {87, 18}}</string> <reference key="NSSuperview" ref="449863508"/> + <reference key="NSWindow"/> <int key="NSsFlags">1</int> <reference key="NSTarget" ref="449863508"/> <string key="NSAction">_doScroller:</string> @@ -4164,6 +4203,7 @@ </object> <string key="NSFrame">{{96, 0}, {555, 198}}</string> <reference key="NSSuperview" ref="983998494"/> + <reference key="NSWindow"/> <reference key="NSNextKeyView" ref="637054939"/> <int key="NSsFlags">18</int> <reference key="NSVScroller" ref="633929130"/> @@ -4175,6 +4215,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{10, 184}, {81, 14}}</string> <reference key="NSSuperview" ref="983998494"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="625199500"> <int key="NSCellFlags">68288064</int> @@ -4189,11 +4230,13 @@ </object> <string key="NSFrame">{{0, 80}, {651, 198}}</string> <reference key="NSSuperview" ref="501779393"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrame">{{24, 30}, {651, 278}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <string key="NSAutosaveName">TableInfoSplitter</string> </object> <object class="NSTextField" id="459419226"> @@ -4201,6 +4244,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{79, 499}, {34, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="643775960"> <int key="NSCellFlags">68288064</int> @@ -4217,6 +4261,7 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{300, 473}, {375, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="705814774"> <int key="NSCellFlags">68288064</int> @@ -4233,6 +4278,7 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{303, 498}, {372, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="51220700"> <int key="NSCellFlags">68288064</int> @@ -4249,6 +4295,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{56, 473}, {57, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="47286035"> <int key="NSCellFlags">68288064</int> @@ -4265,6 +4312,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{57, 448}, {57, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="234890062"> <int key="NSCellFlags">68288064</int> @@ -4281,6 +4329,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{115, 494}, {161, 22}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="338551660"> <int key="NSCellFlags">-1539178944</int> @@ -4313,6 +4362,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{115, 469}, {161, 22}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="790667540"> <int key="NSCellFlags">-1539178944</int> @@ -4345,6 +4395,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{115, 444}, {161, 22}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="351231451"> <int key="NSCellFlags">-1539178944</int> @@ -4377,6 +4428,7 @@ <int key="NSvFlags">10</int> <string key="NSFrame">{{25, 425}, {650, 5}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -4399,6 +4451,7 @@ <int key="NSvFlags">10</int> <string key="NSFrame">{{24, 314}, {650, 5}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -4421,6 +4474,7 @@ <int key="NSvFlags">270</int> <string key="NSFrame">{{49, 398}, {251, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="632489290"> <int key="NSCellFlags">68288064</int> @@ -4437,6 +4491,7 @@ <int key="NSvFlags">270</int> <string key="NSFrame">{{73, 376}, {227, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="246518824"> <int key="NSCellFlags">68288064</int> @@ -4453,6 +4508,7 @@ <int key="NSvFlags">270</int> <string key="NSFrame">{{50, 354}, {250, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="738092126"> <int key="NSCellFlags">68288064</int> @@ -4469,6 +4525,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{140, 332}, {160, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="71975986"> <int key="NSCellFlags">68288064</int> @@ -4556,6 +4613,7 @@ <int key="NSvFlags">270</int> <string key="NSFrame">{{328, 398}, {347, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1035416348"> <int key="NSCellFlags">68288064</int> @@ -4572,6 +4630,7 @@ <int key="NSvFlags">270</int> <string key="NSFrame">{{304, 376}, {371, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="502320319"> <int key="NSCellFlags">68288064</int> @@ -4588,6 +4647,7 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{323, 354}, {352, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="686395978"> <int key="NSCellFlags">68288064</int> @@ -4604,6 +4664,7 @@ <int key="NSvFlags">266</int> <string key="NSFrame">{{303, 332}, {372, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="314352793"> <int key="NSCellFlags">68288064</int> @@ -4620,6 +4681,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{26, 330}, {20, 20}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSPopUpButtonCell" key="NSCell" id="342819810"> <int key="NSCellFlags">71433792</int> @@ -4693,6 +4755,7 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{53, 332}, {90, 14}}</string> <reference key="NSSuperview" ref="730602982"/> + <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="679833695"> <int key="NSCellFlags">68288064</int> @@ -4707,6 +4770,7 @@ </object> <string key="NSFrame">{{10, 7}, {706, 544}}</string> <reference key="NSSuperview" ref="714795046"/> + <reference key="NSWindow"/> </object> <string key="NSLabel">Status</string> <reference key="NSColor" ref="62854682"/> @@ -5554,11 +5618,13 @@ </object> <string key="NSFrame">{{215, 0}, {729, 550}}</string> <reference key="NSSuperview" ref="937377983"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> </object> <string key="NSFrame">{{0, -1}, {944, 550}}</string> <reference key="NSSuperview" ref="632807581"/> + <reference key="NSWindow"/> <bool key="NSIsVertical">YES</bool> <int key="NSDividerStyle">2</int> <string key="NSAutosaveName">DBViewSplitter</string> @@ -5566,6 +5632,7 @@ </object> <string key="NSFrameSize">{943, 549}</string> <reference key="NSSuperview"/> + <reference key="NSWindow"/> <string key="NSClassName">NSView</string> </object> <object class="NSWindowTemplate" id="554105051"> @@ -6153,7 +6220,7 @@ <string key="NSWindowContentMaxSize">{292, 112}</string> <string key="NSWindowContentMinSize">{292, 108}</string> <object class="NSView" key="NSWindowView" id="1034135752"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -6162,7 +6229,6 @@ <int key="NSvFlags">256</int> <string key="NSFrame">{{17, 76}, {258, 14}}</string> <reference key="NSSuperview" ref="1034135752"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="315512815"> <int key="NSCellFlags">68288064</int> @@ -6179,7 +6245,6 @@ <int key="NSvFlags">258</int> <string key="NSFrame">{{20, 50}, {252, 18}}</string> <reference key="NSSuperview" ref="1034135752"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1071800920"> <int key="NSCellFlags">-1804468671</int> @@ -6197,7 +6262,6 @@ <int key="NSvFlags">259</int> <string key="NSFrame">{{207, 13}, {70, 28}}</string> <reference key="NSSuperview" ref="1034135752"/> - <reference key="NSWindow"/> <int key="NSTag">1</int> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="991476255"> @@ -6221,7 +6285,6 @@ <int key="NSvFlags">259</int> <string key="NSFrame">{{139, 13}, {70, 28}}</string> <reference key="NSSuperview" ref="1034135752"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="103081067"> <int key="NSCellFlags">67239424</int> @@ -6240,8 +6303,6 @@ </object> </object> <string key="NSFrameSize">{292, 110}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> <string key="NSMinSize">{292, 130}</string> @@ -6870,7 +6931,7 @@ <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{213, 107}</string> <object class="NSView" key="NSWindowView" id="329225443"> <nil key="NSNextResponder"/> @@ -7150,7 +7211,7 @@ </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="734744289"> <int key="NSWindowStyleMask">1</int> @@ -7162,7 +7223,7 @@ <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{213, 107}</string> <object class="NSView" key="NSWindowView" id="234287744"> <nil key="NSNextResponder"/> @@ -7318,7 +7379,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="423199625"> <int key="NSWindowStyleMask">7</int> @@ -7328,7 +7389,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSWindowTitle">Reset Auto Increment</string> <string key="NSWindowClass">NSWindow</string> <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{255, 95}</string> <object class="NSView" key="NSWindowView" id="748618982"> <nil key="NSNextResponder"/> @@ -7491,7 +7552,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1280, 1002}}</string> <string key="NSMinSize">{255, 117}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="787219800"> <int key="NSWindowStyleMask">1</int> @@ -7501,7 +7562,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSWindowTitle">New Relation</string> <string key="NSWindowClass">NSPanel</string> <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <object class="NSView" key="NSWindowView" id="842408319"> <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -8102,7 +8163,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSFrameSize">{302, 307}</string> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="437271354"> <int key="NSWindowStyleMask">9</int> @@ -8112,7 +8173,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSWindowTitle">New Trigger</string> <string key="NSWindowClass">NSPanel</string> <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{329, 348}</string> <object class="NSView" key="NSWindowView" id="729080358"> <nil key="NSNextResponder"/> @@ -8519,7 +8580,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{329, 370}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="1066802919"> <int key="NSWindowStyleMask">3</int> @@ -8531,7 +8592,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{213, 50}</string> <object class="NSView" key="NSWindowView" id="525490268"> <nil key="NSNextResponder"/> @@ -8651,7 +8712,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> <string key="NSMinSize">{213, 72}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="553728448"> <int key="NSWindowStyleMask">9</int> @@ -8663,7 +8724,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{213, 107}</string> <object class="NSView" key="NSWindowView" id="1052076676"> <nil key="NSNextResponder"/> @@ -8798,7 +8859,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="828950706"> <int key="NSWindowStyleMask">15</int> @@ -8810,7 +8871,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{350, 200}</string> <object class="NSView" key="NSWindowView" id="749598685"> <nil key="NSNextResponder"/> @@ -9033,7 +9094,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{350, 222}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="466147946"> <int key="NSWindowStyleMask">9</int> @@ -9045,7 +9106,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <object class="NSMutableString" key="NSViewClass"> <characters key="NS.bytes">View</characters> </object> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{213, 107}</string> <object class="NSView" key="NSWindowView" id="860968037"> <nil key="NSNextResponder"/> @@ -9215,7 +9276,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string> <string key="NSMinSize">{213, 129}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSWindowTemplate" id="78186995"> <int key="NSWindowStyleMask">31</int> @@ -9225,7 +9286,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSWindowTitle">MySQL Help</string> <string key="NSWindowClass">NSPanel</string> <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{351, 120}</string> <object class="NSView" key="NSWindowView" id="539508428"> <nil key="NSNextResponder"/> @@ -9619,7 +9680,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <string key="NSScreenRect">{{0, 0}, {1280, 1002}}</string> <string key="NSMinSize">{351, 136}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSFrameAutosaveName">MYSQL_HELP_WINDOW</string> </object> <object class="NSWindowTemplate" id="434046103"> @@ -9753,7 +9814,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSWindowTitle">Secure Text Input Sheet</string> <string key="NSWindowClass">NSPanel</string> <nil key="NSViewClass"/> - <string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <object class="NSView" key="NSWindowView" id="978976687"> <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -9857,7 +9918,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSFrameSize">{338, 138}</string> </object> <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string> - <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSCustomView" id="139279766"> <nil key="NSNextResponder"/> @@ -11570,7 +11631,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSExtension">NSResponder</string> </object> <object class="NSCustomView" id="884983195"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">301</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -11696,7 +11757,6 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> </object> <string key="NSFrameSize">{269, 32}</string> - <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> </object> <object class="NSCustomView" id="730777562"> @@ -11751,7 +11811,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string key="NSColorName">disabledControlTextColor</string> <object class="NSColor" key="NSColor"> <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC4zMzMzMzMzMzMzAA</bytes> + <bytes key="NSWhite">MC4zMzMzMzMzNDMzAA</bytes> </object> </object> </object> @@ -12155,6 +12215,58 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <reference key="NSOnImage" ref="450876295"/> <reference key="NSMixedImage" ref="414351669"/> </object> + <object class="NSMenuItem" id="985474865"> + <reference key="NSMenu" ref="556141845"/> + <string key="NSTitle">Export</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + <string key="NSAction">submenuAction:</string> + <object class="NSMenu" key="NSSubmenu" id="563848996"> + <string key="NSTitle">Export</string> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="675650257"> + <reference key="NSMenu" ref="563848996"/> + <string key="NSTitle">As SQL dump...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + <int key="NSTag">1</int> + </object> + <object class="NSMenuItem" id="407752940"> + <reference key="NSMenu" ref="563848996"/> + <string key="NSTitle">As CSV file...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + <int key="NSTag">2</int> + </object> + <object class="NSMenuItem" id="980906208"> + <reference key="NSMenu" ref="563848996"/> + <string key="NSTitle">As XML file...</string> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + <int key="NSTag">3</int> + </object> + </object> + </object> + </object> + <object class="NSMenuItem" id="262885074"> + <reference key="NSMenu" ref="556141845"/> + <bool key="NSIsDisabled">YES</bool> + <bool key="NSIsSeparator">YES</bool> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <reference key="NSOnImage" ref="450876295"/> + <reference key="NSMixedImage" ref="414351669"/> + </object> <object class="NSMenuItem" id="947454058"> <reference key="NSMenu" ref="556141845"/> <string key="NSTitle">Show Create Table Syntax...</string> @@ -16793,6 +16905,30 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <int key="connectionID">7049</int> </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">exportSelectedTablesAs:</string> + <reference key="source" ref="427689665"/> + <reference key="destination" ref="675650257"/> + </object> + <int key="connectionID">7057</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">exportSelectedTablesAs:</string> + <reference key="source" ref="427689665"/> + <reference key="destination" ref="407752940"/> + </object> + <int key="connectionID">7058</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">exportSelectedTablesAs:</string> + <reference key="source" ref="427689665"/> + <reference key="destination" ref="980906208"/> + </object> + <int key="connectionID">7059</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -19471,6 +19607,8 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <reference ref="584064012"/> <reference ref="915784483"/> <reference ref="947454058"/> + <reference ref="985474865"/> + <reference ref="262885074"/> </object> <reference key="parent" ref="0"/> <string key="objectName">Table List Menu</string> @@ -23620,6 +23758,46 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <reference key="object" ref="710458678"/> <reference key="parent" ref="585162074"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">7051</int> + <reference key="object" ref="985474865"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="563848996"/> + </object> + <reference key="parent" ref="556141845"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">7052</int> + <reference key="object" ref="563848996"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="407752940"/> + <reference ref="675650257"/> + <reference ref="980906208"/> + </object> + <reference key="parent" ref="985474865"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">7053</int> + <reference key="object" ref="407752940"/> + <reference key="parent" ref="563848996"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">7054</int> + <reference key="object" ref="675650257"/> + <reference key="parent" ref="563848996"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">7055</int> + <reference key="object" ref="980906208"/> + <reference key="parent" ref="563848996"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">7056</int> + <reference key="object" ref="262885074"/> + <reference key="parent" ref="556141845"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -25048,6 +25226,13 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>7002.IBPluginDependency</string> <string>7043.IBEditorWindowLastContentRect</string> <string>7043.IBPluginDependency</string> + <string>7051.IBPluginDependency</string> + <string>7052.IBEditorWindowLastContentRect</string> + <string>7052.IBPluginDependency</string> + <string>7053.IBPluginDependency</string> + <string>7054.IBPluginDependency</string> + <string>7055.IBPluginDependency</string> + <string>7056.IBPluginDependency</string> <string>711.IBPluginDependency</string> <string>711.ImportedFromIB2</string> <string>713.IBPluginDependency</string> @@ -26502,7 +26687,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.brandonwalkin.BWToolkit</string> <string>com.brandonwalkin.BWToolkit</string> - <string>{{774, 479}, {241, 123}}</string> + <string>{{545, 532}, {241, 153}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <object class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> @@ -27097,7 +27282,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{62, 45}, {943, 549}}</string> + <string>{{300, 144}, {943, 549}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{786, 522}, {157, 63}}</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"/> @@ -27242,7 +27434,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> </object> <nil key="sourceID"/> - <int key="maxID">7049</int> + <int key="maxID">7059</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -27656,7 +27848,21 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> <object class="IBPartialClassDescription"> <string key="className">SPExportController</string> - <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPCSVExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPDotExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <string key="superclassName">NSWindowController</string> <object class="NSMutableDictionary" key="actions"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> @@ -27664,8 +27870,15 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>cancelExport:</string> <string>changeExportOutputPath:</string> <string>closeSheet:</string> + <string>refreshTableList:</string> + <string>selectDeselectAllTables:</string> <string>switchInput:</string> <string>switchTab:</string> + <string>toggleAdvancedExportOptionsView:</string> + <string>toggleCustomFilenameFormat:</string> + <string>toggleSQLIncludeContent:</string> + <string>toggleSQLIncludeDropSyntax:</string> + <string>toggleSQLIncludeStructure:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -27674,77 +27887,116 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>id</string> <string>id</string> <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>exampleNameLabel</string> + <string>customQueryInstance</string> + <string>errorsTextView</string> + <string>errorsWindow</string> + <string>exportAdvancedOptionsView</string> + <string>exportAdvancedOptionsViewButton</string> + <string>exportAdvancedOptionsViewLabelButton</string> + <string>exportButton</string> <string>exportCSVFieldsEscapedField</string> <string>exportCSVFieldsTerminatedField</string> <string>exportCSVFieldsWrappedField</string> <string>exportCSVIncludeFieldNamesCheck</string> <string>exportCSVLinesTerminatedField</string> + <string>exportCSVNULLValuesAsTextField</string> + <string>exportCompressOutputFile</string> + <string>exportCustomFilenameButton</string> + <string>exportCustomFilenameExampleTextField</string> + <string>exportCustomFilenameTokenField</string> + <string>exportCustomFilenameTokensField</string> + <string>exportCustomFilenameView</string> + <string>exportDeselectAllTablesButton</string> <string>exportExcelSheetOrFilePerTableMatrix</string> <string>exportFilePerTableCheck</string> <string>exportFilePerTableNote</string> - <string>exportHTMLIncludeHeadAndBodyTagsCheck</string> <string>exportHTMLIncludeStructureCheck</string> <string>exportInputMatrix</string> <string>exportPDFIncludeStructureCheck</string> <string>exportPathField</string> - <string>exportProcessLowMemory</string> + <string>exportProcessLowMemoryButton</string> <string>exportProgressIndicator</string> <string>exportProgressText</string> <string>exportProgressTitle</string> <string>exportProgressWindow</string> + <string>exportRefreshTablesButton</string> + <string>exportSQLBLOBFieldsAsHexCheck</string> + <string>exportSQLIncludeContentCheck</string> <string>exportSQLIncludeDropSyntaxCheck</string> <string>exportSQLIncludeErrorsCheck</string> <string>exportSQLIncludeStructureCheck</string> + <string>exportSelectAllTablesButton</string> <string>exportTabBar</string> <string>exportTableList</string> + <string>exportTableListButtonBar</string> + <string>exportTablelistScrollView</string> <string>exportToolbar</string> - <string>exportWindow</string> - <string>exportXMLIncludeStructureCheck</string> + <string>exportUseUTF8BOMButton</string> + <string>tableContentInstance</string> <string>tableDataInstance</string> <string>tableDocumentInstance</string> <string>tablesListInstance</string> - <string>tokenNameField</string> - <string>tokenNameTokensField</string> - <string>tokenNameView</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> + <string>NSTextView</string> + <string>NSWindow</string> + <string>NSView</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSComboBox</string> + <string>NSComboBox</string> + <string>NSComboBox</string> + <string>NSButton</string> + <string>NSComboBox</string> + <string>NSTextField</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSTokenField</string> + <string>NSTokenField</string> + <string>NSView</string> + <string>NSButton</string> + <string>NSMatrix</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSButton</string> + <string>NSMatrix</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSButton</string> + <string>NSProgressIndicator</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSWindow</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSTabView</string> + <string>NSTableView</string> + <string>BWAnchoredButtonBar</string> + <string>NSScrollView</string> + <string>NSToolbar</string> + <string>NSButton</string> <string>id</string> <string>id</string> <string>id</string> @@ -27757,6 +28009,41 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPExportInitializer.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPHTMLExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPPDFExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPSQLExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPXMLExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">SPExtendedTableInfo</string> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="actions"> @@ -28296,6 +28583,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>copyDatabase:</string> <string>export:</string> <string>exportMultipleTables:</string> + <string>exportSelectedTablesAs:</string> <string>exportTable:</string> <string>flushPrivileges:</string> <string>flushTable:</string> @@ -28379,6 +28667,7 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> <string>id</string> <string>id</string> <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> @@ -29190,6 +29479,14 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSMatrix</string> + <string key="superclassName">NSControl</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSMatrix.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSMenu</string> <string key="superclassName">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier" id="68662337"> @@ -29780,6 +30077,22 @@ IGRvIHlvdSB3YW50IHRvIGFkZCBmb3IgdGhpcyBmaWVsZD8</string> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSTokenField</string> + <string key="superclassName">NSTextField</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSTokenField.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSToolbar</string> + <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSToolbar.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSTreeController</string> <string key="superclassName">NSObjectController</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> diff --git a/Interfaces/English.lproj/ExportDialog.xib b/Interfaces/English.lproj/ExportDialog.xib index 3fe193b3..7280a41a 100644 --- a/Interfaces/English.lproj/ExportDialog.xib +++ b/Interfaces/English.lproj/ExportDialog.xib @@ -2,20 +2,30 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10C540</string> - <string key="IBDocument.InterfaceBuilderVersion">740</string> - <string key="IBDocument.AppKitVersion">1038.25</string> - <string key="IBDocument.HIToolboxVersion">458.00</string> + <string key="IBDocument.SystemVersion">10D573</string> + <string key="IBDocument.InterfaceBuilderVersion">762</string> + <string key="IBDocument.AppKitVersion">1038.29</string> + <string key="IBDocument.HIToolboxVersion">460.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> - <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">740</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>762</string> + <string>1.2.5</string> + </object> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="70"/> + <integer value="3"/> </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,10 +49,10 @@ <string key="NSClassName">NSApplication</string> </object> <object class="NSWindowTemplate" id="834889278"> - <int key="NSWindowStyleMask">4103</int> + <int key="NSWindowStyleMask">4111</int> <int key="NSWindowBacking">2</int> - <string key="NSWindowRect">{{196, 53}, {450, 442}}</string> - <int key="NSWTFlags">603980800</int> + <string key="NSWindowRect">{{610, 309}, {450, 462}}</string> + <int key="NSWTFlags">611845120</int> <string key="NSWindowTitle">Export</string> <string key="NSWindowClass">NSWindow</string> <object class="NSToolbar" key="NSViewClass" id="798928663"> @@ -60,70 +70,24 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>71D44334-3FBC-45B1-B724-01DC3CF04BC0</string> - <string>8029B183-E568-4575-BF79-8BF794BC1220</string> - <string>B32841E9-2134-410A-847B-50A6C9EDC7D3</string> + <string>03BD47C1-9B50-40D4-A080-1A484AE7E779</string> <string>D1BEB476-6BC7-4EC6-B7A0-34E53F5FE278</string> <string>F3AE5F30-CB07-4A72-A032-5479D912598E</string> <string>FDB9B04C-C512-4453-833E-DBA4C5716E3E</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSToolbarItem" id="403938115"> + <object class="NSToolbarItem" id="810639654"> <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">71D44334-3FBC-45B1-B724-01DC3CF04BC0</characters> + <characters key="NS.bytes">03BD47C1-9B50-40D4-A080-1A484AE7E779</characters> </object> - <string key="NSToolbarItemLabel">HTML</string> - <string key="NSToolbarItemPaletteLabel">HTML</string> + <string key="NSToolbarItemLabel">Dot</string> + <string key="NSToolbarItemPaletteLabel">Dot</string> <string key="NSToolbarItemToolTip"/> <nil key="NSToolbarItemView"/> - <object class="NSCustomResource" key="NSToolbarItemImage"> + <object class="NSCustomResource" key="NSToolbarItemImage" id="193685631"> <string key="NSClassName">NSImage</string> - <string key="NSResourceName">toolbar-export-html</string> - </object> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{0, 0}</string> - <string key="NSToolbarItemMaxSize">{0, 0}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">5</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - <object class="NSToolbarItem" id="913250734"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">8029B183-E568-4575-BF79-8BF794BC1220</characters> - </object> - <string key="NSToolbarItemLabel">PDF</string> - <string key="NSToolbarItemPaletteLabel">PDF</string> - <string key="NSToolbarItemToolTip"/> - <nil key="NSToolbarItemView"/> - <object class="NSCustomResource" key="NSToolbarItemImage"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">toolbar-export-pdf</string> - </object> - <nil key="NSToolbarItemTarget"/> - <nil key="NSToolbarItemAction"/> - <string key="NSToolbarItemMinSize">{0, 0}</string> - <string key="NSToolbarItemMaxSize">{0, 0}</string> - <bool key="NSToolbarItemEnabled">YES</bool> - <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">4</int> - <bool key="NSToolbarIsUserRemovable">YES</bool> - <int key="NSToolbarItemVisibilityPriority">0</int> - </object> - <object class="NSToolbarItem" id="229922660"> - <object class="NSMutableString" key="NSToolbarItemIdentifier"> - <characters key="NS.bytes">B32841E9-2134-410A-847B-50A6C9EDC7D3</characters> - </object> - <string key="NSToolbarItemLabel">Excel</string> - <string key="NSToolbarItemPaletteLabel">Excel</string> - <string key="NSToolbarItemToolTip"/> - <nil key="NSToolbarItemView"/> - <object class="NSCustomResource" key="NSToolbarItemImage"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">toolbar-export-xls</string> + <string key="NSResourceName">toolbar-export-xml</string> </object> <nil key="NSToolbarItemTarget"/> <nil key="NSToolbarItemAction"/> @@ -131,7 +95,7 @@ <string key="NSToolbarItemMaxSize">{0, 0}</string> <bool key="NSToolbarItemEnabled">YES</bool> <bool key="NSToolbarItemAutovalidates">YES</bool> - <int key="NSToolbarItemTag">6</int> + <int key="NSToolbarItemTag">7</int> <bool key="NSToolbarIsUserRemovable">YES</bool> <int key="NSToolbarItemVisibilityPriority">0</int> </object> @@ -143,10 +107,7 @@ <string key="NSToolbarItemPaletteLabel">XML</string> <string key="NSToolbarItemToolTip"/> <nil key="NSToolbarItemView"/> - <object class="NSCustomResource" key="NSToolbarItemImage"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">toolbar-export-xml</string> - </object> + <reference key="NSToolbarItemImage" ref="193685631"/> <nil key="NSToolbarItemTarget"/> <nil key="NSToolbarItemAction"/> <string key="NSToolbarItemMinSize">{0, 0}</string> @@ -206,26 +167,23 @@ <object class="NSArray" key="NSToolbarIBAllowedItems"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="210788200"/> - <reference ref="229922660"/> <reference ref="669858692"/> - <reference ref="403938115"/> <reference ref="293460904"/> - <reference ref="913250734"/> + <reference ref="810639654"/> </object> <object class="NSMutableArray" key="NSToolbarIBDefaultItems"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="210788200"/> - <reference ref="229922660"/> <reference ref="669858692"/> - <reference ref="403938115"/> <reference ref="293460904"/> - <reference ref="913250734"/> + <reference ref="810639654"/> </object> <object class="NSMutableArray" key="NSToolbarIBSelectableItems"> <bool key="EncodedWithXMLCoder">YES</bool> </object> </object> <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMinSize">{450, 462}</string> <object class="NSView" key="NSWindowView" id="13817034"> <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> @@ -233,7 +191,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSScrollView" id="146073124"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">4364</int> + <int key="NSvFlags">4370</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSClipView" id="699376732"> @@ -244,32 +202,46 @@ <object class="NSTableView" id="764715003"> <reference key="NSNextResponder" ref="699376732"/> <int key="NSvFlags">4352</int> - <string key="NSFrameSize">{158, 228}</string> + <string key="NSFrameSize">{179, 212}</string> <reference key="NSSuperview" ref="699376732"/> - <object class="_NSCornerView" key="NSCornerView"> - <nil key="NSNextResponder"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTableHeaderView" key="NSHeaderView" id="841775738"> + <reference key="NSNextResponder" ref="1039724992"/> + <int key="NSvFlags">256</int> + <string key="NSFrameSize">{179, 17}</string> + <reference key="NSSuperview" ref="1039724992"/> + <reference key="NSTableView" ref="764715003"/> + </object> + <object class="_NSCornerView" key="NSCornerView" id="1038157658"> + <reference key="NSNextResponder" ref="146073124"/> <int key="NSvFlags">-2147483392</int> <string key="NSFrame">{{144, 0}, {16, 17}}</string> + <reference key="NSSuperview" ref="146073124"/> </object> <object class="NSMutableArray" key="NSTableColumns"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTableColumn" id="328674682"> - <string key="NSIdentifier">switch</string> - <double key="NSWidth">15</double> - <double key="NSMinWidth">15</double> + <object class="NSTableColumn" id="740868294"> + <string key="NSIdentifier">tables</string> + <double key="NSWidth">122</double> + <double key="NSMinWidth">10</double> <double key="NSMaxWidth">1000</double> <object class="NSTableHeaderCell" key="NSHeaderCell"> - <int key="NSCellFlags">612499008</int> + <int key="NSCellFlags">75628096</int> <int key="NSCellFlags2">2048</int> - <string key="NSContents"/> + <string key="NSContents">Table</string> <object class="NSFont" key="NSSupport" id="26"> <string key="NSName">LucidaGrande</string> <double key="NSSize">11</double> <int key="NSfFlags">3100</int> </object> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes> + <object class="NSColor" key="NSBackgroundColor" id="36943978"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">headerColor</string> + <object class="NSColor" key="NSColor" id="628696263"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MQA</bytes> + </object> </object> <object class="NSColor" key="NSTextColor" id="427965303"> <int key="NSColorSpace">6</int> @@ -281,15 +253,56 @@ </object> </object> </object> - <object class="NSButtonCell" key="NSDataCell" id="1032230614"> - <int key="NSCellFlags">604110336</int> + <object class="NSTextFieldCell" key="NSDataCell" id="1035121450"> + <int key="NSCellFlags">67239488</int> + <int key="NSCellFlags2">133120</int> + <string key="NSContents">Text Cell</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="764715003"/> + <bool key="NSDrawsBackground">YES</bool> + <int key="NSTextBezelStyle">1</int> + <object class="NSColor" key="NSBackgroundColor" id="985041161"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlBackgroundColor</string> + <object class="NSColor" key="NSColor" id="1056664274"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> + </object> + </object> + <object class="NSColor" key="NSTextColor" id="804867667"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">controlTextColor</string> + <reference key="NSColor" ref="881778134"/> + </object> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <reference key="NSTableView" ref="764715003"/> + </object> + <object class="NSTableColumn" id="724109118"> + <string key="NSIdentifier">structure</string> + <double key="NSWidth">15</double> + <double key="NSMinWidth">15</double> + <double key="NSMaxWidth">15</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628096</int> + <int key="NSCellFlags2">2048</int> + <string key="NSContents">S</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSBackgroundColor" ref="36943978"/> + <reference key="NSTextColor" ref="427965303"/> + </object> + <object class="NSButtonCell" key="NSDataCell" id="309149890"> + <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">131072</int> - <string key="NSContents"/> + <string key="NSContents">Check</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="764715003"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <object class="NSCustomResource" key="NSNormalImage" id="626209438"> + <object class="NSCustomResource" key="NSNormalImage" id="748859800"> <string key="NSClassName">NSImage</string> <string key="NSResourceName">NSSwitch</string> </object> @@ -306,53 +319,70 @@ <bool key="NSIsEditable">YES</bool> <reference key="NSTableView" ref="764715003"/> </object> - <object class="NSTableColumn" id="740868294"> - <string key="NSIdentifier">tables</string> - <double key="NSWidth">137</double> - <double key="NSMinWidth">10</double> - <double key="NSMaxWidth">3.4028230607370965e+38</double> + <object class="NSTableColumn" id="853645728"> + <string key="NSIdentifier">content</string> + <double key="NSWidth">15</double> + <double key="NSMinWidth">15</double> + <double key="NSMaxWidth">15</double> <object class="NSTableHeaderCell" key="NSHeaderCell"> - <int key="NSCellFlags">612499008</int> + <int key="NSCellFlags">75628096</int> <int key="NSCellFlags2">2048</int> - <string key="NSContents"/> + <string key="NSContents">C</string> <reference key="NSSupport" ref="26"/> - <object class="NSColor" key="NSBackgroundColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">headerColor</string> - <object class="NSColor" key="NSColor" id="628696263"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MQA</bytes> - </object> - </object> + <reference key="NSBackgroundColor" ref="36943978"/> <reference key="NSTextColor" ref="427965303"/> </object> - <object class="NSTextFieldCell" key="NSDataCell" id="1035121450"> - <int key="NSCellFlags">604110400</int> - <int key="NSCellFlags2">133120</int> - <string key="NSContents">Text Cell</string> + <object class="NSButtonCell" key="NSDataCell" id="625807336"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Check</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="764715003"/> - <bool key="NSDrawsBackground">YES</bool> - <int key="NSTextBezelStyle">1</int> - <object class="NSColor" key="NSBackgroundColor" id="985041161"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlBackgroundColor</string> - <object class="NSColor" key="NSColor" id="1056664274"> - <int key="NSColorSpace">3</int> - <bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes> - </object> - </object> - <object class="NSColor" key="NSTextColor"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">selectedInactiveColor</string> - <reference key="NSColor" ref="1056664274"/> - </object> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + <int key="NSResizingMask">3</int> + <bool key="NSIsResizeable">YES</bool> + <bool key="NSIsEditable">YES</bool> + <reference key="NSTableView" ref="764715003"/> + </object> + <object class="NSTableColumn" id="767168164"> + <string key="NSIdentifier">drop</string> + <double key="NSWidth">15</double> + <double key="NSMinWidth">15</double> + <double key="NSMaxWidth">15</double> + <object class="NSTableHeaderCell" key="NSHeaderCell"> + <int key="NSCellFlags">75628096</int> + <int key="NSCellFlags2">2048</int> + <string key="NSContents">D</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSBackgroundColor" ref="36943978"/> + <reference key="NSTextColor" ref="427965303"/> + </object> + <object class="NSButtonCell" key="NSDataCell" id="145269483"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Check</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="764715003"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> </object> <int key="NSResizingMask">3</int> <bool key="NSIsResizeable">YES</bool> + <bool key="NSIsEditable">YES</bool> <reference key="NSTableView" ref="764715003"/> </object> </object> @@ -372,14 +402,14 @@ <int key="NSTvFlags">306184192</int> <reference key="NSDelegate"/> <reference key="NSDataSource"/> - <int key="NSColumnAutoresizingStyle">4</int> + <int key="NSColumnAutoresizingStyle">5</int> <int key="NSDraggingSourceMaskForLocal">15</int> <int key="NSDraggingSourceMaskForNonLocal">0</int> <bool key="NSAllowsTypeSelect">YES</bool> <int key="NSTableViewDraggingDestinationStyle">0</int> </object> </object> - <string key="NSFrame">{{1, 1}, {158, 228}}</string> + <string key="NSFrame">{{1, 17}, {179, 212}}</string> <reference key="NSSuperview" ref="146073124"/> <reference key="NSNextKeyView" ref="764715003"/> <reference key="NSDocView" ref="764715003"/> @@ -394,7 +424,7 @@ <int key="NSsFlags">256</int> <reference key="NSTarget" ref="146073124"/> <string key="NSAction">_doScroller:</string> - <double key="NSPercent">0.99563318490982056</double> + <double key="NSPercent">0.99530518054962158</double> </object> <object class="NSScroller" id="697059257"> <reference key="NSNextResponder" ref="146073124"/> @@ -406,20 +436,37 @@ <string key="NSAction">_doScroller:</string> <double key="NSPercent">0.99479168653488159</double> </object> + <object class="NSClipView" id="1039724992"> + <reference key="NSNextResponder" ref="146073124"/> + <int key="NSvFlags">2304</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="841775738"/> + </object> + <string key="NSFrame">{{1, 0}, {179, 17}}</string> + <reference key="NSSuperview" ref="146073124"/> + <reference key="NSNextKeyView" ref="841775738"/> + <reference key="NSDocView" ref="841775738"/> + <reference key="NSBGColor" ref="985041161"/> + <int key="NScvFlags">4</int> + </object> + <reference ref="1038157658"/> </object> - <string key="NSFrame">{{40, 82}, {160, 230}}</string> + <string key="NSFrame">{{40, 102}, {181, 230}}</string> <reference key="NSSuperview" ref="13817034"/> <reference key="NSNextKeyView" ref="699376732"/> <int key="NSsFlags">530</int> <reference key="NSVScroller" ref="76994346"/> <reference key="NSHScroller" ref="697059257"/> <reference key="NSContentView" ref="699376732"/> + <reference key="NSHeaderClipView" ref="1039724992"/> + <reference key="NSCornerView" ref="1038157658"/> <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes> </object> <object class="NSMatrix" id="461208343"> <reference key="NSNextResponder" ref="13817034"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{20, 318}, {104, 64}}</string> + <string key="NSFrame">{{20, 338}, {104, 64}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <int key="NSNumRows">3</int> @@ -427,7 +474,7 @@ <object class="NSMutableArray" key="NSCells"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSButtonCell" id="834864641"> - <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">131072</int> <string key="NSContents">Filtered Results</string> <reference key="NSSupport" ref="26"/> @@ -446,7 +493,7 @@ <object class="NSButtonCell" id="380916479"> <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">131072</int> - <string key="NSContents">Custom Query</string> + <string key="NSContents">Query Results</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="461208343"/> <int key="NSTag">2</int> @@ -515,7 +562,7 @@ ZSwgSW5jLiwgMjAwOQA</bytes> <int key="NSPeriodicInterval">75</int> </object> <object class="NSButtonCell" id="351307111"> - <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags">-2080244224</int> <int key="NSCellFlags2">131072</int> <string key="NSContents">Selected Tables</string> <reference key="NSSupport" ref="26"/> @@ -631,7 +678,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSPeriodicDelay">400</int> <int key="NSPeriodicInterval">75</int> </object> - <reference key="NSSelectedCell" ref="834864641"/> + <int key="NSSelectedRow">2</int> + <reference key="NSSelectedCell" ref="351307111"/> <object class="NSColor" key="NSBackgroundColor" id="683790803"> <int key="NSColorSpace">6</int> <string key="NSCatalogName">System</string> @@ -647,22 +695,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTabView" id="281488100"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">12</int> - <string key="NSFrame">{{204, 78}, {230, 236}}</string> + <int key="NSvFlags">17</int> + <string key="NSFrame">{{225, 76}, {209, 259}}</string> <reference key="NSSuperview" ref="13817034"/> <object class="NSMutableArray" key="NSTabViewItems"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSTabViewItem" id="838824691"> <string key="NSIdentifier">sql</string> <object class="NSView" key="NSView" id="382068224"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder" ref="281488100"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSButton" id="731343097"> <reference key="NSNextResponder" ref="382068224"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 163}, {71, 18}}</string> + <string key="NSFrame">{{12, 186}, {71, 18}}</string> <reference key="NSSuperview" ref="382068224"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="1020259366"> @@ -673,7 +721,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSControlView" ref="731343097"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> + <reference key="NSNormalImage" ref="748859800"/> <reference key="NSAlternateImage" ref="506551266"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> @@ -684,7 +732,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="877523146"> <reference key="NSNextResponder" ref="382068224"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 187}, {53, 14}}</string> + <string key="NSFrame">{{12, 210}, {47, 14}}</string> <reference key="NSSuperview" ref="382068224"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="205672117"> @@ -694,29 +742,40 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="877523146"/> <reference key="NSBackgroundColor" ref="683790803"/> - <object class="NSColor" key="NSTextColor" id="804867667"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">controlTextColor</string> - <reference key="NSColor" ref="881778134"/> - </object> + <reference key="NSTextColor" ref="804867667"/> + </object> + </object> + <object class="NSTextField" id="141941824"> + <reference key="NSNextResponder" ref="382068224"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{12, 106}, {60, 14}}</string> + <reference key="NSSuperview" ref="382068224"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="774106879"> + <int key="NSCellFlags">68288064</int> + <int key="NSCellFlags2">272761856</int> + <string key="NSContents">Advanced:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="141941824"/> + <reference key="NSBackgroundColor" ref="683790803"/> + <reference key="NSTextColor" ref="804867667"/> </object> </object> <object class="NSButton" id="198253168"> <reference key="NSNextResponder" ref="382068224"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 143}, {152, 18}}</string> + <string key="NSFrame">{{12, 146}, {127, 18}}</string> <reference key="NSSuperview" ref="382068224"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="68620442"> <int key="NSCellFlags">-2080244224</int> <int key="NSCellFlags2">131072</int> - <string key="NSContents">Add DROP TABLE syntax</string> + <string key="NSContents">DROP TABLE syntax</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="198253168"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> + <reference key="NSNormalImage" ref="748859800"/> <reference key="NSAlternateImage" ref="506551266"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> @@ -727,18 +786,106 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSButton" id="441912484"> <reference key="NSNextResponder" ref="382068224"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 123}, {79, 18}}</string> + <string key="NSFrame">{{12, 126}, {79, 18}}</string> <reference key="NSSuperview" ref="382068224"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="785342232"> - <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags">67239424</int> <int key="NSCellFlags2">131072</int> - <string key="NSContents">Add errors</string> + <string key="NSContents">Errors</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="441912484"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="630339954"> + <reference key="NSNextResponder" ref="382068224"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{12, 166}, {71, 18}}</string> + <reference key="NSSuperview" ref="382068224"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="774438954"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Content</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="630339954"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="546063322"> + <reference key="NSNextResponder" ref="382068224"/> + <int key="NSvFlags">292</int> + <string key="NSFrame">{{12, 62}, {162, 18}}</string> + <reference key="NSSuperview" ref="382068224"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="708524486"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Add UTF-8 BOM to output</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="546063322"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="271088881"> + <reference key="NSNextResponder" ref="382068224"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{12, 82}, {149, 18}}</string> + <reference key="NSSuperview" ref="382068224"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="415134766"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Compress output (gzip)</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="271088881"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="926831065"> + <reference key="NSNextResponder" ref="382068224"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{12, 42}, {161, 18}}</string> + <reference key="NSSuperview" ref="382068224"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="806770339"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Output BLOB fields as hex</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="926831065"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> <reference key="NSAlternateImage" ref="506551266"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> @@ -747,7 +894,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> </object> - <string key="NSFrame">{{10, 7}, {210, 216}}</string> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> + <reference key="NSSuperview" ref="281488100"/> </object> <string key="NSLabel">SQL</string> <reference key="NSColor" ref="683790803"/> @@ -756,14 +904,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTabViewItem" id="123003565"> <string key="NSIdentifier">excel</string> <object class="NSView" key="NSView" id="25647340"> - <reference key="NSNextResponder" ref="281488100"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMatrix" id="652697687"> <reference key="NSNextResponder" ref="25647340"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 103}, {106, 100}}</string> + <string key="NSFrame">{{14, 126}, {106, 100}}</string> <reference key="NSSuperview" ref="25647340"/> <bool key="NSEnabled">YES</bool> <int key="NSNumRows">2</int> @@ -955,7 +1103,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="1056634802"> <reference key="NSNextResponder" ref="25647340"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{30, 134}, {168, 42}}</string> + <string key="NSFrame">{{33, 157}, {154, 42}}</string> <reference key="NSSuperview" ref="25647340"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="384626655"> @@ -971,7 +1119,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="535011943"> <reference key="NSNextResponder" ref="25647340"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{30, 53}, {168, 42}}</string> + <string key="NSFrame">{{33, 76}, {154, 42}}</string> <reference key="NSSuperview" ref="25647340"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1024792696"> @@ -985,8 +1133,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> </object> - <string key="NSFrame">{{10, 7}, {210, 216}}</string> - <reference key="NSSuperview" ref="281488100"/> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> </object> <string key="NSLabel">Excel</string> <reference key="NSColor" ref="683790803"/> @@ -1002,7 +1149,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="950939791"> <reference key="NSNextResponder" ref="1070450836"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 153}, {39, 14}}</string> + <string key="NSFrame">{{5, 188}, {39, 14}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="644015011"> @@ -1018,7 +1165,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="160644853"> <reference key="NSNextResponder" ref="1070450836"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 39}, {36, 14}}</string> + <string key="NSFrame">{{5, 89}, {36, 14}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="520465958"> @@ -1033,8 +1180,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTextField" id="761422017"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{52, 100}, {31, 17}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{46, 135}, {31, 17}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="981404752"> @@ -1049,8 +1196,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTextField" id="305163269"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{52, 125}, {59, 17}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{46, 160}, {59, 17}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="925997909"> @@ -1065,8 +1212,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSComboBox" id="143565304"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 124}, {36, 22}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{8, 159}, {36, 22}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSComboBoxCell" key="NSCell" id="248691168"> @@ -1157,8 +1304,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSComboBox" id="679049124"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{14, 99}, {36, 22}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{8, 134}, {36, 22}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSComboBoxCell" key="NSCell" id="493923791"> @@ -1239,8 +1386,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSComboBox" id="356426114"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">257</int> - <string key="NSFrame">{{14, 72}, {36, 22}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{8, 107}, {36, 22}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSComboBoxCell" key="NSCell" id="481808513"> @@ -1321,8 +1468,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTextField" id="583445202"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">257</int> - <string key="NSFrame">{{52, 73}, {41, 17}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{46, 108}, {41, 17}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="1057505982"> @@ -1337,8 +1484,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSComboBox" id="580324622"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">257</int> - <string key="NSFrame">{{14, 10}, {36, 22}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{8, 60}, {36, 22}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSComboBoxCell" key="NSCell" id="43655354"> @@ -1420,8 +1567,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTextField" id="825977807"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">257</int> - <string key="NSFrame">{{52, 11}, {59, 17}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{46, 61}, {59, 17}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="360561902"> @@ -1436,8 +1583,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSButton" id="737096774"> <reference key="NSNextResponder" ref="1070450836"/> - <int key="NSvFlags">256</int> - <string key="NSFrame">{{11, 185}, {172, 18}}</string> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{5, 208}, {172, 18}}</string> <reference key="NSSuperview" ref="1070450836"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="909572165"> @@ -1455,8 +1602,46 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSPeriodicInterval">25</int> </object> </object> + <object class="NSTextField" id="734041147"> + <reference key="NSNextResponder" ref="1070450836"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{5, 39}, {88, 14}}</string> + <reference key="NSSuperview" ref="1070450836"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="893875441"> + <int key="NSCellFlags">68288064</int> + <int key="NSCellFlags2">272761856</int> + <string key="NSContents">NULL values:</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="734041147"/> + <reference key="NSBackgroundColor" ref="683790803"/> + <reference key="NSTextColor" ref="804867667"/> + </object> + </object> + <object class="NSTextField" id="676012428"> + <reference key="NSNextResponder" ref="1070450836"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{8, 12}, {55, 19}}</string> + <reference key="NSSuperview" ref="1070450836"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="240212124"> + <int key="NSCellFlags">-1804468671</int> + <int key="NSCellFlags2">272761856</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="676012428"/> + <bool key="NSDrawsBackground">YES</bool> + <reference key="NSBackgroundColor" ref="895047516"/> + <object class="NSColor" key="NSTextColor" id="876496808"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">textColor</string> + <reference key="NSColor" ref="881778134"/> + </object> + </object> + </object> </object> - <string key="NSFrame">{{10, 7}, {210, 216}}</string> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> </object> <string key="NSLabel">CSV</string> <reference key="NSColor" ref="683790803"/> @@ -1472,7 +1657,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSButton" id="703173775"> <reference key="NSNextResponder" ref="40362368"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 163}, {71, 18}}</string> + <string key="NSFrame">{{12, 186}, {71, 18}}</string> <reference key="NSSuperview" ref="40362368"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="942009058"> @@ -1483,7 +1668,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSControlView" ref="703173775"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> + <reference key="NSNormalImage" ref="748859800"/> <reference key="NSAlternateImage" ref="506551266"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> @@ -1494,7 +1679,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="897740627"> <reference key="NSNextResponder" ref="40362368"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 187}, {53, 14}}</string> + <string key="NSFrame">{{11, 210}, {53, 14}}</string> <reference key="NSSuperview" ref="40362368"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="119708041"> @@ -1507,30 +1692,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSTextColor" ref="804867667"/> </object> </object> - <object class="NSButton" id="801783385"> - <reference key="NSNextResponder" ref="40362368"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 143}, {163, 18}}</string> - <reference key="NSSuperview" ref="40362368"/> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="43814065"> - <int key="NSCellFlags">-2080244224</int> - <int key="NSCellFlags2">131072</int> - <string key="NSContents"><head> and <body> tags</string> - <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="801783385"/> - <int key="NSButtonFlags">1211912703</int> - <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> - <reference key="NSAlternateImage" ref="506551266"/> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">200</int> - <int key="NSPeriodicInterval">25</int> - </object> - </object> </object> - <string key="NSFrame">{{10, 7}, {210, 216}}</string> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> </object> <string key="NSLabel">HTML</string> <reference key="NSColor" ref="683790803"/> @@ -1541,48 +1704,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSView" key="NSView" id="1008336044"> <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> - <object class="NSMutableArray" key="NSSubviews"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSButton" id="1041304932"> - <reference key="NSNextResponder" ref="1008336044"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 163}, {71, 18}}</string> - <reference key="NSSuperview" ref="1008336044"/> - <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="391668479"> - <int key="NSCellFlags">-2080244224</int> - <int key="NSCellFlags2">131072</int> - <string key="NSContents">Structure</string> - <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="1041304932"/> - <int key="NSButtonFlags">1211912703</int> - <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> - <reference key="NSAlternateImage" ref="506551266"/> - <string key="NSAlternateContents"/> - <string key="NSKeyEquivalent"/> - <int key="NSPeriodicDelay">200</int> - <int key="NSPeriodicInterval">25</int> - </object> - </object> - <object class="NSTextField" id="400758917"> - <reference key="NSNextResponder" ref="1008336044"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 187}, {53, 14}}</string> - <reference key="NSSuperview" ref="1008336044"/> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="109221843"> - <int key="NSCellFlags">68288064</int> - <int key="NSCellFlags2">272761856</int> - <string key="NSContents">Include:</string> - <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="400758917"/> - <reference key="NSBackgroundColor" ref="683790803"/> - <reference key="NSTextColor" ref="804867667"/> - </object> - </object> - </object> - <string key="NSFrame">{{10, 7}, {210, 216}}</string> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> </object> <string key="NSLabel">XML</string> <reference key="NSColor" ref="683790803"/> @@ -1598,7 +1720,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSButton" id="808186669"> <reference key="NSNextResponder" ref="316748837"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{12, 163}, {71, 18}}</string> + <string key="NSFrame">{{12, 186}, {71, 18}}</string> <reference key="NSSuperview" ref="316748837"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="479791891"> @@ -1609,7 +1731,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSControlView" ref="808186669"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> + <reference key="NSNormalImage" ref="748859800"/> <reference key="NSAlternateImage" ref="506551266"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> @@ -1620,7 +1742,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="460939794"> <reference key="NSNextResponder" ref="316748837"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{11, 187}, {53, 14}}</string> + <string key="NSFrame">{{11, 210}, {53, 14}}</string> <reference key="NSSuperview" ref="316748837"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="44269431"> @@ -1634,26 +1756,37 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> </object> - <string key="NSFrame">{{10, 7}, {210, 216}}</string> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> </object> <string key="NSLabel">PDF</string> <reference key="NSColor" ref="683790803"/> <reference key="NSTabView" ref="281488100"/> </object> + <object class="NSTabViewItem" id="757271668"> + <string key="NSIdentifier">dot</string> + <object class="NSView" key="NSView" id="1063181117"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{10, 7}, {189, 239}}</string> + </object> + <string key="NSLabel">Dot</string> + <reference key="NSColor" ref="683790803"/> + <reference key="NSTabView" ref="281488100"/> + </object> </object> - <reference key="NSSelectedTabViewItem" ref="123003565"/> + <reference key="NSSelectedTabViewItem" ref="838824691"/> <reference key="NSFont" ref="695505032"/> <int key="NSTvFlags">4</int> <bool key="NSAllowTruncatedLabels">YES</bool> <bool key="NSDrawsBackground">YES</bool> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="25647340"/> + <reference ref="382068224"/> </object> </object> <object class="NSButton" id="413491970"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> + <int key="NSvFlags">289</int> <string key="NSFrame">{{340, 12}, {96, 32}}</string> <reference key="NSSuperview" ref="13817034"/> <int key="NSTag">1</int> @@ -1674,8 +1807,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSButton" id="282243488"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{34, 12}, {96, 32}}</string> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{248, 12}, {96, 32}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="894787287"> @@ -1692,10 +1825,99 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSPeriodicInterval">25</int> </object> </object> + <object class="NSCustomView" id="26669445"> + <reference key="NSNextResponder" ref="13817034"/> + <int key="NSvFlags">-2147483358</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSBox" id="202734849"> + <reference key="NSNextResponder" ref="26669445"/> + <int key="NSvFlags">34</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSView" id="137697876"> + <reference key="NSNextResponder" ref="202734849"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSButton" id="476368749"> + <reference key="NSNextResponder" ref="137697876"/> + <int key="NSvFlags">292</int> + <string key="NSFrame">{{10, 12}, {230, 18}}</string> + <reference key="NSSuperview" ref="137697876"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="476592342"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">Low memory export (may block server)</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="476368749"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + </object> + <string key="NSFrame">{{1, 1}, {394, 40}}</string> + <reference key="NSSuperview" ref="202734849"/> + </object> + </object> + <string key="NSFrame">{{-3, -4}, {396, 42}}</string> + <reference key="NSSuperview" ref="26669445"/> + <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="895047516"/> + <object class="NSColor" key="NSTextColor"> + <int key="NSColorSpace">3</int> + <bytes key="NSWhite">MCAwLjgwMDAwMDAxMTkAA</bytes> + </object> + </object> + <reference key="NSContentView" ref="137697876"/> + <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="1030775352"> + <reference key="NSNextResponder" ref="26669445"/> + <int key="NSvFlags">268</int> + <string key="NSFrame">{{-103, 10}, {100, 18}}</string> + <reference key="NSSuperview" ref="26669445"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="439649364"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">131072</int> + <string key="NSContents">LOW_PRIORITY</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="1030775352"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + </object> + <string key="NSFrame">{{40, 9}, {390, 36}}</string> + <reference key="NSSuperview" ref="13817034"/> + <string key="NSClassName">NSView</string> + </object> <object class="NSButton" id="369079615"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{226, 366}, {116, 18}}</string> + <int key="NSvFlags">-2147483380</int> + <string key="NSFrame">{{226, 386}, {116, 18}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="178831648"> @@ -1706,7 +1928,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSControlView" ref="369079615"/> <int key="NSButtonFlags">1211912703</int> <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> + <reference key="NSNormalImage" ref="748859800"/> <reference key="NSAlternateImage" ref="506551266"/> <string key="NSAlternateContents"/> <string key="NSKeyEquivalent"/> @@ -1716,8 +1938,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTextField" id="400864496"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{246, 321}, {168, 42}}</string> + <int key="NSvFlags">-2147483380</int> + <string key="NSFrame">{{246, 341}, {187, 42}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="307652756"> @@ -1733,7 +1955,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="611574536"> <reference key="NSNextResponder" ref="13817034"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 408}, {31, 14}}</string> + <string key="NSFrame">{{17, 428}, {31, 14}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="796139238"> @@ -1748,8 +1970,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSTextField" id="64452171"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{53, 406}, {285, 19}}</string> + <int key="NSvFlags">266</int> + <string key="NSFrame">{{53, 426}, {285, 19}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="527565829"> @@ -1760,18 +1982,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSControlView" ref="64452171"/> <bool key="NSDrawsBackground">YES</bool> <reference key="NSBackgroundColor" ref="895047516"/> - <object class="NSColor" key="NSTextColor" id="876496808"> - <int key="NSColorSpace">6</int> - <string key="NSCatalogName">System</string> - <string key="NSColorName">textColor</string> - <reference key="NSColor" ref="881778134"/> - </object> + <reference key="NSTextColor" ref="876496808"/> </object> </object> <object class="NSBox" id="274673761"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">12</int> - <string key="NSFrame">{{20, 395}, {410, 5}}</string> + <int key="NSvFlags">10</int> + <string key="NSFrame">{{20, 415}, {410, 5}}</string> <reference key="NSSuperview" ref="13817034"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> @@ -1792,8 +2009,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="NSButton" id="161881306"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{341, 400}, {94, 28}}</string> + <int key="NSvFlags">265</int> + <string key="NSFrame">{{341, 420}, {94, 28}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="36759303"> @@ -1810,70 +2027,185 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSButton" id="1061456880"> + <object class="BWAnchoredButtonBar" id="465200239"> <reference key="NSNextResponder" ref="13817034"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{37, 58}, {230, 18}}</string> + <int key="NSvFlags">290</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="BWAnchoredButton" id="21358371"> + <reference key="NSNextResponder" ref="465200239"/> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{118, 0}, {32, 24}}</string> + <reference key="NSSuperview" ref="465200239"/> + <bool key="NSEnabled">YES</bool> + <object class="BWAnchoredButtonCell" key="NSCell" id="908054831"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="21358371"/> + <int key="NSButtonFlags">113524991</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">selectnone</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="BWAnchoredButton" id="412411133"> + <reference key="NSNextResponder" ref="465200239"/> + <int key="NSvFlags">289</int> + <string key="NSFrame">{{149, 0}, {32, 24}}</string> + <reference key="NSSuperview" ref="465200239"/> + <int key="NSTag">1</int> + <bool key="NSEnabled">YES</bool> + <object class="BWAnchoredButtonCell" key="NSCell" id="1057839367"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="412411133"/> + <int key="NSButtonFlags">114049279</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">selectall</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="BWAnchoredButton" id="178743297"> + <reference key="NSNextResponder" ref="465200239"/> + <int key="NSvFlags">292</int> + <string key="NSFrameSize">{32, 24}</string> + <reference key="NSSuperview" ref="465200239"/> + <bool key="NSEnabled">YES</bool> + <object class="BWAnchoredButtonCell" key="NSCell" id="852360049"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="178743297"/> + <int key="NSButtonFlags">113524991</int> + <int key="NSButtonFlags2">163</int> + <object class="NSCustomResource" key="NSNormalImage"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSRefreshTemplate</string> + </object> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + </object> + <string key="NSFrame">{{40, 79}, {181, 24}}</string> + <reference key="NSSuperview" ref="13817034"/> + <bool key="BWABBIsResizable">NO</bool> + <bool key="BWABBIsAtBottom">NO</bool> + <bool key="BWABBHandleIsRightAligned">NO</bool> + <int key="BWABBSelectedIndex">2</int> + </object> + <object class="NSButton" id="187711859"> + <reference key="NSNextResponder" ref="13817034"/> + <int key="NSvFlags">292</int> + <string key="NSFrame">{{30, 45}, {29, 26}}</string> <reference key="NSSuperview" ref="13817034"/> <bool key="NSEnabled">YES</bool> - <object class="NSButtonCell" key="NSCell" id="448180167"> + <object class="NSButtonCell" key="NSCell" id="947867282"> <int key="NSCellFlags">67239424</int> - <int key="NSCellFlags2">131072</int> - <string key="NSContents">Low memory export (may block server)</string> + <int key="NSCellFlags2">134217728</int> + <string key="NSContents"/> + <reference key="NSSupport" ref="695505032"/> + <reference key="NSControlView" ref="187711859"/> + <int key="NSButtonFlags">-1195491073</int> + <int key="NSButtonFlags2">402653253</int> + <reference key="NSAlternateImage" ref="695505032"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent">a</string> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> + </object> + </object> + <object class="NSButton" id="633620686"> + <reference key="NSNextResponder" ref="13817034"/> + <int key="NSvFlags">292</int> + <string key="NSFrame">{{53, 46}, {56, 22}}</string> + <reference key="NSSuperview" ref="13817034"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="1053224059"> + <int key="NSCellFlags">-2080244224</int> + <int key="NSCellFlags2">134348800</int> + <string key="NSContents">Advanced</string> <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="1061456880"/> - <int key="NSButtonFlags">1211912703</int> - <int key="NSButtonFlags2">2</int> - <reference key="NSNormalImage" ref="626209438"/> - <reference key="NSAlternateImage" ref="506551266"/> + <reference key="NSControlView" ref="633620686"/> + <int key="NSButtonFlags">-2046410497</int> + <int key="NSButtonFlags2">1</int> + <object class="NSFont" key="NSAlternateImage" id="323007501"> + <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">200</int> - <int key="NSPeriodicInterval">25</int> + <int key="NSPeriodicDelay">400</int> + <int key="NSPeriodicInterval">75</int> </object> </object> </object> - <string key="NSFrameSize">{450, 442}</string> + <string key="NSFrameSize">{450, 462}</string> <reference key="NSSuperview"/> </object> - <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string> + <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> + <string key="NSMinSize">{450, 539}</string> <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> <object class="NSCustomView" id="673454061"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">299</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSTextField" id="179419846"> + <object class="NSButton" id="312218624"> <reference key="NSNextResponder" ref="673454061"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 136}, {91, 17}}</string> + <string key="NSFrame">{{18, 134}, {184, 18}}</string> <reference key="NSSuperview" ref="673454061"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="897731827"> - <int key="NSCellFlags">68288064</int> - <int key="NSCellFlags2">272630784</int> - <string key="NSContents">Name format:</string> + <object class="NSButtonCell" key="NSCell" id="597164083"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">0</int> + <string key="NSContents">Custom Filename Format:</string> <reference key="NSSupport" ref="695505032"/> - <reference key="NSControlView" ref="179419846"/> - <reference key="NSBackgroundColor" ref="683790803"/> - <reference key="NSTextColor" ref="804867667"/> + <reference key="NSControlView" ref="312218624"/> + <int key="NSButtonFlags">1211912703</int> + <int key="NSButtonFlags2">2</int> + <reference key="NSNormalImage" ref="748859800"/> + <reference key="NSAlternateImage" ref="506551266"/> + <string key="NSAlternateContents"/> + <string key="NSKeyEquivalent"/> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> </object> </object> - <object class="NSTextField" id="100309881"> + <object class="NSTextField" id="365905202"> <reference key="NSNextResponder" ref="673454061"/> - <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 20}, {106, 14}}</string> + <int key="NSvFlags">266</int> + <string key="NSFrame">{{17, 20}, {390, 14}}</string> <reference key="NSSuperview" ref="673454061"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="319934763"> + <object class="NSTextFieldCell" key="NSCell" id="232573285"> <int key="NSCellFlags">68288064</int> <int key="NSCellFlags2">272761856</int> - <string key="NSContents">Example file name:</string> + <string key="NSContents">Example:</string> <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="100309881"/> + <reference key="NSControlView" ref="365905202"/> <reference key="NSBackgroundColor" ref="683790803"/> <reference key="NSTextColor" ref="804867667"/> </object> @@ -1893,12 +2225,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">258</int> <string key="NSFrame">{{4, 7}, {383, 22}}</string> <reference key="NSSuperview" ref="634146411"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="939762135"> - <int key="NSCellFlags">-2077098431</int> - <int key="NSCellFlags2">4195328</int> - <string key="NSContents">database,table,date,time,server</string> + <int key="NSCellFlags">-1540227519</int> + <int key="NSCellFlags2">4199424</int> + <string key="NSContents">host,database,table,date,time</string> <reference key="NSSupport" ref="695505032"/> <reference key="NSControlView" ref="36768722"/> <reference key="NSBackgroundColor" ref="895047516"/> @@ -1908,12 +2239,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{1, 1}, {388, 38}}</string> <reference key="NSSuperview" ref="603772097"/> - <reference key="NSWindow"/> </object> </object> <string key="NSFrame">{{17, 60}, {390, 40}}</string> <reference key="NSSuperview" ref="673454061"/> - <reference key="NSWindow"/> <string key="NSOffsets">{0, 0}</string> <object class="NSTextFieldCell" key="NSTitleCell"> <int key="NSCellFlags">67239424</int> @@ -1935,14 +2264,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSTextField" id="678021256"> <reference key="NSNextResponder" ref="673454061"/> <int key="NSvFlags">268</int> - <string key="NSFrame">{{17, 42}, {215, 14}}</string> + <string key="NSFrame">{{17, 42}, {226, 14}}</string> <reference key="NSSuperview" ref="673454061"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="684306326"> <int key="NSCellFlags">68288064</int> <int key="NSCellFlags2">272761856</int> - <string key="NSContents">Drag the tokens to customize a format.</string> + <string key="NSContents">Drag the tokens to customize the format.</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="678021256"/> <reference key="NSBackgroundColor" ref="683790803"/> @@ -1954,10 +2282,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">266</int> <string key="NSFrame">{{20, 106}, {384, 22}}</string> <reference key="NSSuperview" ref="673454061"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="424709230"> - <int key="NSCellFlags">-1804468671</int> + <int key="NSCellFlags">-1267597759</int> <int key="NSCellFlags2">272630784</int> <string key="NSContents"/> <reference key="NSSupport" ref="695505032"/> @@ -1967,27 +2294,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="NSTextColor" ref="876496808"/> </object> </object> - <object class="NSTextField" id="302417854"> - <reference key="NSNextResponder" ref="673454061"/> - <int key="NSvFlags">270</int> - <string key="NSFrame">{{125, 20}, {282, 14}}</string> - <reference key="NSSuperview" ref="673454061"/> - <reference key="NSWindow"/> - <bool key="NSEnabled">YES</bool> - <object class="NSTextFieldCell" key="NSCell" id="1026566949"> - <int key="NSCellFlags">68288064</int> - <int key="NSCellFlags2">272761856</int> - <string key="NSContents"><name></string> - <reference key="NSSupport" ref="26"/> - <reference key="NSControlView" ref="302417854"/> - <reference key="NSBackgroundColor" ref="683790803"/> - <reference key="NSTextColor" ref="804867667"/> - </object> - </object> </object> <string key="NSFrameSize">{424, 164}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> <string key="NSClassName">NSCustomView</string> <string key="NSExtension">NSResponder</string> </object> @@ -2004,7 +2312,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> <string key="NSWindowContentMinSize">{213, 50}</string> <object class="NSView" key="NSWindowView" id="217849587"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -2014,7 +2322,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSPSMatrix" key="NSDrawMatrix"/> <string key="NSFrame">{{18, 56}, {343, 20}}</string> <reference key="NSSuperview" ref="217849587"/> - <reference key="NSWindow"/> <int key="NSpiFlags">16394</int> <double key="NSMaxValue">100</double> </object> @@ -2023,7 +2330,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">256</int> <string key="NSFrame">{{59, 84}, {300, 17}}</string> <reference key="NSSuperview" ref="217849587"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="285586502"> <int key="NSCellFlags">67239488</int> @@ -2050,7 +2356,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">256</int> <string key="NSFrame">{{279, 12}, {83, 32}}</string> <reference key="NSSuperview" ref="217849587"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSButtonCell" key="NSCell" id="302936178"> <int key="NSCellFlags">67239424</int> @@ -2076,7 +2381,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <int key="NSvFlags">256</int> <string key="NSFrame">{{59, 104}, {300, 17}}</string> <reference key="NSSuperview" ref="217849587"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="637410679"> <int key="NSCellFlags">67239488</int> @@ -2109,7 +2413,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <string key="NSFrame">{{20, 87}, {32, 32}}</string> <reference key="NSSuperview" ref="217849587"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSImageCell" key="NSCell" id="572306798"> <int key="NSCellFlags">130560</int> @@ -2127,27 +2430,216 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> <string key="NSFrameSize">{379, 139}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> </object> <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> <string key="NSMinSize">{213, 72}</string> <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> </object> + <object class="NSWindowTemplate" id="172544148"> + <int key="NSWindowStyleMask">9</int> + <int key="NSWindowBacking">2</int> + <string key="NSWindowRect">{{467, 379}, {405, 267}}</string> + <int key="NSWTFlags">1886912512</int> + <string key="NSWindowTitle">Error</string> + <string key="NSWindowClass">NSWindow</string> + <object class="NSMutableString" key="NSViewClass"> + <characters key="NS.bytes">View</characters> + </object> + <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string> + <string key="NSWindowContentMinSize">{213, 107}</string> + <object class="NSView" key="NSWindowView" id="487307915"> + <nil key="NSNextResponder"/> + <int key="NSvFlags">256</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTextField" id="758200307"> + <reference key="NSNextResponder" ref="487307915"/> + <int key="NSvFlags">264</int> + <string key="NSFrame">{{17, 233}, {217, 14}}</string> + <reference key="NSSuperview" ref="487307915"/> + <bool key="NSEnabled">YES</bool> + <object class="NSTextFieldCell" key="NSCell" id="397581067"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">4194304</int> + <string key="NSContents">The following export errors occurred:</string> + <reference key="NSSupport" ref="323007501"/> + <reference key="NSControlView" ref="758200307"/> + <reference key="NSBackgroundColor" ref="683790803"/> + <reference key="NSTextColor" ref="804867667"/> + </object> + </object> + <object class="NSScrollView" id="835590192"> + <reference key="NSNextResponder" ref="487307915"/> + <int key="NSvFlags">274</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSClipView" id="919560029"> + <reference key="NSNextResponder" ref="835590192"/> + <int key="NSvFlags">2304</int> + <object class="NSMutableArray" key="NSSubviews"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSTextView" id="195858660"> + <reference key="NSNextResponder" ref="919560029"/> + <int key="NSvFlags">2322</int> + <string key="NSFrameSize">{352, 14}</string> + <reference key="NSSuperview" ref="919560029"/> + <object class="NSTextContainer" key="NSTextContainer" id="577432485"> + <object class="NSLayoutManager" key="NSLayoutManager"> + <object class="NSTextStorage" key="NSTextStorage"> + <object class="NSMutableString" key="NSString"> + <characters key="NS.bytes"/> + </object> + <nil key="NSDelegate"/> + </object> + <object class="NSMutableArray" key="NSTextContainers"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="577432485"/> + </object> + <int key="NSLMFlags">6</int> + <nil key="NSDelegate"/> + </object> + <reference key="NSTextView" ref="195858660"/> + <double key="NSWidth">352</double> + <int key="NSTCFlags">1</int> + </object> + <object class="NSTextViewSharedData" key="NSSharedData"> + <int key="NSFlags">2305</int> + <int key="NSTextCheckingTypes">0</int> + <nil key="NSMarkedAttributes"/> + <reference key="NSBackgroundColor" ref="628696263"/> + <object class="NSDictionary" key="NSSelectedAttributes"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSBackgroundColor</string> + <string>NSColor</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">selectedTextBackgroundColor</string> + <reference key="NSColor" ref="1056664274"/> + </object> + <object class="NSColor"> + <int key="NSColorSpace">6</int> + <string key="NSCatalogName">System</string> + <string key="NSColorName">selectedTextColor</string> + <reference key="NSColor" ref="881778134"/> + </object> + </object> + </object> + <reference key="NSInsertionColor" ref="881778134"/> + <nil key="NSLinkAttributes"/> + <nil key="NSDefaultParagraphStyle"/> + </object> + <int key="NSTVFlags">6</int> + <string key="NSMaxSize">{717, 1e+07}</string> + <string key="NSMinize">{64, 0}</string> + <nil key="NSDelegate"/> + </object> + </object> + <string key="NSFrame">{{1, 1}, {352, 178}}</string> + <reference key="NSSuperview" ref="835590192"/> + <reference key="NSNextKeyView" ref="195858660"/> + <reference key="NSDocView" ref="195858660"/> + <reference key="NSBGColor" ref="628696263"/> + <object class="NSCursor" key="NSCursor"> + <string key="NSHotSpot">{4, -5}</string> + <int key="NSCursorType">1</int> + </object> + <int key="NScvFlags">4</int> + </object> + <object class="NSScroller" id="1025585018"> + <reference key="NSNextResponder" ref="835590192"/> + <int key="NSvFlags">256</int> + <string key="NSFrame">{{353, 1}, {11, 178}}</string> + <reference key="NSSuperview" ref="835590192"/> + <int key="NSsFlags">256</int> + <reference key="NSTarget" ref="835590192"/> + <string key="NSAction">_doScroller:</string> + <double key="NSCurValue">1</double> + </object> + <object class="NSScroller" id="24038425"> + <reference key="NSNextResponder" ref="835590192"/> + <int key="NSvFlags">-2147483392</int> + <string key="NSFrame">{{-100, -100}, {87, 18}}</string> + <reference key="NSSuperview" ref="835590192"/> + <int key="NSsFlags">257</int> + <reference key="NSTarget" ref="835590192"/> + <string key="NSAction">_doScroller:</string> + <double key="NSCurValue">1</double> + <double key="NSPercent">0.94565218687057495</double> + </object> + </object> + <string key="NSFrame">{{20, 45}, {365, 180}}</string> + <reference key="NSSuperview" ref="487307915"/> + <reference key="NSNextKeyView" ref="919560029"/> + <int key="NSsFlags">18</int> + <reference key="NSVScroller" ref="1025585018"/> + <reference key="NSHScroller" ref="24038425"/> + <reference key="NSContentView" ref="919560029"/> + </object> + <object class="NSButton" id="250182448"> + <reference key="NSNextResponder" ref="487307915"/> + <int key="NSvFlags">257</int> + <string key="NSFrame">{{301, 13}, {89, 28}}</string> + <reference key="NSSuperview" ref="487307915"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="629298988"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">138051584</int> + <string key="NSContents">Close</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="250182448"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <object class="NSFont" key="NSAlternateImage" id="645009403"> + <string key="NSName">Helvetica</string> + <double key="NSSize">11</double> + <int key="NSfFlags">16</int> + </object> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">DQ</string> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + <object class="NSButton" id="859612604"> + <reference key="NSNextResponder" ref="487307915"/> + <int key="NSvFlags">257</int> + <string key="NSFrame">{{350, -130}, {80, 28}}</string> + <reference key="NSSuperview" ref="487307915"/> + <bool key="NSEnabled">YES</bool> + <object class="NSButtonCell" key="NSCell" id="55236080"> + <int key="NSCellFlags">67239424</int> + <int key="NSCellFlags2">138051584</int> + <string key="NSContents">Close</string> + <reference key="NSSupport" ref="26"/> + <reference key="NSControlView" ref="859612604"/> + <int key="NSButtonFlags">-2038284033</int> + <int key="NSButtonFlags2">1</int> + <reference key="NSAlternateImage" ref="645009403"/> + <string key="NSAlternateContents"/> + <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string> + <int key="NSPeriodicDelay">200</int> + <int key="NSPeriodicInterval">25</int> + </object> + </object> + </object> + <string key="NSFrameSize">{405, 267}</string> + </object> + <string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string> + <string key="NSMinSize">{213, 129}</string> + <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string> + </object> </object> <object class="IBObjectContainer" key="IBDocument.Objects"> <object class="NSMutableArray" key="connectionRecords"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">exportWindow</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="834889278"/> - </object> - <int key="connectionID">241</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> <string key="label">exportToolbar</string> <reference key="source" ref="1001"/> <reference key="destination" ref="798928663"/> @@ -2292,22 +2784,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">exportHTMLIncludeHeadAndBodyTagsCheck</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="801783385"/> - </object> - <int key="connectionID">260</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">exportXMLIncludeStructureCheck</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="1041304932"/> - </object> - <int key="connectionID">261</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> <string key="label">exportPDFIncludeStructureCheck</string> <reference key="source" ref="1001"/> <reference key="destination" ref="808186669"/> @@ -2334,14 +2810,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="IBActionConnection" key="connection"> <string key="label">switchTab:</string> <reference key="source" ref="1001"/> - <reference key="destination" ref="229922660"/> - </object> - <int key="connectionID">267</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">switchTab:</string> - <reference key="source" ref="1001"/> <reference key="destination" ref="669858692"/> </object> <int key="connectionID">268</int> @@ -2350,59 +2818,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="IBActionConnection" key="connection"> <string key="label">switchTab:</string> <reference key="source" ref="1001"/> - <reference key="destination" ref="403938115"/> - </object> - <int key="connectionID">269</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">switchTab:</string> - <reference key="source" ref="1001"/> <reference key="destination" ref="293460904"/> </object> <int key="connectionID">270</int> </object> <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">switchTab:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="913250734"/> - </object> - <int key="connectionID">271</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">tokenNameView</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="673454061"/> - </object> - <int key="connectionID">272</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">exampleNameLabel</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="302417854"/> - </object> - <int key="connectionID">273</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">tokenNameTokensField</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="36768722"/> - </object> - <int key="connectionID">274</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBOutletConnection" key="connection"> - <string key="label">tokenNameField</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="123205011"/> - </object> - <int key="connectionID">275</int> - </object> - <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> <string key="label">delegate</string> <reference key="source" ref="764715003"/> @@ -2492,11 +2912,299 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> - <string key="label">exportProcessLowMemory</string> + <string key="label">exportSelectAllTablesButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="412411133"/> + </object> + <int key="connectionID">345</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportDeselectAllTablesButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="21358371"/> + </object> + <int key="connectionID">346</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportRefreshTablesButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="178743297"/> + </object> + <int key="connectionID">347</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">selectDeselectAllTables:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="412411133"/> + </object> + <int key="connectionID">348</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">selectDeselectAllTables:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="21358371"/> + </object> + <int key="connectionID">349</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">refreshTableList:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="178743297"/> + </object> + <int key="connectionID">350</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAdvancedExportOptionsView:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="187711859"/> + </object> + <int key="connectionID">388</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportAdvancedOptionsView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="26669445"/> + </object> + <int key="connectionID">389</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">window</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="834889278"/> + </object> + <int key="connectionID">390</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportTablelistScrollView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="146073124"/> + </object> + <int key="connectionID">391</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportTableListButtonBar</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="465200239"/> + </object> + <int key="connectionID">392</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportAdvancedOptionsViewButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="187711859"/> + </object> + <int key="connectionID">393</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleSQLIncludeStructure:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="731343097"/> + </object> + <int key="connectionID">410</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleSQLIncludeContent:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="630339954"/> + </object> + <int key="connectionID">411</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleSQLIncludeDropSyntax:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="198253168"/> + </object> + <int key="connectionID">412</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportProcessLowMemoryButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="476368749"/> + </object> + <int key="connectionID">415</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCustomFilenameView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="673454061"/> + </object> + <int key="connectionID">417</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCustomFilenameTokenField</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="123205011"/> + </object> + <int key="connectionID">419</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCustomFilenameTokensField</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="36768722"/> + </object> + <int key="connectionID">420</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportSQLIncludeContentCheck</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="630339954"/> + </object> + <int key="connectionID">428</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="413491970"/> + </object> + <int key="connectionID">429</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportAdvancedOptionsViewLabelButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="633620686"/> + </object> + <int key="connectionID">432</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleAdvancedExportOptionsView:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="633620686"/> + </object> + <int key="connectionID">433</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">initialFirstResponder</string> + <reference key="source" ref="172544148"/> + <reference key="destination" ref="250182448"/> + </object> + <int key="connectionID">453</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">errorsWindow</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="172544148"/> + </object> + <int key="connectionID">454</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="172544148"/> + <reference key="destination" ref="1001"/> + </object> + <int key="connectionID">455</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">errorsTextView</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="195858660"/> + </object> + <int key="connectionID">456</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">closeSheet:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="250182448"/> + </object> + <int key="connectionID">457</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">switchTab:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="810639654"/> + </object> + <int key="connectionID">461</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCustomFilenameExampleTextField</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="365905202"/> + </object> + <int key="connectionID">464</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBActionConnection" key="connection"> + <string key="label">toggleCustomFilenameFormat:</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="312218624"/> + </object> + <int key="connectionID">467</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="123205011"/> + <reference key="destination" ref="1001"/> + </object> + <int key="connectionID">468</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCustomFilenameButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="312218624"/> + </object> + <int key="connectionID">469</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportSQLBLOBFieldsAsHexCheck</string> <reference key="source" ref="1001"/> - <reference key="destination" ref="1061456880"/> + <reference key="destination" ref="926831065"/> </object> - <int key="connectionID">312</int> + <int key="connectionID">484</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCSVNULLValuesAsTextField</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="676012428"/> + </object> + <int key="connectionID">485</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportUseUTF8BOMButton</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="546063322"/> + </object> + <int key="connectionID">486</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">exportCompressOutputFile</string> + <reference key="source" ref="1001"/> + <reference key="destination" ref="271088881"/> + </object> + <int key="connectionID">487</int> </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> @@ -2542,18 +3250,21 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="object" ref="13817034"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="413491970"/> <reference ref="369079615"/> <reference ref="400864496"/> <reference ref="461208343"/> - <reference ref="282243488"/> <reference ref="146073124"/> - <reference ref="281488100"/> <reference ref="611574536"/> <reference ref="64452171"/> <reference ref="274673761"/> <reference ref="161881306"/> - <reference ref="1061456880"/> + <reference ref="413491970"/> + <reference ref="282243488"/> + <reference ref="465200239"/> + <reference ref="281488100"/> + <reference ref="26669445"/> + <reference ref="187711859"/> + <reference ref="633620686"/> </object> <reference key="parent" ref="834889278"/> </object> @@ -2563,11 +3274,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="210788200"/> - <reference ref="229922660"/> - <reference ref="669858692"/> - <reference ref="403938115"/> <reference ref="293460904"/> - <reference ref="913250734"/> + <reference ref="810639654"/> + <reference ref="669858692"/> </object> <reference key="parent" ref="834889278"/> </object> @@ -2577,31 +3286,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="798928663"/> </object> <object class="IBObjectRecord"> - <int key="objectID">5</int> - <reference key="object" ref="229922660"/> - <reference key="parent" ref="798928663"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">6</int> - <reference key="object" ref="669858692"/> - <reference key="parent" ref="798928663"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">7</int> - <reference key="object" ref="403938115"/> - <reference key="parent" ref="798928663"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">8</int> <reference key="object" ref="293460904"/> <reference key="parent" ref="798928663"/> </object> <object class="IBObjectRecord"> - <int key="objectID">9</int> - <reference key="object" ref="913250734"/> - <reference key="parent" ref="798928663"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">10</int> <reference key="object" ref="146073124"/> <object class="NSMutableArray" key="children"> @@ -2609,6 +3298,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="764715003"/> <reference ref="697059257"/> <reference ref="76994346"/> + <reference ref="841775738"/> </object> <reference key="parent" ref="13817034"/> </object> @@ -2641,6 +3331,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="246891379"/> <reference ref="706447767"/> <reference ref="565437007"/> + <reference ref="757271668"/> </object> <reference key="parent" ref="13817034"/> </object> @@ -2801,47 +3492,16 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="object" ref="1008336044"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1041304932"/> - <reference ref="400758917"/> </object> <reference key="parent" ref="706447767"/> </object> <object class="IBObjectRecord"> - <int key="objectID">35</int> - <reference key="object" ref="1041304932"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="391668479"/> - </object> - <reference key="parent" ref="1008336044"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">36</int> - <reference key="object" ref="400758917"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="109221843"/> - </object> - <reference key="parent" ref="1008336044"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">37</int> - <reference key="object" ref="109221843"/> - <reference key="parent" ref="400758917"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">38</int> - <reference key="object" ref="391668479"/> - <reference key="parent" ref="1041304932"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">39</int> <reference key="object" ref="40362368"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> <reference ref="703173775"/> <reference ref="897740627"/> - <reference ref="801783385"/> </object> <reference key="parent" ref="246891379"/> </object> @@ -2864,20 +3524,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="40362368"/> </object> <object class="IBObjectRecord"> - <int key="objectID">42</int> - <reference key="object" ref="801783385"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="43814065"/> - </object> - <reference key="parent" ref="40362368"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">43</int> - <reference key="object" ref="43814065"/> - <reference key="parent" ref="801783385"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">44</int> <reference key="object" ref="119708041"/> <reference key="parent" ref="897740627"/> @@ -2903,6 +3549,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="679049124"/> <reference ref="356426114"/> <reference ref="583445202"/> + <reference ref="734041147"/> + <reference ref="676012428"/> </object> <reference key="parent" ref="672248851"/> </object> @@ -3134,6 +3782,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference ref="877523146"/> <reference ref="198253168"/> <reference ref="441912484"/> + <reference ref="630339954"/> + <reference ref="141941824"/> + <reference ref="271088881"/> + <reference ref="546063322"/> + <reference ref="926831065"/> </object> <reference key="parent" ref="838824691"/> </object> @@ -3208,8 +3861,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="object" ref="764715003"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="328674682"/> <reference ref="740868294"/> + <reference ref="724109118"/> + <reference ref="853645728"/> + <reference ref="767168164"/> </object> <reference key="parent" ref="146073124"/> </object> @@ -3224,15 +3879,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="146073124"/> </object> <object class="IBObjectRecord"> - <int key="objectID">92</int> - <reference key="object" ref="328674682"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1032230614"/> - </object> - <reference key="parent" ref="764715003"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">93</int> <reference key="object" ref="740868294"/> <object class="NSMutableArray" key="children"> @@ -3247,44 +3893,20 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="740868294"/> </object> <object class="IBObjectRecord"> - <int key="objectID">95</int> - <reference key="object" ref="1032230614"/> - <reference key="parent" ref="328674682"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">97</int> <reference key="object" ref="673454061"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="302417854"/> - <reference ref="100309881"/> <reference ref="123205011"/> <reference ref="678021256"/> <reference ref="603772097"/> - <reference ref="179419846"/> + <reference ref="365905202"/> + <reference ref="312218624"/> </object> <reference key="parent" ref="0"/> <string key="objectName">Token Name View</string> </object> <object class="IBObjectRecord"> - <int key="objectID">184</int> - <reference key="object" ref="302417854"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="1026566949"/> - </object> - <reference key="parent" ref="673454061"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">164</int> - <reference key="object" ref="100309881"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="319934763"/> - </object> - <reference key="parent" ref="673454061"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">180</int> <reference key="object" ref="123205011"/> <object class="NSMutableArray" key="children"> @@ -3312,20 +3934,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="673454061"/> </object> <object class="IBObjectRecord"> - <int key="objectID">160</int> - <reference key="object" ref="179419846"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="897731827"/> - </object> - <reference key="parent" ref="673454061"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">161</int> - <reference key="object" ref="897731827"/> - <reference key="parent" ref="179419846"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">130</int> <reference key="object" ref="36768722"/> <object class="NSMutableArray" key="children"> @@ -3350,16 +3958,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="123205011"/> </object> <object class="IBObjectRecord"> - <int key="objectID">165</int> - <reference key="object" ref="319934763"/> - <reference key="parent" ref="100309881"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">185</int> - <reference key="object" ref="1026566949"/> - <reference key="parent" ref="302417854"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">285</int> <reference key="object" ref="611574536"/> <object class="NSMutableArray" key="children"> @@ -3491,18 +4089,421 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="parent" ref="760004352"/> </object> <object class="IBObjectRecord"> - <int key="objectID">310</int> - <reference key="object" ref="1061456880"/> + <int key="objectID">317</int> + <reference key="object" ref="630339954"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="774438954"/> + </object> + <reference key="parent" ref="382068224"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">318</int> + <reference key="object" ref="774438954"/> + <reference key="parent" ref="630339954"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">327</int> + <reference key="object" ref="465200239"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="21358371"/> + <reference ref="178743297"/> + <reference ref="412411133"/> + </object> + <reference key="parent" ref="13817034"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">329</int> + <reference key="object" ref="178743297"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="852360049"/> + </object> + <reference key="parent" ref="465200239"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">331</int> + <reference key="object" ref="21358371"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="908054831"/> + </object> + <reference key="parent" ref="465200239"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">332</int> + <reference key="object" ref="908054831"/> + <reference key="parent" ref="21358371"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">341</int> + <reference key="object" ref="852360049"/> + <reference key="parent" ref="178743297"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">343</int> + <reference key="object" ref="412411133"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1057839367"/> + </object> + <reference key="parent" ref="465200239"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">344</int> + <reference key="object" ref="1057839367"/> + <reference key="parent" ref="412411133"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">351</int> + <reference key="object" ref="724109118"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="309149890"/> + </object> + <reference key="parent" ref="764715003"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">353</int> + <reference key="object" ref="853645728"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="625807336"/> + </object> + <reference key="parent" ref="764715003"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">357</int> + <reference key="object" ref="625807336"/> + <reference key="parent" ref="853645728"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">358</int> + <reference key="object" ref="767168164"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="145269483"/> + </object> + <reference key="parent" ref="764715003"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">360</int> + <reference key="object" ref="145269483"/> + <reference key="parent" ref="767168164"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">361</int> + <reference key="object" ref="26669445"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1030775352"/> + <reference ref="202734849"/> + </object> + <reference key="parent" ref="13817034"/> + <string key="objectName">Advanced View for INSERT</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">367</int> + <reference key="object" ref="1030775352"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="439649364"/> + </object> + <reference key="parent" ref="26669445"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">370</int> + <reference key="object" ref="439649364"/> + <reference key="parent" ref="1030775352"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">382</int> + <reference key="object" ref="187711859"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="947867282"/> + </object> + <reference key="parent" ref="13817034"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">385</int> + <reference key="object" ref="947867282"/> + <reference key="parent" ref="187711859"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">404</int> + <reference key="object" ref="202734849"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="476368749"/> + </object> + <reference key="parent" ref="26669445"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">405</int> + <reference key="object" ref="476368749"/> <object class="NSMutableArray" key="children"> <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="448180167"/> + <reference ref="476592342"/> + </object> + <reference key="parent" ref="202734849"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">408</int> + <reference key="object" ref="476592342"/> + <reference key="parent" ref="476368749"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">356</int> + <reference key="object" ref="309149890"/> + <reference key="parent" ref="724109118"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">413</int> + <reference key="object" ref="841775738"/> + <reference key="parent" ref="146073124"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">430</int> + <reference key="object" ref="633620686"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1053224059"/> </object> <reference key="parent" ref="13817034"/> </object> <object class="IBObjectRecord"> - <int key="objectID">311</int> - <reference key="object" ref="448180167"/> - <reference key="parent" ref="1061456880"/> + <int key="objectID">431</int> + <reference key="object" ref="1053224059"/> + <reference key="parent" ref="633620686"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">441</int> + <reference key="object" ref="172544148"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="487307915"/> + </object> + <reference key="parent" ref="0"/> + <string key="objectName">Error Sheet</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">442</int> + <reference key="object" ref="487307915"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="859612604"/> + <reference ref="835590192"/> + <reference ref="250182448"/> + <reference ref="758200307"/> + </object> + <reference key="parent" ref="172544148"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">443</int> + <reference key="object" ref="859612604"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="55236080"/> + </object> + <reference key="parent" ref="487307915"/> + <string key="objectName">Push Button (Close Dummy for ESC)</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">444</int> + <reference key="object" ref="835590192"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="24038425"/> + <reference ref="1025585018"/> + <reference ref="195858660"/> + </object> + <reference key="parent" ref="487307915"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">445</int> + <reference key="object" ref="250182448"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="629298988"/> + </object> + <reference key="parent" ref="487307915"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">446</int> + <reference key="object" ref="758200307"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="397581067"/> + </object> + <reference key="parent" ref="487307915"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">447</int> + <reference key="object" ref="397581067"/> + <reference key="parent" ref="758200307"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">448</int> + <reference key="object" ref="629298988"/> + <reference key="parent" ref="250182448"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">449</int> + <reference key="object" ref="24038425"/> + <reference key="parent" ref="835590192"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">450</int> + <reference key="object" ref="1025585018"/> + <reference key="parent" ref="835590192"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">451</int> + <reference key="object" ref="195858660"/> + <reference key="parent" ref="835590192"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">452</int> + <reference key="object" ref="55236080"/> + <reference key="parent" ref="859612604"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">458</int> + <reference key="object" ref="810639654"/> + <reference key="parent" ref="798928663"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">459</int> + <reference key="object" ref="757271668"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="1063181117"/> + </object> + <reference key="parent" ref="281488100"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">460</int> + <reference key="object" ref="1063181117"/> + <reference key="parent" ref="757271668"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">6</int> + <reference key="object" ref="669858692"/> + <reference key="parent" ref="798928663"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">462</int> + <reference key="object" ref="365905202"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="232573285"/> + </object> + <reference key="parent" ref="673454061"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">463</int> + <reference key="object" ref="232573285"/> + <reference key="parent" ref="365905202"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">465</int> + <reference key="object" ref="312218624"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="597164083"/> + </object> + <reference key="parent" ref="673454061"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">466</int> + <reference key="object" ref="597164083"/> + <reference key="parent" ref="312218624"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">472</int> + <reference key="object" ref="141941824"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="774106879"/> + </object> + <reference key="parent" ref="382068224"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">473</int> + <reference key="object" ref="774106879"/> + <reference key="parent" ref="141941824"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">474</int> + <reference key="object" ref="546063322"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="708524486"/> + </object> + <reference key="parent" ref="382068224"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">475</int> + <reference key="object" ref="708524486"/> + <reference key="parent" ref="546063322"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">476</int> + <reference key="object" ref="271088881"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="415134766"/> + </object> + <reference key="parent" ref="382068224"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">477</int> + <reference key="object" ref="415134766"/> + <reference key="parent" ref="271088881"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">478</int> + <reference key="object" ref="926831065"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="806770339"/> + </object> + <reference key="parent" ref="382068224"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">479</int> + <reference key="object" ref="806770339"/> + <reference key="parent" ref="926831065"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">480</int> + <reference key="object" ref="734041147"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="893875441"/> + </object> + <reference key="parent" ref="1070450836"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">481</int> + <reference key="object" ref="893875441"/> + <reference key="parent" ref="734041147"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">482</int> + <reference key="object" ref="676012428"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="240212124"/> + </object> + <reference key="parent" ref="1070450836"/> + </object> + <object class="IBObjectRecord"> + <int key="objectID">483</int> + <reference key="object" ref="240212124"/> + <reference key="parent" ref="676012428"/> </object> </object> </object> @@ -3517,6 +4518,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>1.IBViewEditorWindowController.showingLayoutRectangles</string> <string>1.IBWindowTemplateEditedContentRect</string> <string>1.NSWindowTemplate.visibleAtLaunch</string> + <string>1.windowTemplate.hasMinSize</string> + <string>1.windowTemplate.minSize</string> <string>10.IBPluginDependency</string> <string>11.IBPluginDependency</string> <string>12.IBPluginDependency</string> @@ -3530,20 +4533,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>14.IBPluginDependency</string> <string>15.IBPluginDependency</string> <string>16.IBPluginDependency</string> - <string>160.IBPluginDependency</string> - <string>161.IBPluginDependency</string> <string>162.IBPluginDependency</string> <string>163.IBPluginDependency</string> - <string>164.IBPluginDependency</string> - <string>165.IBPluginDependency</string> <string>17.IBPluginDependency</string> <string>179.IBPluginDependency</string> <string>18.IBPluginDependency</string> <string>180.CustomClassName</string> <string>180.IBPluginDependency</string> <string>181.IBPluginDependency</string> - <string>184.IBPluginDependency</string> - <string>185.IBPluginDependency</string> <string>19.IBPluginDependency</string> <string>2.IBPluginDependency</string> <string>2.IBUserGuides</string> @@ -3590,31 +4587,99 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>303.IBPluginDependency</string> <string>304.IBPluginDependency</string> <string>31.IBPluginDependency</string> - <string>310.IBPluginDependency</string> - <string>311.IBPluginDependency</string> + <string>317.IBPluginDependency</string> + <string>318.IBPluginDependency</string> <string>32.IBPluginDependency</string> + <string>327.IBPluginDependency</string> + <string>329.IBAttributePlaceholdersKey</string> + <string>329.IBPluginDependency</string> <string>33.IBPluginDependency</string> + <string>331.IBAttributePlaceholdersKey</string> + <string>331.IBPluginDependency</string> + <string>332.IBPluginDependency</string> <string>34.IBPluginDependency</string> - <string>35.IBPluginDependency</string> - <string>36.IBPluginDependency</string> - <string>37.IBPluginDependency</string> - <string>38.IBPluginDependency</string> + <string>341.IBPluginDependency</string> + <string>343.IBAttributePlaceholdersKey</string> + <string>343.IBPluginDependency</string> + <string>344.IBPluginDependency</string> + <string>351.IBPluginDependency</string> + <string>353.IBPluginDependency</string> + <string>356.IBPluginDependency</string> + <string>357.IBPluginDependency</string> + <string>358.IBPluginDependency</string> + <string>360.IBPluginDependency</string> + <string>361.IBEditorWindowLastContentRect</string> + <string>361.IBPluginDependency</string> + <string>367.IBPluginDependency</string> + <string>370.IBPluginDependency</string> + <string>382.IBAttributePlaceholdersKey</string> + <string>382.IBPluginDependency</string> + <string>385.IBPluginDependency</string> <string>39.IBPluginDependency</string> <string>4.IBPluginDependency</string> <string>40.IBPluginDependency</string> + <string>404.IBPluginDependency</string> + <string>405.IBPluginDependency</string> + <string>408.IBPluginDependency</string> <string>41.IBPluginDependency</string> - <string>42.IBPluginDependency</string> - <string>43.IBPluginDependency</string> + <string>413.IBPluginDependency</string> + <string>430.IBPluginDependency</string> + <string>431.IBPluginDependency</string> <string>44.IBPluginDependency</string> + <string>441.IBEditorWindowLastContentRect</string> + <string>441.IBPluginDependency</string> + <string>441.IBWindowTemplateEditedContentRect</string> + <string>441.ImportedFromIB2</string> + <string>441.windowTemplate.hasMaxSize</string> + <string>441.windowTemplate.hasMinSize</string> + <string>441.windowTemplate.maxSize</string> + <string>441.windowTemplate.minSize</string> + <string>442.IBPluginDependency</string> + <string>442.ImportedFromIB2</string> + <string>443.IBPluginDependency</string> + <string>443.ImportedFromIB2</string> + <string>444.IBPluginDependency</string> + <string>444.ImportedFromIB2</string> + <string>445.IBPluginDependency</string> + <string>445.ImportedFromIB2</string> + <string>446.IBPluginDependency</string> + <string>446.ImportedFromIB2</string> + <string>447.IBPluginDependency</string> + <string>448.IBPluginDependency</string> + <string>449.IBPluginDependency</string> + <string>449.IBShouldRemoveOnLegacySave</string> <string>45.IBPluginDependency</string> + <string>450.IBPluginDependency</string> + <string>450.IBShouldRemoveOnLegacySave</string> + <string>451.IBPluginDependency</string> + <string>451.ImportedFromIB2</string> + <string>452.IBPluginDependency</string> + <string>458.IBPluginDependency</string> + <string>459.IBPluginDependency</string> <string>46.IBPluginDependency</string> + <string>460.IBPluginDependency</string> + <string>462.IBPluginDependency</string> + <string>463.IBPluginDependency</string> + <string>465.IBPluginDependency</string> + <string>466.IBPluginDependency</string> <string>47.IBPluginDependency</string> <string>47.ImportedFromIB2</string> + <string>472.IBPluginDependency</string> + <string>473.IBPluginDependency</string> + <string>474.IBPluginDependency</string> + <string>475.IBPluginDependency</string> + <string>476.IBPluginDependency</string> + <string>477.IBPluginDependency</string> + <string>478.IBPluginDependency</string> + <string>479.IBPluginDependency</string> <string>48.IBPluginDependency</string> + <string>480.IBPluginDependency</string> + <string>481.IBPluginDependency</string> + <string>482.IBPluginDependency</string> + <string>483.IBPluginDependency</string> <string>49.IBAttributePlaceholdersKey</string> <string>49.IBPluginDependency</string> <string>49.ImportedFromIB2</string> - <string>5.IBPluginDependency</string> <string>50.IBPluginDependency</string> <string>50.ImportedFromIB2</string> <string>51.IBPluginDependency</string> @@ -3646,7 +4711,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>67.IBPluginDependency</string> <string>68.IBPluginDependency</string> <string>69.IBPluginDependency</string> - <string>7.IBPluginDependency</string> <string>70.IBPluginDependency</string> <string>71.IBPluginDependency</string> <string>72.IBPluginDependency</string> @@ -3668,13 +4732,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>87.IBPluginDependency</string> <string>88.IBPluginDependency</string> <string>89.IBPluginDependency</string> - <string>9.IBPluginDependency</string> <string>90.IBPluginDependency</string> <string>91.IBPluginDependency</string> - <string>92.IBPluginDependency</string> <string>93.IBPluginDependency</string> <string>94.IBPluginDependency</string> - <string>95.IBPluginDependency</string> <string>97.IBEditorWindowLastContentRect</string> <string>97.IBPluginDependency</string> <string>97.ImportedFromIB2</string> @@ -3682,12 +4743,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{357, 311}, {450, 442}}</string> + <string>{{360, 183}, {450, 462}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="NO"/> <boolean value="NO"/> - <string>{{357, 311}, {450, 442}}</string> + <string>{{360, 183}, {450, 462}}</string> <boolean value="NO"/> + <boolean value="YES"/> + <string>{450, 462}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -3719,17 +4782,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <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>NSTokenField</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 class="NSMutableArray"> <bool key="EncodedWithXMLCoder">YES</bool> </object> @@ -3766,7 +4823,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <boolean value="YES"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <boolean value="YES"/> - <string>{{458, 613}, {616, 0}}</string> + <string>{{277, 476}, {616, 169}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -3779,12 +4836,97 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <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="178743297"/> + <string key="toolTip">Refresh table list</string> + </object> + </object> + <string>com.brandonwalkin.BWToolkit</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="21358371"/> + <string key="toolTip">Unmark all tables</string> + </object> + </object> + <string>com.brandonwalkin.BWToolkit</string> + <string>com.brandonwalkin.BWToolkit</string> + <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="412411133"/> + <string key="toolTip">Mark all tables</string> + </object> + </object> + <string>com.brandonwalkin.BWToolkit</string> + <string>com.brandonwalkin.BWToolkit</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>{{63, 565}, {360, 157}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</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="187711859"/> + <string key="toolTip">Advanced export 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> + <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>{{503, 186}, {405, 267}}</string> + <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{503, 186}, {405, 267}}</string> + <integer value="1"/> + <integer value="0"/> + <integer value="1"/> + <string>{3.40282e+38, 3.40282e+38}</string> + <string>{213, 107}</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> + <integer value="1"/> + <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>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> @@ -3797,6 +4939,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <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> + <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 class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> <object class="IBToolTipAttribute" key="NS.object.0"> @@ -3808,7 +4962,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -3885,11 +5038,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <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>{{454, 460}, {424, 164}}</string> + <string>{{424, 446}, {424, 164}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> </object> @@ -3910,7 +5059,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> <nil key="sourceID"/> - <int key="maxID">312</int> + <int key="maxID">491</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -3954,6 +5103,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="className">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPMainThreadTrampoline.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> <string key="minorKey">Source/SPNotLoaded.h</string> </object> </object> @@ -3976,6 +5132,48 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSTextView</string> + <object class="NSMutableDictionary" key="actions"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>doDecomposedStringWithCanonicalMapping:</string> + <string>doDecomposedStringWithCompatibilityMapping:</string> + <string>doPrecomposedStringWithCanonicalMapping:</string> + <string>doPrecomposedStringWithCompatibilityMapping:</string> + <string>doRemoveDiacritics:</string> + <string>doSelectionLowerCase:</string> + <string>doSelectionTitleCase:</string> + <string>doSelectionUpperCase:</string> + <string>doTranspose:</string> + <string>insertNULLvalue:</string> + <string>selectCurrentLine:</string> + <string>selectCurrentWord:</string> + <string>selectEnclosingBrackets:</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + </object> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPTextViewAdditions.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSWindow</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> @@ -3984,7 +5182,21 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> <object class="IBPartialClassDescription"> <string key="className">SPExportController</string> - <string key="superclassName">NSObject</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPCSVExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPDotExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <string key="superclassName">NSWindowController</string> <object class="NSMutableDictionary" key="actions"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> @@ -3992,8 +5204,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>cancelExport:</string> <string>changeExportOutputPath:</string> <string>closeSheet:</string> + <string>refreshTableList:</string> + <string>selectDeselectAllTables:</string> <string>switchInput:</string> <string>switchTab:</string> + <string>toggleAdvancedExportOptionsView:</string> + <string>toggleCustomFilenameFormat:</string> + <string>toggleSQLIncludeContent:</string> + <string>toggleSQLIncludeDropSyntax:</string> + <string>toggleSQLIncludeStructure:</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -4002,79 +5221,116 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string>id</string> <string>id</string> <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>exampleNameLabel</string> + <string>customQueryInstance</string> + <string>errorsTextView</string> + <string>errorsWindow</string> + <string>exportAdvancedOptionsView</string> + <string>exportAdvancedOptionsViewButton</string> + <string>exportAdvancedOptionsViewLabelButton</string> + <string>exportButton</string> <string>exportCSVFieldsEscapedField</string> <string>exportCSVFieldsTerminatedField</string> <string>exportCSVFieldsWrappedField</string> <string>exportCSVIncludeFieldNamesCheck</string> <string>exportCSVLinesTerminatedField</string> + <string>exportCSVNULLValuesAsTextField</string> + <string>exportCompressOutputFile</string> + <string>exportCustomFilenameButton</string> + <string>exportCustomFilenameExampleTextField</string> + <string>exportCustomFilenameTokenField</string> + <string>exportCustomFilenameTokensField</string> + <string>exportCustomFilenameView</string> + <string>exportDeselectAllTablesButton</string> <string>exportExcelSheetOrFilePerTableMatrix</string> <string>exportFilePerTableCheck</string> <string>exportFilePerTableNote</string> - <string>exportHTMLIncludeHeadAndBodyTagsCheck</string> <string>exportHTMLIncludeStructureCheck</string> <string>exportInputMatrix</string> <string>exportPDFIncludeStructureCheck</string> <string>exportPathField</string> - <string>exportProcessLowMemory</string> + <string>exportProcessLowMemoryButton</string> <string>exportProgressIndicator</string> <string>exportProgressText</string> <string>exportProgressTitle</string> <string>exportProgressWindow</string> + <string>exportRefreshTablesButton</string> + <string>exportSQLBLOBFieldsAsHexCheck</string> + <string>exportSQLIncludeContentCheck</string> <string>exportSQLIncludeDropSyntaxCheck</string> <string>exportSQLIncludeErrorsCheck</string> <string>exportSQLIncludeStructureCheck</string> + <string>exportSelectAllTablesButton</string> <string>exportTabBar</string> <string>exportTableList</string> + <string>exportTableListButtonBar</string> + <string>exportTablelistScrollView</string> <string>exportToolbar</string> - <string>exportWindow</string> - <string>exportXMLIncludeStructureCheck</string> + <string>exportUseUTF8BOMButton</string> + <string>tableContentInstance</string> <string>tableDataInstance</string> <string>tableDocumentInstance</string> - <string>tableWindow</string> <string>tablesListInstance</string> - <string>tokenNameField</string> - <string>tokenNameTokensField</string> - <string>tokenNameView</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> - <string>id</string> + <string>NSTextView</string> + <string>NSWindow</string> + <string>NSView</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSComboBox</string> + <string>NSComboBox</string> + <string>NSComboBox</string> + <string>NSButton</string> + <string>NSComboBox</string> + <string>NSTextField</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSTokenField</string> + <string>NSTokenField</string> + <string>NSView</string> + <string>NSButton</string> + <string>NSMatrix</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSButton</string> + <string>NSMatrix</string> + <string>NSButton</string> + <string>NSTextField</string> + <string>NSButton</string> + <string>NSProgressIndicator</string> + <string>NSTextField</string> + <string>NSTextField</string> + <string>NSWindow</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSButton</string> + <string>NSTabView</string> + <string>NSTableView</string> + <string>BWAnchoredButtonBar</string> + <string>NSScrollView</string> + <string>NSToolbar</string> + <string>NSButton</string> <string>id</string> <string>id</string> <string>id</string> @@ -4086,10 +5342,69 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="minorKey">Source/SPExportController.h</string> </object> </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPExportInitializer.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPHTMLExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPPDFExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPSQLExporterDelegate.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">SPExportController</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">Source/SPXMLExporterDelegate.h</string> + </object> + </object> </object> <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"> @@ -4141,6 +5456,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSApplication</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">BWToolkitFramework.framework/Headers/NSApplication+BWAdditions.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSBox</string> <string key="superclassName">NSView</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -4491,6 +5813,20 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="className">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">PSMTabBar.framework/Headers/PSMTabBarCell.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">PSMTabBar.framework/Headers/PSMTabBarControl.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> @@ -4643,11 +5979,27 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </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="221675136"/> </object> <object class="IBPartialClassDescription"> + <string key="className">NSText</string> + <string key="superclassName">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSText.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSTextField</string> <string key="superclassName">NSControl</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -4664,6 +6016,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> </object> </object> <object class="IBPartialClassDescription"> + <string key="className">NSTextView</string> + <string key="superclassName">NSText</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSTextView.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSTokenField</string> <string key="superclassName">NSTextField</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> @@ -4711,6 +6071,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <reference key="sourceIdentifier" ref="402527531"/> </object> <object class="IBPartialClassDescription"> + <string key="className">NSView</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">BWToolkitFramework.framework/Headers/NSView+BWAdditions.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSWindow</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBFrameworkSource</string> @@ -4732,9 +6099,29 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <string key="minorKey">AppKit.framework/Headers/NSWindowScripting.h</string> </object> </object> + <object class="IBPartialClassDescription"> + <string key="className">NSWindow</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">BWToolkitFramework.framework/Headers/NSWindow+BWAdditions.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">NSWindowController</string> + <string key="superclassName">NSResponder</string> + <object class="NSMutableDictionary" key="actions"> + <string key="NS.key.0">showWindow:</string> + <string key="NS.object.0">id</string> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBFrameworkSource</string> + <string key="minorKey">AppKit.framework/Headers/NSWindowController.h</string> + </object> + </object> </object> </object> <int key="IBDocument.localizationMode">0</int> + <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string> <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string> <integer value="1050" key="NS.object.0"/> @@ -4750,5 +6137,30 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes> <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> <string key="IBDocument.LastKnownRelativeProjectPath">../../sequel-pro.xcodeproj</string> <int key="IBDocument.defaultPropertyAccessControl">3</int> + <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSApplicationIcon</string> + <string>NSRefreshTemplate</string> + <string>NSSwitch</string> + <string>selectall</string> + <string>selectnone</string> + <string>toolbar-export-csv</string> + <string>toolbar-export-sql</string> + <string>toolbar-export-xml</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>{128, 128}</string> + <string>{10, 12}</string> + <string>{15, 15}</string> + <string>{14, 17}</string> + <string>{14, 17}</string> + <string>{32, 32}</string> + <string>{32, 32}</string> + <string>{32, 32}</string> + </object> + </object> </data> </archive> diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib index 26ba4dc4..6b7962a2 100644 --- a/Interfaces/English.lproj/MainMenu.xib +++ b/Interfaces/English.lproj/MainMenu.xib @@ -2,7 +2,7 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10D2094</string> + <string key="IBDocument.SystemVersion">10D573</string> <string key="IBDocument.InterfaceBuilderVersion">762</string> <string key="IBDocument.AppKitVersion">1038.29</string> <string key="IBDocument.HIToolboxVersion">460.00</string> @@ -12,7 +12,7 @@ </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="29"/> + <integer value="81"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -407,8 +407,6 @@ </object> <object class="NSMenuItem" id="934534577"> <reference key="NSMenu" ref="709725194"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsHidden">YES</bool> <string key="NSTitle">Export…</string> <string key="NSKeyEquiv">E</string> <int key="NSKeyEquivModMask">1048576</int> @@ -417,196 +415,6 @@ <reference key="NSMixedImage" ref="315854375"/> <int key="NSTag">-1</int> </object> - <object class="NSMenuItem" id="258329286"> - <reference key="NSMenu" ref="709725194"/> - <string key="NSTitle">Export</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="277457689"> - <string key="NSTitle">Export</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="183322562"> - <reference key="NSMenu" ref="277457689"/> - <string key="NSTitle">MySQL dump…</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">5</int> - </object> - <object class="NSMenuItem" id="536279428"> - <reference key="NSMenu" ref="277457689"/> - <string key="NSTitle">Graphviz dot file...</string> - <string key="NSKeyEquiv"/> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">14</int> - </object> - <object class="NSMenuItem" id="497310196"> - <reference key="NSMenu" ref="277457689"/> - <bool key="NSIsDisabled">YES</bool> - <bool key="NSIsSeparator">YES</bool> - <string key="NSTitle"/> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - </object> - <object class="NSMenuItem" id="233286683"> - <reference key="NSMenu" ref="277457689"/> - <string key="NSTitle">Current Table</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="933751314"> - <string key="NSTitle">Current Table</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="146976252"> - <reference key="NSMenu" ref="933751314"/> - <string key="NSTitle">CSV file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">6</int> - </object> - <object class="NSMenuItem" id="609924406"> - <reference key="NSMenu" ref="933751314"/> - <string key="NSTitle">XML file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">7</int> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="586592608"> - <reference key="NSMenu" ref="277457689"/> - <string key="NSTitle">Current Browse View</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="246588402"> - <string key="NSTitle">Current Browse View</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="423106625"> - <reference key="NSMenu" ref="246588402"/> - <string key="NSTitle">CSV file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">8</int> - </object> - <object class="NSMenuItem" id="499136806"> - <reference key="NSMenu" ref="246588402"/> - <string key="NSTitle">XML file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">9</int> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="44352296"> - <reference key="NSMenu" ref="277457689"/> - <string key="NSTitle">Custom Query Result</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="983024930"> - <string key="NSTitle">Custom Query Result</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="167426300"> - <reference key="NSMenu" ref="983024930"/> - <string key="NSTitle">CSV file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">10</int> - </object> - <object class="NSMenuItem" id="6397208"> - <reference key="NSMenu" ref="983024930"/> - <string key="NSTitle">XML file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">11</int> - </object> - </object> - </object> - </object> - <object class="NSMenuItem" id="1004249038"> - <reference key="NSMenu" ref="277457689"/> - <string key="NSTitle">Multiple Tables</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <string key="NSAction">submenuAction:</string> - <object class="NSMenu" key="NSSubmenu" id="703407521"> - <string key="NSTitle">Multiple Tables</string> - <object class="NSMutableArray" key="NSMenuItems"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMenuItem" id="564863492"> - <reference key="NSMenu" ref="703407521"/> - <string key="NSTitle">CSV file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">12</int> - </object> - <object class="NSMenuItem" id="1048701220"> - <reference key="NSMenu" ref="703407521"/> - <string key="NSTitle">XML file...</string> - <string key="NSKeyEquiv"/> - <int key="NSKeyEquivModMask">1048576</int> - <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="625762401"/> - <reference key="NSMixedImage" ref="315854375"/> - <int key="NSTag">13</int> - </object> - </object> - </object> - </object> - </object> - </object> - </object> <object class="NSMenuItem" id="276532848"> <reference key="NSMenu" ref="709725194"/> <bool key="NSIsDisabled">YES</bool> @@ -2177,30 +1985,6 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">export:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="183322562"/> - </object> - <int key="connectionID">427</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">export:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="167426300"/> - </object> - <int key="connectionID">430</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">export:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="6397208"/> - </object> - <int key="connectionID">434</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> <string key="label">donate:</string> <reference key="source" ref="432083121"/> <reference key="destination" ref="683151301"/> @@ -2409,22 +2193,6 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">exportMultipleTables:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="564863492"/> - </object> - <int key="connectionID">681</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">exportMultipleTables:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="1048701220"/> - </object> - <int key="connectionID">682</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> <string key="label">checkTable:</string> <reference key="source" ref="63651044"/> <reference key="destination" ref="785987636"/> @@ -2761,14 +2529,6 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">export:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="536279428"/> - </object> - <int key="connectionID">931</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> <string key="label">selectEnclosingBrackets:</string> <reference key="source" ref="63651044"/> <reference key="destination" ref="854155133"/> @@ -2993,38 +2753,6 @@ </object> <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> - <string key="label">exportTable:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="146976252"/> - </object> - <int key="connectionID">1073</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">exportTable:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="609924406"/> - </object> - <int key="connectionID">1074</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">exportTable:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="423106625"/> - </object> - <int key="connectionID">1075</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">exportTable:</string> - <reference key="source" ref="63651044"/> - <reference key="destination" ref="499136806"/> - </object> - <int key="connectionID">1076</int> - </object> - <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> <string key="label">copyDatabase:</string> <reference key="source" ref="63651044"/> <reference key="destination" ref="820553150"/> @@ -3270,7 +2998,6 @@ <reference ref="985746359"/> <reference ref="617509313"/> <reference ref="867960923"/> - <reference ref="258329286"/> <reference ref="3878246"/> <reference ref="934534577"/> <reference ref="849728981"/> @@ -3334,107 +3061,6 @@ <reference key="parent" ref="709725194"/> </object> <object class="IBObjectRecord"> - <int key="objectID">372</int> - <reference key="object" ref="258329286"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="277457689"/> - </object> - <reference key="parent" ref="709725194"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">373</int> - <reference key="object" ref="277457689"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="183322562"/> - <reference ref="497310196"/> - <reference ref="233286683"/> - <reference ref="44352296"/> - <reference ref="1004249038"/> - <reference ref="586592608"/> - <reference ref="536279428"/> - </object> - <reference key="parent" ref="258329286"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">377</int> - <reference key="object" ref="183322562"/> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">378</int> - <reference key="object" ref="497310196"/> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">385</int> - <reference key="object" ref="233286683"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="933751314"/> - </object> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">394</int> - <reference key="object" ref="44352296"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="983024930"/> - </object> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">395</int> - <reference key="object" ref="983024930"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="167426300"/> - <reference ref="6397208"/> - </object> - <reference key="parent" ref="44352296"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">405</int> - <reference key="object" ref="167426300"/> - <reference key="parent" ref="983024930"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">433</int> - <reference key="object" ref="6397208"/> - <reference key="parent" ref="983024930"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">400</int> - <reference key="object" ref="1004249038"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="703407521"/> - </object> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">401</int> - <reference key="object" ref="703407521"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="564863492"/> - <reference ref="1048701220"/> - </object> - <reference key="parent" ref="1004249038"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">407</int> - <reference key="object" ref="564863492"/> - <reference key="parent" ref="703407521"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">408</int> - <reference key="object" ref="1048701220"/> - <reference key="parent" ref="703407521"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">103</int> <reference key="object" ref="835585357"/> <object class="NSMutableArray" key="children"> @@ -3732,55 +3358,6 @@ <reference key="parent" ref="0"/> </object> <object class="IBObjectRecord"> - <int key="objectID">386</int> - <reference key="object" ref="933751314"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="609924406"/> - <reference ref="146976252"/> - </object> - <reference key="parent" ref="233286683"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">404</int> - <reference key="object" ref="609924406"/> - <reference key="parent" ref="933751314"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">403</int> - <reference key="object" ref="146976252"/> - <reference key="parent" ref="933751314"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">821</int> - <reference key="object" ref="586592608"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="246588402"/> - </object> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">822</int> - <reference key="object" ref="246588402"/> - <object class="NSMutableArray" key="children"> - <bool key="EncodedWithXMLCoder">YES</bool> - <reference ref="423106625"/> - <reference ref="499136806"/> - </object> - <reference key="parent" ref="586592608"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">823</int> - <reference key="object" ref="423106625"/> - <reference key="parent" ref="246588402"/> - </object> - <object class="IBObjectRecord"> - <int key="objectID">824</int> - <reference key="object" ref="499136806"/> - <reference key="parent" ref="246588402"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">833</int> <reference key="object" ref="302542110"/> <reference key="parent" ref="487618540"/> @@ -4181,11 +3758,6 @@ <reference key="parent" ref="71086556"/> </object> <object class="IBObjectRecord"> - <int key="objectID">930</int> - <reference key="object" ref="536279428"/> - <reference key="parent" ref="277457689"/> - </object> - <object class="IBObjectRecord"> <int key="objectID">932</int> <reference key="object" ref="854155133"/> <reference key="parent" ref="1792"/> @@ -4644,43 +4216,6 @@ <string>324.ImportedFromIB2</string> <string>369.IBPluginDependency</string> <string>369.ImportedFromIB2</string> - <string>372.IBPluginDependency</string> - <string>372.ImportedFromIB2</string> - <string>373.IBEditorWindowLastContentRect</string> - <string>373.IBPluginDependency</string> - <string>373.ImportedFromIB2</string> - <string>373.editorWindowContentRectSynchronizationRect</string> - <string>377.IBPluginDependency</string> - <string>377.ImportedFromIB2</string> - <string>378.IBPluginDependency</string> - <string>378.ImportedFromIB2</string> - <string>385.IBPluginDependency</string> - <string>385.ImportedFromIB2</string> - <string>386.IBEditorWindowLastContentRect</string> - <string>386.IBPluginDependency</string> - <string>386.ImportedFromIB2</string> - <string>394.IBPluginDependency</string> - <string>394.ImportedFromIB2</string> - <string>395.IBEditorWindowLastContentRect</string> - <string>395.IBPluginDependency</string> - <string>395.ImportedFromIB2</string> - <string>400.IBPluginDependency</string> - <string>400.ImportedFromIB2</string> - <string>401.IBEditorWindowLastContentRect</string> - <string>401.IBPluginDependency</string> - <string>401.ImportedFromIB2</string> - <string>403.IBPluginDependency</string> - <string>403.ImportedFromIB2</string> - <string>404.IBPluginDependency</string> - <string>404.ImportedFromIB2</string> - <string>405.IBPluginDependency</string> - <string>405.ImportedFromIB2</string> - <string>407.IBPluginDependency</string> - <string>407.ImportedFromIB2</string> - <string>408.IBPluginDependency</string> - <string>408.ImportedFromIB2</string> - <string>433.IBPluginDependency</string> - <string>433.ImportedFromIB2</string> <string>435.IBPluginDependency</string> <string>435.ImportedFromIB2</string> <string>438.IBPluginDependency</string> @@ -4815,15 +4350,6 @@ <string>81.editorWindowContentRectSynchronizationRect</string> <string>82.IBPluginDependency</string> <string>82.ImportedFromIB2</string> - <string>821.IBPluginDependency</string> - <string>821.ImportedFromIB2</string> - <string>822.IBEditorWindowLastContentRect</string> - <string>822.IBPluginDependency</string> - <string>822.ImportedFromIB2</string> - <string>823.IBPluginDependency</string> - <string>823.ImportedFromIB2</string> - <string>824.IBPluginDependency</string> - <string>824.ImportedFromIB2</string> <string>83.IBPluginDependency</string> <string>83.ImportedFromIB2</string> <string>833.IBPluginDependency</string> @@ -4868,7 +4394,6 @@ <string>926.IBPluginDependency</string> <string>926.ImportedFromIB2</string> <string>928.IBPluginDependency</string> - <string>930.IBPluginDependency</string> <string>932.IBPluginDependency</string> <string>935.IBPluginDependency</string> <string>938.IBPluginDependency</string> @@ -5024,43 +4549,6 @@ <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> - <string>{{795, 182}, {210, 133}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> - <string>{{399, 465}, {213, 93}}</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>{{819, 131}, {133, 43}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> - <string>{{819, 91}, {133, 43}}</string> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> - <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <integer value="1"/> - <string>{{819, 71}, {133, 43}}</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> - <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> <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -5187,7 +4675,7 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{460, 127}, {287, 403}}</string> + <string>{{460, 147}, {287, 383}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> <string>{{180, 535}, {182, 253}}</string> @@ -5195,15 +4683,6 @@ <integer value="1"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1"/> - <string>{{819, 111}, {133, 43}}</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> @@ -5293,7 +4772,6 @@ <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 class="NSMutableDictionary"> <string key="NS.key.0">ToolTip</string> <object class="IBToolTipAttribute" key="NS.object.0"> @@ -6304,6 +5782,7 @@ <string>copyDatabase:</string> <string>export:</string> <string>exportMultipleTables:</string> + <string>exportSelectedTablesAs:</string> <string>exportTable:</string> <string>flushPrivileges:</string> <string>flushTable:</string> @@ -6387,6 +5866,7 @@ <string>id</string> <string>id</string> <string>id</string> + <string>id</string> </object> </object> <object class="NSMutableDictionary" key="outlets"> diff --git a/Resources/English.lproj/Localizable.strings b/Resources/English.lproj/Localizable.strings Binary files differindex d6c6439a..d29d80cb 100644 --- a/Resources/English.lproj/Localizable.strings +++ b/Resources/English.lproj/Localizable.strings diff --git a/Source/SPCSVExporter.h b/Source/SPCSVExporter.h index 5c78be04..b0c6c46b 100644 --- a/Source/SPCSVExporter.h +++ b/Source/SPCSVExporter.h @@ -25,34 +25,93 @@ #import <Cocoa/Cocoa.h> -#import "MCPKit.h" #import "SPExporter.h" +#import "SPCSVExporterProtocol.h" +@class SPTableData; + +/** + * @class SPCSVExporter SPCSVExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * CSV exporter class. + */ @interface SPCSVExporter : SPExporter -{ - // CSV data +{ + /** + * Exporter delegate + */ + NSObject <SPCSVExporterProtocol> *delegate; + + /** + * Data array + */ NSArray *csvDataArray; - MCPStreamingResult *csvDataResult; - // CSV options + /** + * Table name + */ + NSString *csvTableName; + + /** + * Output field names + */ BOOL csvOutputFieldNames; + + /** + * CSV field separator string + */ NSString *csvFieldSeparatorString; + + /** + * CSV enclosing character string + */ NSString *csvEnclosingCharacterString; + + /** + * CSV escape string + */ NSString *csvEscapeString; + + /** + * CSV line ending string + */ NSString *csvLineEndingString; + + /** + * CSV NULL string + */ NSString *csvNULLString; - NSArray *csvTableColumnNumericStatus; + + /** + * Table data + */ + SPTableData *csvTableData; } -@property (readwrite, retain) NSArray *csvDataArray; -@property (readwrite, retain) MCPStreamingResult *csvDataResult; +@property(readwrite, assign) NSObject <SPCSVExporterProtocol> *delegate; + +@property(readwrite, retain) NSArray *csvDataArray; +@property(readwrite, retain) NSString *csvTableName; + +@property(readwrite, assign) BOOL csvOutputFieldNames; + +@property(readwrite, retain) NSString *csvFieldSeparatorString; +@property(readwrite, retain) NSString *csvEnclosingCharacterString; +@property(readwrite, retain) NSString *csvEscapeString; +@property(readwrite, retain) NSString *csvLineEndingString; +@property(readwrite, retain) NSString *csvNULLString; + +@property(readwrite, retain) SPTableData *csvTableData; -@property (readwrite, assign) BOOL csvOutputFieldNames; -@property (readwrite, retain) NSString *csvFieldSeparatorString; -@property (readwrite, retain) NSString *csvEnclosingCharacterString; -@property (readwrite, retain) NSString *csvEscapeString; -@property (readwrite, retain) NSString *csvLineEndingString; -@property (readwrite, retain) NSString *csvNULLString; -@property (readwrite, retain) NSArray *csvTableColumnNumericStatus; +/** + * Initialise an instance of SPCSVExporter using the supplied delegate. + * + * @param exportDelegate The exporter delegate + * + * @return The initialised instance + */ +- (id)initWithDelegate:(NSObject *)exportDelegate; @end diff --git a/Source/SPCSVExporter.m b/Source/SPCSVExporter.m index 4937e7c9..e6342e68 100644 --- a/Source/SPCSVExporter.m +++ b/Source/SPCSVExporter.m @@ -23,24 +23,44 @@ // // More info at <http://code.google.com/p/sequel-pro/> +#import <MCPKit/MCPKit.h> + #import "SPCSVExporter.h" #import "SPArrayAdditions.h" +#import "SPStringAdditions.h" +#import "SPFileHandle.h" +#import "SPTableData.h" +#import "SPExportUtilities.h" @implementation SPCSVExporter +@synthesize delegate; @synthesize csvDataArray; -@synthesize csvDataResult; - +@synthesize csvTableName; @synthesize csvOutputFieldNames; @synthesize csvFieldSeparatorString; @synthesize csvEnclosingCharacterString; @synthesize csvEscapeString; @synthesize csvLineEndingString; @synthesize csvNULLString; -@synthesize csvTableColumnNumericStatus; +@synthesize csvTableData; + +/** + * Initialise an instance of SPCSVExporter using the supplied delegate. + */ +- (id)initWithDelegate:(NSObject *)exportDelegate +{ + if ((self = [super init])) { + SPExportDelegateConformsToProtocol(exportDelegate, @protocol(SPCSVExporterProtocol)); + + [self setDelegate:exportDelegate]; + } + + return self; +} /** - * Start the CSV data conversion process. This method is automatically called when an instance of this object + * Start the CSV export process. This method is automatically called when an instance of this class * is placed on an NSOperationQueue. Do not call it directly as there is no manual multithreading. */ - (void)main @@ -49,44 +69,61 @@ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSMutableString *csvString = [NSMutableString string]; - NSMutableString *csvData = [NSMutableString string]; NSMutableString *csvCellString = [NSMutableString string]; + + NSMutableArray *tableColumnNumericStatus = [NSMutableArray array]; - NSArray *csvRow; - NSScanner *csvNumericTester; + NSArray *csvRow = nil; + NSScanner *csvNumericTester = nil; + MCPStreamingResult *streamingResult = nil; NSString *escapedEscapeString, *escapedFieldSeparatorString, *escapedEnclosingString, *escapedLineEndString, *dataConversionString; id csvCell; BOOL csvCellIsNumeric; BOOL quoteFieldSeparators = [[self csvEnclosingCharacterString] isEqualToString:@""]; - NSUInteger i, totalRows, csvCellCount = 0; + NSUInteger i, totalRows, lastProgressValue, csvCellCount = 0; + + // Check to see if we have at least a table name or data array + if ((![self csvTableName]) && (![self csvDataArray]) || + ([[self csvTableName] isEqualToString:@""]) && ([[self csvDataArray] count] == 0)) + { + [pool release]; + return; + } // Check that we have all the required info before starting the export if ((![self csvOutputFieldNames]) || (![self csvFieldSeparatorString]) || (![self csvEscapeString]) || - (![self csvLineEndingString]) || - (![self csvTableColumnNumericStatus])) + (![self csvLineEndingString])) { + [pool release]; return; } - // Check that the CSV output options are not just empty strings or empty arrays + // Check that the CSV output options are not just empty strings if (([[self csvFieldSeparatorString] isEqualToString:@""]) || ([[self csvEscapeString] isEqualToString:@""]) || - ([[self csvLineEndingString] isEqualToString:@""]) || - ([[self csvTableColumnNumericStatus] count] == 0)) + ([[self csvLineEndingString] isEqualToString:@""])) { + [pool release]; return; } - - // Check that we have at least some data to export - if ((![self csvDataArray]) && (![self csvDataResult])) return; - + + // Inform the delegate that the export process is about to begin + [delegate performSelectorOnMainThread:@selector(csvExportProcessWillBegin:) withObject:self waitUntilDone:NO]; + // Mark the process as running [self setExportProcessIsRunning:YES]; + lastProgressValue = 0; + + // Make a streaming request for the data if the data array isn't set + if ((![self csvDataArray]) && [self csvTableName]) { + streamingResult = [connection streamingQueryString:[NSString stringWithFormat:@"SELECT * FROM %@", [[self csvTableName] backtickQuotedString]] useLowMemoryBlockingStreaming:[self exportUsingLowMemoryBlockingStreaming]]; + } + // Detect and restore special characters being used as terminating or line end strings NSMutableString *tempSeparatorString = [NSMutableString stringWithString:[self csvFieldSeparatorString]]; @@ -135,17 +172,62 @@ // headers as the first row, decide whether to skip the first row. NSUInteger currentRowIndex = 0; - [csvData setString:@""]; + [csvString setString:@""]; + if ([self csvDataArray]) totalRows = [[self csvDataArray] count]; if (([self csvDataArray]) && (![self csvOutputFieldNames])) currentRowIndex++; + if ([self csvTableName] && (![self csvDataArray])) { + + NSDictionary *tableDetails = [[NSDictionary alloc] init]; + + // Determine whether the supplied table is actually a table or a view via the CREATE TABLE command, and get the table details + MCPResult *queryResult = [connection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE %@", [[self csvTableName] backtickQuotedString]]]; + + [queryResult setReturnDataAsStrings:YES]; + + if ([queryResult numOfRows]) { + tableDetails = [NSDictionary dictionaryWithDictionary:[queryResult fetchRowAsDictionary]]; + + tableDetails = [NSDictionary dictionaryWithDictionary:([tableDetails objectForKey:@"Create View"]) ? [[self csvTableData] informationForView:[self csvTableName]] : [[self csvTableData] informationForTable:[self csvTableName]]]; + } + + // Retrieve the table details via the data class, and use it to build an array containing column numeric status + for (NSDictionary *column in [tableDetails objectForKey:@"columns"]) + { + NSString *tableColumnTypeGrouping = [column objectForKey:@"typegrouping"]; + + [tableColumnNumericStatus addObject:[NSNumber numberWithBool:([tableColumnTypeGrouping isEqualToString:@"bit"] || + [tableColumnTypeGrouping isEqualToString:@"integer"] || + [tableColumnTypeGrouping isEqualToString:@"float"])]]; + } + + [tableDetails release]; + } + // Drop into the processing loop NSAutoreleasePool *csvExportPool = [[NSAutoreleasePool alloc] init]; NSUInteger currentPoolDataLength = 0; + // Inform the delegate that we are about to start writing the data to disk + [delegate performSelectorOnMainThread:@selector(csvExportProcessWillBeginWritingData:) withObject:self waitUntilDone:NO]; + while (1) { + // Check for cancellation flag + if ([self isCancelled]) { + if (streamingResult) { + [connection cancelCurrentQuery]; + [streamingResult cancelResultLoad]; + } + + [csvExportPool release]; + [pool release]; + + return; + } + // Retrieve the next row from the supplied data, either directly from the array... if ([self csvDataArray]) { csvRow = NSArrayObjectAtIndex([self csvDataArray], currentRowIndex); @@ -154,11 +236,11 @@ else { // If still requested to read the field names, get the field names if ([self csvOutputFieldNames]) { - csvRow = [[self csvDataResult] fetchFieldNames]; + csvRow = [streamingResult fetchFieldNames]; [self setCsvOutputFieldNames:NO]; } else { - csvRow = [[self csvDataResult] fetchNextRowAsArray]; + csvRow = [streamingResult fetchNextRowAsArray]; if (!csvRow) break; } @@ -171,6 +253,14 @@ for (i = 0 ; i < csvCellCount; i++) { + // Check for cancellation flag + if ([self isCancelled]) { + [csvExportPool release]; + [pool release]; + + return; + } + csvCell = NSArrayObjectAtIndex(csvRow, i); // For NULL objects supplied from a queryResult, add an unenclosed null string as per prefs @@ -208,8 +298,8 @@ } else { // If an array of bools supplying information as to whether the column is numeric has been supplied, use it. - if ([self csvTableColumnNumericStatus] != nil) { - csvCellIsNumeric = [NSArrayObjectAtIndex([self csvTableColumnNumericStatus], i) boolValue]; + if ([tableColumnNumericStatus count] > 0) { + csvCellIsNumeric = [NSArrayObjectAtIndex(tableColumnNumericStatus, i) boolValue]; } // Otherwise, first test whether this cell contains data else if ([NSArrayObjectAtIndex(csvRow, i) isKindOfClass:[NSData class]]) { @@ -270,40 +360,49 @@ } // Append the line ending to the string for this row, and record the length processed for pool flushing - [csvString appendString:[self csvLineEndingString]]; - [csvData appendString:csvString]; - + [csvString appendString:[self csvLineEndingString]]; currentPoolDataLength += [csvString length]; + // Write it to the fileHandle + [[self exportOutputFileHandle] writeData:[csvString dataUsingEncoding:[self exportOutputEncoding]]]; + currentRowIndex++; - // Update the progress value - if (totalRows) [self setExportProgressValue:(((i + 1) * 100) / totalRows)]; + // Update the progress + if (totalRows && (currentRowIndex * ([self exportMaxProgress] / totalRows)) > lastProgressValue) { + + NSInteger progress = (currentRowIndex * ([self exportMaxProgress] / totalRows)); + + [self setExportProgressValue:progress]; + + lastProgressValue = progress; + } + + // Inform the delegate that the export's progress has been updated + [delegate performSelectorOnMainThread:@selector(csvExportProcessProgressUpdated:) withObject:self waitUntilDone:NO]; // If an array was supplied and we've processed all rows, break if ([self csvDataArray] && (totalRows == currentRowIndex)) break; // Drain the autorelease pool as required to keep memory usage low if (currentPoolDataLength > 250000) { - [csvExportPool drain]; + [csvExportPool release]; csvExportPool = [[NSAutoreleasePool alloc] init]; } } - - // Assign the resulting CSV data to the expoter's export data - [self setExportData:csvData]; + + // Write data to disk + [[self exportOutputFileHandle] synchronizeFile]; // Mark the process as not running [self setExportProcessIsRunning:NO]; - // Call the delegate's didEndSelector while passing this exporter to it - [[self delegate] performSelectorOnMainThread:[self didEndSelector] withObject:self waitUntilDone:NO]; + // Inform the delegate that the export process is complete + [delegate performSelectorOnMainThread:@selector(csvExportProcessComplete:) withObject:self waitUntilDone:NO]; [pool release]; } - @catch(NSException *e) { - - } + @catch(NSException *e) {} } /** @@ -311,14 +410,15 @@ */ - (void)dealloc { - [csvDataArray release], csvDataArray = nil; - [csvDataResult release], csvDataResult = nil; + if (csvDataArray) [csvDataArray release], csvDataArray = nil; + if (csvTableName) [csvTableName release], csvTableName = nil; + [csvFieldSeparatorString release], csvFieldSeparatorString = nil; [csvEnclosingCharacterString release], csvEnclosingCharacterString = nil; [csvEscapeString release], csvEscapeString = nil; [csvLineEndingString release], csvLineEndingString = nil; [csvNULLString release], csvNULLString = nil; - [csvTableColumnNumericStatus release], csvTableColumnNumericStatus = nil; + [csvTableData release], csvTableData = nil; [super dealloc]; } diff --git a/Source/SPCSVExporterDelegate.h b/Source/SPCSVExporterDelegate.h new file mode 100644 index 00000000..11170e62 --- /dev/null +++ b/Source/SPCSVExporterDelegate.h @@ -0,0 +1,38 @@ +// +// $Id$ +// +// SPCSVExporterDelegate.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 21, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportController.h" +#import "SPCSVExporterProtocol.h" + +/** + * @category SPCSVExporterDelegate SPCSVExporterDelegate.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * CSV exporter delegate category. + */ +@interface SPExportController (SPCSVExporterDelegate) <SPCSVExporterProtocol> + +@end diff --git a/Source/SPCSVExporterDelegate.m b/Source/SPCSVExporterDelegate.m new file mode 100644 index 00000000..ed5f4514 --- /dev/null +++ b/Source/SPCSVExporterDelegate.m @@ -0,0 +1,141 @@ +// +// $Id$ +// +// SPCSVExporterDelegate.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 21, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +#import "SPCSVExporter.h" +#import "SPCSVExporterDelegate.h" +#import "TableDocument.h" +#import "SPMainThreadTrampoline.h" +#import "SPFileHandle.h" + +@implementation SPExportController (SPCSVExporterDelegate) + +/** + * + */ +- (void)csvExportProcessWillBegin:(SPCSVExporter *)exporter +{ + [[exportProgressText onMainThread] displayIfNeeded]; + + [[exportProgressIndicator onMainThread] setIndeterminate:YES]; + [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:YES]; + [[exportProgressIndicator onMainThread] startAnimation:self]; + + // Only update the progress text if this is a table export + if (exportSource == SPTableExport) { + // Update the current table export index + currentTableExportIndex = (exportTableCount - [exporters count]); + + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter csvTableName]]]; + } + else { + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Fetching data...", @"export label showing that the app is fetching data")]; + } + + [[exportProgressText onMainThread] displayIfNeeded]; +} + +/** + * + */ +- (void)csvExportProcessComplete:(SPCSVExporter *)exporter +{ + NSUInteger exportCount = [exporters count]; + + // If required add the next exporter to the operation queue + if ((exportCount > 0) && (exportSource == SPTableExport)) { + + // If we're only exporting to a single file then write a header for the next table + if (!exportToMultipleFiles) { + + // If we're exporting multiple tables to a single file then append some space and the next table's + // name, but only if there is at least 2 exportes left. + [[exporter exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"%@%@%@ %@%@%@", + [exporter csvLineEndingString], + [exporter csvLineEndingString], + NSLocalizedString(@"Table", @"csv export table heading"), + [(SPCSVExporter *)[exporters objectAtIndex:0] csvTableName], + [exporter csvLineEndingString], + [exporter csvLineEndingString]] dataUsingEncoding:[exporter exportOutputEncoding]]]; + } + // Otherwise close the file handle of the exporter that just finished + // ensuring it's data is written to disk. + else { + [[exporter exportOutputFileHandle] closeFile]; + } + + [operationQueue addOperation:[exporters objectAtIndex:0]]; + + // Remove the exporter we just added to the operation queue from our list of exporters + // so we know it's already been done. + [exporters removeObjectAtIndex:0]; + } + // Otherwise if the exporter list is empty, close the progress sheet + else { + // Close the last exporter's file handle + [[exporter exportOutputFileHandle] closeFile]; + + [NSApp endSheet:exportProgressWindow returnCode:0]; + [exportProgressWindow orderOut:self]; + + // Restore query mode + [tableDocumentInstance setQueryMode:SPInterfaceQueryMode]; + + // Display Growl notification + [self displayExportFinishedGrowlNotification]; + } +} + +/** + * + */ +- (void)csvExportProcessWillBeginWritingData:(SPCSVExporter *)exporter +{ + // Only update the progress text if this is a table export + if (exportSource == SPTableExport) { + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter csvTableName]]]; + } + else { + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Writing data...", @"export label showing app is writing data")]; + } + + [[exportProgressText onMainThread] displayIfNeeded]; + + [[exportProgressIndicator onMainThread] stopAnimation:self]; + [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO]; + [[exportProgressIndicator onMainThread] setIndeterminate:NO]; + [[exportProgressIndicator onMainThread] setDoubleValue:0]; +} + +/** + * + */ +- (void)csvExportProcessProgressUpdated:(SPCSVExporter *)exporter +{ + [exportProgressIndicator setDoubleValue:[exporter exportProgressValue]]; +} + +@end diff --git a/Source/SPCSVExporterProtocol.h b/Source/SPCSVExporterProtocol.h new file mode 100644 index 00000000..67bc470c --- /dev/null +++ b/Source/SPCSVExporterProtocol.h @@ -0,0 +1,65 @@ +// +// $Id$ +// +// SPCSVExporterProtocol.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 15, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +@class SPCSVExporter; + +/** + * @protocol SPCSVExporterProtocol SPCSVExporterProtocol.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * CSV exporter delegate protocol. + */ +@protocol SPCSVExporterProtocol + +/** + * Called when the CSV export process is about to begin. + * + * @param SPCSVExporter The expoter calling the method. + */ +- (void)csvExportProcessWillBegin:(SPCSVExporter *)exporter; + +/** + * Called when the CSV export process is complete. + * + * @param SPCSVExporter The expoter calling the method. + */ +- (void)csvExportProcessComplete:(SPCSVExporter *)exporter; + +/** + * Called when the progress of the CSV export process is updated. + * + * @param SPCSVExporter The expoter calling the method. + */ +- (void)csvExportProcessProgressUpdated:(SPCSVExporter *)exporter; + +/** + * Called when the CSV export process is about to begin writing data to disk. + * + * @param SPCSVExporter The expoter calling the method. + */ +- (void)csvExportProcessWillBeginWritingData:(SPCSVExporter *)exporter; + +@end diff --git a/Source/SPConstants.h b/Source/SPConstants.h index d893b825..1fdcf68a 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -36,24 +36,46 @@ typedef enum { } SPViewMode; // Query modes -typedef enum { +enum { SPInterfaceQueryMode = 0, SPCustomQueryQueryMode = 1, SPImportExportQueryMode = 2 -} SPQueryMode; +}; +typedef NSUInteger SPQueryMode; // Connection types -typedef enum { +enum { SPTCPIPConnection = 0, SPSocketConnection = 1, SPSSHTunnelConnection = 2 -} SPConnectionType; +}; +typedef NSUInteger SPConnectionType; + +// Export type constants +enum { + SPSQLExport = 1, + SPCSVExport = 2, + SPXMLExport = 3, + SPPDFExport = 4, + SPHTMLExport = 5, + SPExcelExport = 6, + SPDotExport = 7 +}; +typedef NSUInteger SPExportType; + +// Export source constants +enum { + SPFilteredExport = 1, + SPQueryExport = 2, + SPTableExport = 3 +}; +typedef NSUInteger SPExportSource; // Table row count query usage levels typedef enum { - SPRowCountFetchNever = 0, - SPRowCountFetchIfCheap = 1, - SPRowCountFetchAlways = 2 + SPRowCountFetchNever = 0, + SPRowCountFetchIfCheap = 1, + SPRowCountFetchAlways = 2 } SPRowCountQueryUsageLevels; // Export type @@ -246,6 +268,7 @@ extern NSString *SPCSVImportFirstLineIsHeader; extern NSString *SPCSVFieldImportMappingAlignment; extern NSString *SPImportClipboardTempFileNamePrefix; extern NSString *SPSQLExportUseCompression; +extern NSString *SPNoBOMforSQLdumpFile; // Misc extern NSString *SPContentFilters; @@ -253,7 +276,6 @@ extern NSString *SPDocumentTaskEndNotification; extern NSString *SPDocumentTaskStartNotification; extern NSString *SPFieldEditorSheetFont; extern NSString *SPLastSQLFileEncoding; -extern NSString *SPNoBOMforSQLdumpFile; extern NSString *SPPrintBackground; extern NSString *SPPrintImagePreviews; extern NSString *SPQueryFavorites; @@ -273,6 +295,7 @@ extern NSString *SPDocumentationURL; extern NSString *SPContactURL; extern NSString *SPKeyboardShortcutsURL; extern NSString *SPMySQLSearchURL; +extern NSString *SPDevURL; extern NSString *SPGettingConnectedDocURL; // Toolbar constants diff --git a/Source/SPConstants.m b/Source/SPConstants.m index 3f5bf15a..536d4cfb 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -147,6 +147,7 @@ NSString *SPCSVImportLineTerminator = @"CSVImportLineTerminator"; NSString *SPCSVFieldImportMappingAlignment = @"CSVFieldImportMappingAlignment"; NSString *SPImportClipboardTempFileNamePrefix = @"/tmp/_SP_ClipBoard_Import_File_"; NSString *SPSQLExportUseCompression = @"SQLExportUseCompression"; +NSString *SPNoBOMforSQLdumpFile = @"NoBOMforSQLdumpFile"; // Misc NSString *SPContentFilters = @"ContentFilters"; @@ -154,7 +155,6 @@ NSString *SPDocumentTaskEndNotification = @"DocumentTaskEnded"; NSString *SPDocumentTaskStartNotification = @"DocumentTaskStarted"; NSString *SPFieldEditorSheetFont = @"FieldEditorSheetFont"; NSString *SPLastSQLFileEncoding = @"lastSqlFileEncoding"; -NSString *SPNoBOMforSQLdumpFile = @"NoBOMforSQLdumpFile"; NSString *SPPrintBackground = @"PrintBackground"; NSString *SPPrintImagePreviews = @"PrintImagePreviews"; NSString *SPQueryFavorites = @"queryFavorites"; @@ -174,6 +174,7 @@ NSString *SPDocumentationURL = @"http://www.sequelpro.com/do NSString *SPContactURL = @"http://www.sequelpro.com/docs/Contact_the_developers"; NSString *SPKeyboardShortcutsURL = @"http://www.sequelpro.com/docs/Keyboard_Shortcuts"; NSString *SPMySQLSearchURL = @"http://search.mysql.com/search?q=%@&site=refman-%@"; +NSString *SPDevURL = @"http://code.google.com/p/sequel-pro/"; NSString *SPGettingConnectedDocURL = @"http://www.sequelpro.com/docs/Getting_Connected"; // Toolbar constants diff --git a/Source/SPDotExporter.h b/Source/SPDotExporter.h new file mode 100644 index 00000000..338acc37 --- /dev/null +++ b/Source/SPDotExporter.h @@ -0,0 +1,96 @@ +// +// $Id$ +// +// SPDotExporter.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 17, 2010 +// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +#import "SPExporter.h" +#import "SPDotExporterProtocol.h" + +@class SPTableData; + +/** + * @class SPXMLExporter SPXMLExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * XML exporter class. + */ +@interface SPDotExporter : SPExporter +{ + /** + * Exporter delegate + */ + NSObject <SPDotExporterProtocol> *delegate; + + /** + * Table information + */ + NSArray *dotExportTables; + + /** + * Current table + */ + NSString *dotExportCurrentTable; + + /** + * Table data + */ + SPTableData *dotTableData; + + /** + * Database host + */ + NSString *dotDatabaseHost; + + /** + * Database name + */ + NSString *dotDatabaseName; + + /** + * Database version + */ + NSString *dotDatabaseVersion; +} + +@property(readwrite, assign) NSObject *delegate; +@property(readwrite, retain) NSArray *dotExportTables; +@property(readwrite, retain) NSString *dotExportCurrentTable; +@property(readwrite, retain) SPTableData *dotTableData; + +@property(readwrite, retain) NSString *dotDatabaseHost; +@property(readwrite, retain) NSString *dotDatabaseName; +@property(readwrite, retain) NSString *dotDatabaseVersion; + +/** + * Initialise an instance of SPDotExporter using the supplied delegate. + * + * @param exportDelegate The exporter delegate + * + * @return The initialised instance + */ +- (id)initWithDelegate:(NSObject *)exportDelegate; + +@end diff --git a/Source/SPDotExporter.m b/Source/SPDotExporter.m new file mode 100644 index 00000000..cbb132d9 --- /dev/null +++ b/Source/SPDotExporter.m @@ -0,0 +1,227 @@ +// +// $Id$ +// +// SPDotExporter.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 17, 2010 +// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPDotExporter.h" +#import "SPConstants.h" +#import "SPFileHandle.h" +#import "SPArrayAdditions.h" +#import "SPTableData.h" +#import "SPExportUtilities.h" + +@implementation SPDotExporter + +@synthesize delegate; +@synthesize dotExportTables; +@synthesize dotExportCurrentTable; +@synthesize dotTableData; +@synthesize dotDatabaseHost; +@synthesize dotDatabaseName; +@synthesize dotDatabaseVersion; + +/** + * Initialise an instance of SPDotExporter using the supplied delegate. + */ +- (id)initWithDelegate:(NSObject *)exportDelegate +{ + if ((self = [super init])) { + SPExportDelegateConformsToProtocol(exportDelegate, @protocol(SPDotExporterProtocol)); + + [self setDelegate:exportDelegate]; + [self setDotExportCurrentTable:nil]; + } + + return self; +} + +/** + * Start the Dot schema export process. This method is automatically called when an instance of this class + * is placed on an NSOperationQueue. Do not call it directly as there is no manual multithreading. + */ +- (void)main +{ + @try { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSMutableString *metaString = [NSMutableString string]; + + // Check that we have all the required info before starting the export + if ((![self dotExportTables]) || (![self dotTableData]) || ([[self dotExportTables] count] == 0)) { + [pool release]; + return; + } + + // Inform the delegate that the export process is about to begin + [delegate performSelectorOnMainThread:@selector(dotExportProcessWillBegin:) withObject:self waitUntilDone:NO]; + + // Mark the process as running + [self setExportProcessIsRunning:YES]; + + [metaString setString:@"// ************************************************************\n"]; + [metaString appendString:@"// Generated by: Sequel Pro\n"]; + [metaString appendString:[NSString stringWithFormat:@"// Version %@\n//\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]]; + [metaString appendString:[NSString stringWithFormat:@"// %@\n// %@\n//\n", SPHomePageURL, SPDevURL]]; + [metaString appendString:[NSString stringWithFormat:@"// Host: %@ (MySQL %@)\n", [self dotDatabaseHost], [self dotDatabaseVersion]]]; + [metaString appendString:[NSString stringWithFormat:@"// Database: %@\n", [self dotDatabaseName]]]; + [metaString appendString:[NSString stringWithFormat:@"// Generation Time: %@\n", [NSDate date]]]; + [metaString appendString:@"// ************************************************************\n\n"]; + + [metaString appendString:@"digraph \"Database Structure\" {\n"]; + [metaString appendString:[NSString stringWithFormat:@"\tlabel = \"ER Diagram: %@\";\n", [self dotDatabaseName]]]; + [metaString appendString:@"\tlabelloc = t;\n"]; + [metaString appendString:@"\tcompound = true;\n"]; + [metaString appendString:@"\tnode [ shape = record ];\n"]; + [metaString appendString:@"\tfontname = \"Helvetica\";\n"]; + [metaString appendString:@"\tranksep = 1.25;\n"]; + [metaString appendString:@"\tratio = 0.7;\n"]; + [metaString appendString:@"\trankdir = LR;\n"]; + + // Write information to the file + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + + NSMutableArray *fkInfo = [[NSMutableArray alloc] init]; + + // Process the tables + for (NSInteger i = 0; i < [[self dotExportTables] count]; i++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + NSString *tableName = NSArrayObjectAtIndex([self dotExportTables], i); + NSDictionary *tableInfo = [[self dotTableData] informationForTable:tableName]; + + // Set the current table + [self setDotExportCurrentTable:tableName]; + + // Inform the delegate that we are about to start fetcihing data for the current table + [delegate performSelectorOnMainThread:@selector(dotExportProcessWillBeginFetchingData:) withObject:self waitUntilDone:NO]; + + NSString *hdrColor = @"#DDDDDD"; + + if ([[tableInfo objectForKey:@"type"] isEqualToString:@"View"]) { + hdrColor = @"#DDDDFF"; + } + + [metaString setString:[NSString stringWithFormat:@"\tsubgraph \"table_%@\" {\n", tableName]]; + [metaString appendString:@"\t\tnode [ shape = \"plaintext\" ];\n"]; + [metaString appendString:[NSString stringWithFormat:@"\t\t\"%@\" [ label=<\n", tableName]]; + [metaString appendString:@"\t\t\t<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLBORDER=\"1\">\n"]; + [metaString appendString:[NSString stringWithFormat:@"\t\t\t<TR><TD COLSPAN=\"3\" BGCOLOR=\"%@\">%@</TD></TR>\n", hdrColor, tableName]]; + + // Get the column info + NSArray *columnInfo = [tableInfo objectForKey:@"columns"]; + + for (NSInteger j = 0; j < [columnInfo count]; j++ ) + { + [metaString appendString:[NSString stringWithFormat:@"\t\t\t<TR><TD COLSPAN=\"3\" PORT=\"%@\">%@:<FONT FACE=\"Helvetica-Oblique\" POINT-SIZE=\"10\">%@</FONT></TD></TR>\n", [[columnInfo objectAtIndex:j] objectForKey:@"name"], [[columnInfo objectAtIndex:j] objectForKey:@"name"], [[columnInfo objectAtIndex:j] objectForKey:@"type"]]]; + } + + [metaString appendString:@"\t\t\t</TABLE>>\n"]; + [metaString appendString:@"\t\t];\n"]; + [metaString appendString:@"\t}\n"]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + + // see about relations + columnInfo = [tableInfo objectForKey:@"constraints"]; + + for (NSInteger j = 0; j < [columnInfo count]; j++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + // Get the column references. Currently the columns themselves are an array, + // while reference columns and tables are comma separated if there are more than + // one. Only use the first of each for the time being. + NSArray *ccols = [NSArrayObjectAtIndex(columnInfo, j) objectForKey:@"columns"]; + NSString *ccol = NSArrayObjectAtIndex(columnInfo, 0); + NSString *rcol = [NSArrayObjectAtIndex(columnInfo, j) objectForKey:@"ref_columns"]; + + NSString *extra = @""; + + if ([ccols count] > 1) { + extra = @" [ arrowhead=crow, arrowtail=odiamond ]"; + rcol = NSArrayObjectAtIndex([rcol componentsSeparatedByString:@","], 0); + } + + [fkInfo addObject:[NSString stringWithFormat:@"%@:%@ -> %@:%@ %@", tableName, ccol, [NSArrayObjectAtIndex(columnInfo, j) objectForKey:@"ref_table"], rcol, extra]]; + } + } + + // Inform the delegate that we are about to start fetching relations data for the current table + [delegate performSelectorOnMainThread:@selector(dotExportProcessWillBeginFetchingRelationsData:) withObject:self waitUntilDone:NO]; + + [metaString setString:@"edge [ arrowhead=inv, arrowtail=normal, style=dashed, color=\"#444444\" ];\n"]; + + // Get the relations + for (NSInteger i = 0; i < [fkInfo count]; i++) + { + [metaString appendString:[NSString stringWithFormat:@"%@;\n", [fkInfo objectAtIndex:i]]]; + } + + [fkInfo release]; + + [metaString appendString:@"}\n"]; + + // Write information to the file + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + + // Write data to disk + [[self exportOutputFileHandle] closeFile]; + + // Mark the process as not running + [self setExportProcessIsRunning:NO]; + + // Inform the delegate that the export process is complete + [delegate performSelectorOnMainThread:@selector(dotExportProcessComplete:) withObject:self waitUntilDone:NO]; + + [pool release]; + } + @catch (NSException *e) { } +} + +/** + * Dealloc + */ +- (void)dealloc +{ + delegate = nil; + + [dotExportTables release], dotExportTables = nil; + [dotExportCurrentTable release], dotExportCurrentTable = nil; + [dotTableData release], dotTableData = nil; + [dotDatabaseHost release], dotDatabaseHost = nil; + [dotDatabaseName release], dotDatabaseName = nil; + [dotDatabaseVersion release], dotDatabaseVersion = nil; + + [super dealloc]; +} + +@end diff --git a/Source/SPDotExporterDelegate.h b/Source/SPDotExporterDelegate.h new file mode 100644 index 00000000..6661bca5 --- /dev/null +++ b/Source/SPDotExporterDelegate.h @@ -0,0 +1,38 @@ +// +// $Id$ +// +// SPDotExporterDelegate.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 17, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportController.h" +#import "SPDotExporterProtocol.h" + +/** + * @category SPDotExporterDelegate SPDotExporterDelegate.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * Dot exporter delegate category. + */ +@interface SPExportController (SPDotExporterDelegate) <SPDotExporterProtocol> + +@end diff --git a/Source/SPDotExporterDelegate.m b/Source/SPDotExporterDelegate.m new file mode 100644 index 00000000..ce74e408 --- /dev/null +++ b/Source/SPDotExporterDelegate.m @@ -0,0 +1,98 @@ +// +// $Id$ +// +// SPDotExporterDelegate.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 17, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPDotExporterDelegate.h" +#import "SPDotExporter.h" +#import "TableDocument.h" +#import "SPMainThreadTrampoline.h" + +@implementation SPExportController (SPDotExporterDelegate) + +/** + * + */ +- (void)dotExportProcessWillBegin:(SPDotExporter *)exporter +{ + [[exportProgressTitle onMainThread] setStringValue:NSLocalizedString(@"Exporting Dot File", @"text showing that the application is exporting a Dot file")]; + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")]; + + [[exportProgressTitle onMainThread] displayIfNeeded]; + [[exportProgressText onMainThread] displayIfNeeded]; +} + +/** + * + */ +- (void)dotExportProcessComplete:(SPDotExporter *)exporter +{ + [NSApp endSheet:exportProgressWindow returnCode:0]; + [exportProgressWindow orderOut:self]; + + [tableDocumentInstance setQueryMode:SPInterfaceQueryMode]; + + // Restore the connection encoding to it's pre-export value + [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", sqlPreviousConnectionEncoding, (sqlPreviousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO]; + + // Display Growl notification + [self displayExportFinishedGrowlNotification]; +} + +/** + * + */ +- (void)dotExportProcessProgressUpdated:(SPDotExporter *)exporter +{ + +} + +/** + * + */ +- (void)dotExportProcessWillBeginFetchingData:(SPDotExporter *)exporter +{ + // Update the current table export index + currentTableExportIndex = (exportTableCount - [exporters count]); + + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter dotExportCurrentTable]]]; + + [[exportProgressText onMainThread] displayIfNeeded]; + + [[exportProgressIndicator onMainThread] stopAnimation:self]; + [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO]; + [[exportProgressIndicator onMainThread] setIndeterminate:NO]; + [[exportProgressIndicator onMainThread] setDoubleValue:0]; +} + +/** + * + */ +- (void)dotExportProcessWillBeginFetchingRelationsData:(SPDotExporter *)exporter +{ + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching relations data...", @"export label showing app is fetching relations data for a specific table"), currentTableExportIndex, exportTableCount, [exporter dotExportCurrentTable]]]; + + [[exportProgressText onMainThread] displayIfNeeded]; +} + +@end diff --git a/Source/SPDotExporterProtocol.h b/Source/SPDotExporterProtocol.h new file mode 100644 index 00000000..5d2c3db3 --- /dev/null +++ b/Source/SPDotExporterProtocol.h @@ -0,0 +1,72 @@ +// +// $Id$ +// +// SPDotExporterProtocol.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 15, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +@class SPDotExporter; + +/** + * @protocol SPDotExporterProtocol SPDotExporterProtocol.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * Dot schema exporter delegate protocol. + */ +@protocol SPDotExporterProtocol + +/** + * Called when the dot export process is about to begin. + * + * @param SPDotExpoter The expoter calling the method. + */ +- (void)dotExportProcessWillBegin:(SPDotExporter *)exporter; + +/** + * Called when the dot export process is complete. + * + * @param SPDotExpoter The expoter calling the method. + */ +- (void)dotExportProcessComplete:(SPDotExporter *)exporter; + +/** + * Called when the progress of the dot export process is updated. + * + * @param SPDotExpoter The expoter calling the method. + */ +- (void)dotExportProcessProgressUpdated:(SPDotExporter *)exporter; + +/** + * Called when the dot export process is about to begin fetching data from the database. + * + * @param SPDotExpoter The expoter calling the method. + */ +- (void)dotExportProcessWillBeginFetchingData:(SPDotExporter *)exporter; + +/** + * Called when the dot export process is about to begin writing data to disk. + * + * @param SPDotExpoter The expoter calling the method. + */ +- (void)dotExportProcessWillBeginFetchingRelationsData:(SPDotExporter *)exporter; + +@end diff --git a/Source/SPExportController.h b/Source/SPExportController.h index 773b678d..0865fef3 100644 --- a/Source/SPExportController.h +++ b/Source/SPExportController.h @@ -5,6 +5,7 @@ // sequel-pro // // Created by Ben Perry (benperry.com.au) on 21/02/09. +// Modified by Stuart Connolly (stuconnolly.com) // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,118 +24,231 @@ // More info at <http://code.google.com/p/sequel-pro/> #import <Cocoa/Cocoa.h> -#import <MCPKit/MCPKit.h> -#import "SPExporterDataAccess.h" +#import "SPConstants.h" -#import "SPLogger.h" +@class MCPConnection, BWAnchoredButtonBar; -// Export type constants -enum { - SP_SQL_EXPORT = 1, - SP_CSV_EXPORT = 2, - SP_XML_EXPORT = 3, - SP_PDF_EXPORT = 4, - SP_HTML_EXPORT = 5, - SP_EXCEL_EXPORT = 6 -}; -typedef NSUInteger SPExportType; - -// Export source constants -enum { - SP_FILTERED_EXPORT = 1, - SP_CUSTOM_QUERY_EXPORT = 2, - SP_TABLE_EXPORT = 3 -}; -typedef NSUInteger SPExportSource; - -@interface SPExportController : NSObject <SPExporterDataAccess> +/** + * @class SPExportController SPExportController.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * Export controller. + */ +@interface SPExportController : NSWindowController { - // Table document + // Controllers IBOutlet id tableDocumentInstance; - - // Tables list + IBOutlet id tableContentInstance; + IBOutlet id customQueryInstance; IBOutlet id tablesListInstance; - - // Table data IBOutlet id tableDataInstance; // Export window - IBOutlet id exportWindow; - IBOutlet id exportToolbar; - IBOutlet id exportPathField; - IBOutlet id exportTableList; - IBOutlet id exportTabBar; - IBOutlet id exportInputMatrix; - IBOutlet id exportFilePerTableCheck; - IBOutlet id exportFilePerTableNote; - IBOutlet id exportProcessLowMemory; + IBOutlet NSButton *exportButton; + IBOutlet NSToolbar *exportToolbar; + IBOutlet NSTextField *exportPathField; + IBOutlet NSTableView *exportTableList; + IBOutlet NSTabView *exportTabBar; + IBOutlet NSMatrix *exportInputMatrix; + IBOutlet NSButton *exportFilePerTableCheck; + IBOutlet NSTextField *exportFilePerTableNote; + IBOutlet NSButton *exportSelectAllTablesButton; + IBOutlet NSButton *exportDeselectAllTablesButton; + IBOutlet NSButton *exportRefreshTablesButton; + IBOutlet NSScrollView *exportTablelistScrollView; + + // Errors sheet + IBOutlet NSWindow *errorsWindow; + IBOutlet NSTextView *errorsTextView; + + // Advanced options view + IBOutlet NSButton *exportAdvancedOptionsViewButton; + IBOutlet NSView *exportAdvancedOptionsView; + IBOutlet NSButton *exportAdvancedOptionsViewLabelButton; + IBOutlet NSButton *exportUseUTF8BOMButton; + IBOutlet NSButton *exportCompressOutputFile; + IBOutlet NSButton *exportProcessLowMemoryButton; + IBOutlet NSTextField *exportCSVNULLValuesAsTextField; + + IBOutlet BWAnchoredButtonBar *exportTableListButtonBar; // Export progress sheet - IBOutlet id exportProgressWindow; - IBOutlet id exportProgressTitle; - IBOutlet id exportProgressText; - IBOutlet id exportProgressIndicator; + IBOutlet NSWindow *exportProgressWindow; + IBOutlet NSTextField *exportProgressTitle; + IBOutlet NSTextField *exportProgressText; + IBOutlet NSProgressIndicator *exportProgressIndicator; + + // Custom filename view + IBOutlet NSView *exportCustomFilenameView; + IBOutlet NSButton *exportCustomFilenameButton; + IBOutlet NSTokenField *exportCustomFilenameTokenField; + IBOutlet NSTokenField *exportCustomFilenameTokensField; + IBOutlet NSTextField *exportCustomFilenameExampleTextField; // SQL - IBOutlet id exportSQLIncludeStructureCheck; - IBOutlet id exportSQLIncludeDropSyntaxCheck; - IBOutlet id exportSQLIncludeErrorsCheck; + IBOutlet NSButton *exportSQLIncludeStructureCheck; + IBOutlet NSButton *exportSQLIncludeDropSyntaxCheck; + IBOutlet NSButton *exportSQLIncludeContentCheck; + IBOutlet NSButton *exportSQLIncludeErrorsCheck; + IBOutlet NSButton *exportSQLBLOBFieldsAsHexCheck; // Excel - IBOutlet id exportExcelSheetOrFilePerTableMatrix; + IBOutlet NSMatrix *exportExcelSheetOrFilePerTableMatrix; // CSV - IBOutlet id exportCSVIncludeFieldNamesCheck; - IBOutlet id exportCSVFieldsTerminatedField; - IBOutlet id exportCSVFieldsWrappedField; - IBOutlet id exportCSVFieldsEscapedField; - IBOutlet id exportCSVLinesTerminatedField; + IBOutlet NSButton *exportCSVIncludeFieldNamesCheck; + IBOutlet NSComboBox *exportCSVFieldsTerminatedField; + IBOutlet NSComboBox *exportCSVFieldsWrappedField; + IBOutlet NSComboBox *exportCSVFieldsEscapedField; + IBOutlet NSComboBox *exportCSVLinesTerminatedField; // HTML - IBOutlet id exportHTMLIncludeStructureCheck; - IBOutlet id exportHTMLIncludeHeadAndBodyTagsCheck; - - // XML - IBOutlet id exportXMLIncludeStructureCheck; + IBOutlet NSButton *exportHTMLIncludeStructureCheck; // PDF - IBOutlet id exportPDFIncludeStructureCheck; - - // Token name view - IBOutlet id tokenNameView; - IBOutlet id tokenNameField; - IBOutlet id tokenNameTokensField; - IBOutlet id exampleNameLabel; + IBOutlet NSButton *exportPDFIncludeStructureCheck; - // Cancellation flag + /** + * Cancellation flag + */ BOOL exportCancelled; - // Current database's tables + /** + * Multi-file export flag + */ + BOOL exportToMultipleFiles; + + /** + * Create custom filename flag + */ + BOOL createCustomFilename; + + /** + * Number of tables being exported + */ + NSUInteger exportTableCount; + + /** + * Index of the current table being exported + */ + NSUInteger currentTableExportIndex; + + /** + * Export type label + */ + NSString *exportTypeLabel; + + /** + * Export filename + */ + NSString *exportFilename; + + /** + * Current database's tables + */ NSMutableArray *tables; - // Database connection + /** + * Database connection + */ MCPConnection *connection; - // Concurrent operation queue + /** + * Concurrent operation queue + */ NSOperationQueue *operationQueue; - // Table/export operation mapping - NSMutableDictionary *tableExportMapping; + /** + * Exporters + */ + NSMutableArray *exporters; + + /** + * Global export file handle + */ + NSFileHandle *exportFileHandle; + + /** + * Export type + */ + SPExportType exportType; + + /** + * Export source + */ + SPExportSource exportSource; + + /** + * Available filename tokens + */ + NSString *availableFilenameTokens; + + /** + * Display advanced view flag + */ + BOOL showAdvancedView; + + /** + * User defaults + */ + NSUserDefaults *prefs; + + /** + * Current toolbar item + */ + NSToolbarItem *currentToolbarItem; + + /** + * Previous connection encoding + */ + NSString *sqlPreviousConnectionEncoding; + + /** + * Previous connection encoding was via Latin1 + */ + BOOL sqlPreviousConnectionEncodingViaLatin1; - // Top-level nib objects that require releasing on dealloc - NSMutableArray *nibObjectsToRelease; + NSInteger heightOffset; + NSUInteger windowMinWidth; + NSUInteger windowMinHeigth; } -@property (readwrite, assign) BOOL exportCancelled; -@property (readwrite, assign) MCPConnection *connection; +/** + * @property exportCancelled Export cancellation flag + */ +@property(readwrite, assign) BOOL exportCancelled; + +/** + * @property exportToMultipleFiles Export to multiple files flag + */ +@property(readwrite, assign) BOOL exportToMultipleFiles; + +/** + * @property connection Database connection + */ +@property(readwrite, assign) MCPConnection *connection; -// IB action methods - (void)export; +- (void)exportTables:(NSArray *)table asFormat:(SPExportType)format; +- (void)openExportErrorsSheetWithString:(NSString *)errors; +- (void)displayExportFinishedGrowlNotification; +- (NSString *)expandCustomFilenameFormatFromString:(NSString *)format usingTableName:(NSString *)table; + +// IB action methods - (IBAction)closeSheet:(id)sender; - (IBAction)switchTab:(id)sender; - (IBAction)switchInput:(id)sender; - (IBAction)cancelExport:(id)sender; - (IBAction)changeExportOutputPath:(id)sender; +- (IBAction)refreshTableList:(id)sender; +- (IBAction)selectDeselectAllTables:(id)sender; +- (IBAction)toggleCustomFilenameFormat:(id)sender; +- (IBAction)toggleAdvancedExportOptionsView:(id)sender; + +- (IBAction)toggleSQLIncludeStructure:(id)sender; +- (IBAction)toggleSQLIncludeContent:(id)sender; +- (IBAction)toggleSQLIncludeDropSyntax:(id)sender; @end diff --git a/Source/SPExportController.m b/Source/SPExportController.m index 559e8071..83c87ea6 100644 --- a/Source/SPExportController.m +++ b/Source/SPExportController.m @@ -5,6 +5,7 @@ // sequel-pro // // Created by Ben Perry (benperry.com.au) on 21/02/09. +// Modified by Stuart Connolly (stuconnolly.com) // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -22,39 +23,68 @@ // // More info at <http://code.google.com/p/sequel-pro/> +#import <MCPKit/MCPKit.h> + #import "SPExportController.h" -#import "SPCSVExporter.h" +#import "SPExportInitializer.h" #import "TablesList.h" #import "SPTableData.h" -#import "TableDocument.h" +#import "TableContent.h" #import "SPArrayAdditions.h" #import "SPStringAdditions.h" #import "SPConstants.h" +#import "SPGrowlController.h" @interface SPExportController (PrivateAPI) -- (void)_initializeExportUsingSelectedOptions; -- (BOOL)_exportTables:(NSArray *)exportTables asType:(SPExportType)type toMultipleFiles:(BOOL)multipleFiles; +- (void)_toggleExportButton; +- (void)_resizeWindowByHeightDelta:(NSInteger)delta; @end @implementation SPExportController @synthesize connection; +@synthesize exportToMultipleFiles; @synthesize exportCancelled; +#pragma mark - +#pragma mark Initialization + /** * Initializes an instance of SPExportController */ - (id)init { - if ((self = [super init])) { + if (self = [super initWithWindowNibName:@"ExportDialog"]) { + [self setExportCancelled:NO]; + [self setExportToMultipleFiles:YES]; + + exportType = 0; + exportTableCount = 0; + currentTableExportIndex = 0; + + exportFilename = @""; + exportTypeLabel = @""; + + createCustomFilename = NO; + sqlPreviousConnectionEncodingViaLatin1 = NO; tables = [[NSMutableArray alloc] init]; + exporters = [[NSMutableArray alloc] init]; operationQueue = [[NSOperationQueue alloc] init]; - tableExportMapping = [NSMutableDictionary dictionary]; - nibObjectsToRelease = [[NSMutableArray alloc] init]; + + showAdvancedView = NO; + + heightOffset = 0; + windowMinWidth = [[self window] minSize].width; + windowMinHeigth = [[self window] minSize].height; + + prefs = [NSUserDefaults standardUserDefaults]; + + // Default filename tokens + availableFilenameTokens = @"host,database,table,date,time"; } return self; @@ -64,9 +94,12 @@ * Upon awakening select the first toolbar item */ - (void)awakeFromNib -{ +{ // Upon awakening select the SQL tab [exportToolbar setSelectedItemIdentifier:[[[exportToolbar items] objectAtIndex:0] itemIdentifier]]; + + // Select the 'selected tables' option + [exportInputMatrix selectCellAtRow:2 column:0]; } #pragma mark - @@ -76,52 +109,166 @@ * Display the export window allowing the user to select what and of what type to export. */ - (void)export -{ +{ + [self exportTables:nil asFormat:0]; +} - // If the dialog hasn't been loaded yet, do so, retaining a reference to the top-level objects that need releasing. - if (!exportWindow) - { - NSArray *exportDialogTopLevelObjects = nil; - NSNib *nibLoader = [[NSNib alloc] initWithNibNamed:@"ExportDialog" bundle:[NSBundle mainBundle]]; - [nibLoader instantiateNibWithOwner:self topLevelObjects:&exportDialogTopLevelObjects]; - [nibObjectsToRelease addObjectsFromArray:exportDialogTopLevelObjects]; - [nibLoader release]; +/** + * Displays the export window with the supplied tables and export type/format selected. + */ +- (void)exportTables:(NSArray *)exportTables asFormat:(SPExportType)format +{ + [self refreshTableList:self]; + + if (exportTables && format) { + + // Select the correct tab according to the supplied export type + [exportToolbar setSelectedItemIdentifier:[[[exportToolbar items] objectAtIndex:(format - 1)] itemIdentifier]]; + + // Select the 'selected tables' source option + [exportInputMatrix selectCellAtRow:2 column:0]; + + // Disable all tables + for (NSMutableArray *table in tables) + { + [table replaceObjectAtIndex:1 withObject:[NSNumber numberWithBool:NO]]; + [table replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:NO]]; + [table replaceObjectAtIndex:3 withObject:[NSNumber numberWithBool:NO]]; + } + + // Select the supplied tables + for (NSMutableArray *table in tables) + { + for (NSString *exportTable in exportTables) + { + if ([exportTable isEqualToString:[table objectAtIndex:0]]) { + [table replaceObjectAtIndex:1 withObject:[NSNumber numberWithBool:YES]]; + [table replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:YES]]; + [table replaceObjectAtIndex:3 withObject:[NSNumber numberWithBool:YES]]; + } + } + } + + [exportTableList reloadData]; + + // Ensure interface validation + [self switchTab:[[exportToolbar items] objectAtIndex:(format - 1)]]; } - NSUInteger i; + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES); - [tables removeAllObjects]; + // If found the set the default path to the user's desktop, otherwise use their home directory + [exportPathField setStringValue:([paths count] > 0) ? [paths objectAtIndex:0] : NSHomeDirectory()]; - MCPResult *queryResult = (MCPResult *)[[self connection] listTables]; + [NSApp beginSheet:[self window] + modalForWindow:[tableDocumentInstance parentWindow] + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; +} + +/** + * Opens the errors sheet and displays the supplied errors string. + */ +- (void)openExportErrorsSheetWithString:(NSString *)errors +{ + [errorsTextView setString:@""]; + [errorsTextView setString:errors]; - if ([queryResult numOfRows]) [queryResult dataSeek:0]; + [NSApp beginSheet:errorsWindow + modalForWindow:[tableDocumentInstance parentWindow] + modalDelegate:self + didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; +} + +/** + * Displays the export finished Growl notification. + */ +- (void)displayExportFinishedGrowlNotification +{ + // Export finished Growl notification + [[SPGrowlController sharedGrowlController] notifyWithTitle:@"Export Finished" + description:[NSString stringWithFormat:NSLocalizedString(@"Finished exporting to %@", @"description for finished exporting growl notification"), exportFilename] + window:[tableDocumentInstance parentWindow] + notificationName:@"Export Finished"]; +} + +/** + * Expands the custom filename format based on the selected tokens. + */ +- (NSString *)expandCustomFilenameFormatFromString:(NSString *)format usingTableName:(NSString *)table +{ + NSMutableString *string = [NSMutableString stringWithString:format]; - for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) - { - [tables addObject:[NSMutableArray arrayWithObjects: - [NSNumber numberWithBool:YES], - NSArrayObjectAtIndex([queryResult fetchRowAsArray], 0), - nil]]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + + [dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4]; + + [dateFormatter setDateStyle:NSDateFormatterShortStyle]; + [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; + + [string replaceOccurrencesOfString:@"host" withString:[tableDocumentInstance host] + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; + + [string replaceOccurrencesOfString:@"database" withString:[tableDocumentInstance database] + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; + + if (table) { + [string replaceOccurrencesOfString:@"table" withString:table + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; + } + else { + [string replaceOccurrencesOfString:@"table" withString:@"" + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; } - [exportTableList reloadData]; - - [exportPathField setStringValue:NSHomeDirectory()]; + [string replaceOccurrencesOfString:@"date" withString:[dateFormatter stringFromDate:[NSDate date]] + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; - [NSApp beginSheet:exportWindow - modalForWindow:[tableDocumentInstance parentWindow] - modalDelegate:self - didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo:nil]; + [dateFormatter setDateStyle:NSDateFormatterNoStyle]; + [dateFormatter setTimeStyle:NSDateFormatterShortStyle]; + + [string replaceOccurrencesOfString:@"time" withString:[dateFormatter stringFromDate:[NSDate date]] + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; + + // Strip comma separators + [string replaceOccurrencesOfString:@"," withString:@"" + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; + + // Replace colons with hyphens + [string replaceOccurrencesOfString:@":" withString:@"-" + options:NSLiteralSearch + range:NSMakeRange(0, [string length])]; + + [dateFormatter release]; + + return string; } /** - * Closes the export dialog + * Closes the export dialog. */ - (IBAction)closeSheet:(id)sender { - [NSApp endSheet:exportWindow returnCode:[sender tag]]; - [exportWindow orderOut:self]; + if ([sender window] == [self window]) { + + // Close the advanced options view if it's open + [exportAdvancedOptionsView setHidden:YES]; + [exportAdvancedOptionsViewButton setState:NSOffState]; + + [self _resizeWindowByHeightDelta:0]; + } + + [NSApp endSheet:[sender window] returnCode:[sender tag]]; + [[sender window] orderOut:self]; } /** @@ -130,20 +277,70 @@ - (IBAction)switchTab:(id)sender { if ([sender isKindOfClass:[NSToolbarItem class]]) { - [exportTabBar selectTabViewItemWithIdentifier:[[sender label] lowercaseString]]; + + currentToolbarItem = sender; + + NSString *label = [[currentToolbarItem label] lowercaseString]; + + [exportTabBar selectTabViewItemWithIdentifier:label]; + + BOOL isSQL = [label isEqualToString:@"sql"]; + BOOL isCSV = [label isEqualToString:@"csv"]; + BOOL isXML = [label isEqualToString:@"xml"]; + BOOL isHTML = [label isEqualToString:@"html"]; + BOOL isPDF = [label isEqualToString:@"pdf"]; + BOOL isDot = [label isEqualToString:@"dot"]; + + BOOL disable = (isCSV || isXML || isHTML || isPDF || isDot); + + [exportFilePerTableCheck setHidden:(isSQL || isDot)]; + [exportFilePerTableNote setHidden:(isSQL || isDot)]; + + [exportTableList setEnabled:(!isDot)]; + [exportSelectAllTablesButton setEnabled:(!isDot)]; + [exportDeselectAllTablesButton setEnabled:(!isDot)]; + [exportRefreshTablesButton setEnabled:(!isDot)]; + + [[exportInputMatrix cellAtRow:2 column:0] setEnabled:(!isDot)]; + + if (isDot) { + // Disable all source checkboxes + [[exportInputMatrix cellAtRow:0 column:0] setEnabled:NO]; + [[exportInputMatrix cellAtRow:1 column:0] setEnabled:NO]; + } + else { + // Enable/disable the 'filtered result' and 'query result' options + [[exportInputMatrix cellAtRow:0 column:0] setEnabled:((disable) && ([[tableContentInstance currentResult] count] > 1))]; + [[exportInputMatrix cellAtRow:1 column:0] setEnabled:((disable) && ([[customQueryInstance currentResult] count] > 1))]; + } - [exportFilePerTableCheck setHidden:[[sender label] isEqualToString:@"Excel"]]; - [exportFilePerTableNote setHidden:[[sender label] isEqualToString:@"Excel"]]; + [[exportTableList tableColumnWithIdentifier:@"structure"] setHidden:disable]; + [[exportTableList tableColumnWithIdentifier:@"drop"] setHidden:disable]; + + [[[exportTableList tableColumnWithIdentifier:@"content"] headerCell] setStringValue:(disable) ? @"" : @"C"]; + + [exportCSVNULLValuesAsTextField setStringValue:[prefs stringForKey:SPNullValue]]; } } /** - * + * Enables/disables and shows/hides various interface controls depending on the selected item. */ - (IBAction)switchInput:(id)sender { if ([sender isKindOfClass:[NSMatrix class]]) { - [exportTableList setEnabled:([[sender selectedCell] tag] == 3)]; + + BOOL isSelectedTables = ([[sender selectedCell] tag] == SPTableExport); + + [exportFilePerTableCheck setHidden:(!isSelectedTables)]; + [exportFilePerTableNote setHidden:(!isSelectedTables)]; + + [exportTableList setEnabled:isSelectedTables]; + [exportSelectAllTablesButton setEnabled:isSelectedTables]; + [exportDeselectAllTablesButton setEnabled:isSelectedTables]; + [exportRefreshTablesButton setEnabled:isSelectedTables]; + + availableFilenameTokens = ([[sender selectedCell] tag] == SPQueryExport) ? @"host,database,date,time" : @"host,database,table,date,time"; } } @@ -164,24 +361,161 @@ } /** - * + * Opens the open panel when user selects to change the output path. */ - (IBAction)changeExportOutputPath:(id)sender { + [exportCustomFilenameTokenField setStringValue:@""]; + [exportCustomFilenameTokensField setStringValue:availableFilenameTokens]; + NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setCanChooseFiles:NO]; [panel setCanChooseDirectories:YES]; [panel setCanCreateDirectories:YES]; + [panel setAccessoryView:exportCustomFilenameView]; + + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDesktopDirectory, NSUserDomainMask, YES); - [panel beginSheetForDirectory:NSHomeDirectory() + [panel beginSheetForDirectory:([paths count] > 0) ? [paths objectAtIndex:0] : NSHomeDirectory() file:nil - modalForWindow:exportWindow + modalForWindow:[self window] modalDelegate:self didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:nil]; } +/** + * Refreshes the table list. + */ +- (IBAction)refreshTableList:(id)sender +{ + NSUInteger i; + + [tables removeAllObjects]; + + // For all modes, retrieve table and view names + NSArray *tablesAndViews = [tablesListInstance allTableAndViewNames]; + + for (id itemName in tablesAndViews) { + [tables addObject:[NSMutableArray arrayWithObjects: + itemName, + [NSNumber numberWithBool:YES], + [NSNumber numberWithBool:YES], + [NSNumber numberWithBool:YES], + [NSNumber numberWithInt:SPTableTypeTable], + nil]]; + } + + // For SQL only, add procedures and functions + if ([[[currentToolbarItem label] lowercaseString] isEqualToString:@"sql"]) { + NSArray *procedures = [tablesListInstance allProcedureNames]; + + for (id procName in procedures) + { + [tables addObject:[NSMutableArray arrayWithObjects: + procName, + [NSNumber numberWithBool:YES], + [NSNumber numberWithBool:YES], + [NSNumber numberWithBool:YES], + [NSNumber numberWithInt:SPTableTypeProc], + nil]]; + } + + NSArray *functions = [tablesListInstance allFunctionNames]; + + for (id funcName in functions) + { + [tables addObject:[NSMutableArray arrayWithObjects: + funcName, + [NSNumber numberWithBool:YES], + [NSNumber numberWithBool:YES], + [NSNumber numberWithBool:YES], + [NSNumber numberWithInt:SPTableTypeFunc], + nil]]; + } + } + + [exportTableList reloadData]; +} + +/** + * Selects or de-selects all tables. + */ +- (IBAction)selectDeselectAllTables:(id)sender +{ + [self refreshTableList:self]; + + for (NSMutableArray *table in tables) + { + [table replaceObjectAtIndex:2 withObject:[NSNumber numberWithBool:[sender tag]]]; + } + + [exportTableList reloadData]; + + [self _toggleExportButton]; +} + +/** + * Toggles the state of the custom filename format token fields. + */ +- (IBAction)toggleCustomFilenameFormat:(id)sender +{ + [exportCustomFilenameTokenField setEnabled:[sender state]]; + [exportCustomFilenameTokensField setEnabled:[sender state]]; +} + +/** + * Toggles the display of the advanced options box. + */ +- (IBAction)toggleAdvancedExportOptionsView:(id)sender +{ + showAdvancedView = !showAdvancedView; + + if (showAdvancedView) { + [exportAdvancedOptionsViewButton setState:NSOnState]; + [self _resizeWindowByHeightDelta:([exportAdvancedOptionsView frame].size.height + 10)]; + [exportAdvancedOptionsView setHidden:NO]; + } + else { + [exportAdvancedOptionsViewButton setState:NSOffState]; + [self _resizeWindowByHeightDelta:0]; + [exportAdvancedOptionsView setHidden:YES]; + } +} + +/** + * Toggles the export button when choosing to include or table structures in an SQL export. + */ +- (IBAction)toggleSQLIncludeStructure:(id)sender +{ + [[exportTableList tableColumnWithIdentifier:@"structure"] setHidden:(![sender state])]; + + [self _toggleExportButton]; +} + +/** + * Toggles the export button when choosing to include or exclude table contents in an SQL export. + */ +- (IBAction)toggleSQLIncludeContent:(id)sender +{ + [sender setTag:[sender state]]; + + [self selectDeselectAllTables:sender]; + + [self _toggleExportButton]; +} + +/** + * Toggles the export button when choosing to include or exclude table drop syntax in an SQL export. + */ +- (IBAction)toggleSQLIncludeDropSyntax:(id)sender +{ + [[exportTableList tableColumnWithIdentifier:@"drop"] setHidden:(![sender state])]; + + [self _toggleExportButton]; +} + #pragma mark - #pragma mark Table view datasource methods @@ -190,30 +524,32 @@ return [tables count]; } -- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex -{ - return NSArrayObjectAtIndex([tables objectAtIndex:rowIndex], ([[aTableColumn identifier] isEqualToString:@"switch"]) ? 0 : 1); +- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ + return NSArrayObjectAtIndex([tables objectAtIndex:rowIndex], [exportTableList columnWithIdentifier:[tableColumn identifier]]); } -- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex -{ - [[tables objectAtIndex:rowIndex] replaceObjectAtIndex:0 withObject:anObject]; +- (void)tableView:(NSTableView *)tableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex +{ + [[tables objectAtIndex:rowIndex] replaceObjectAtIndex:[exportTableList columnWithIdentifier:[tableColumn identifier]] withObject:anObject]; + + [self _toggleExportButton]; } #pragma mark - #pragma mark Table view delegate methods -- (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(NSInteger)rowIndex +- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)rowIndex { - return (aTableView != exportTableList); + return (tableView != exportTableList); } -- (BOOL)tableView:(NSTableView *)aTableView shouldTrackCell:(NSCell *)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row +- (BOOL)tableView:(NSTableView *)tableView shouldTrackCell:(NSCell *)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex { - return (aTableView == exportTableList); + return (tableView == exportTableList); } -- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex +- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex { [aCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; } @@ -223,7 +559,7 @@ - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar { - NSMutableArray *items = [NSMutableArray arrayWithCapacity:6]; + NSMutableArray *items = [NSMutableArray array]; for (NSToolbarItem *item in [toolbar items]) { @@ -234,21 +570,16 @@ } #pragma mark - -#pragma mark SPExporterDataAccess protocol methods +#pragma mark Text field delegate methods -/** - * This method is part of the SPExporterDataAccess protocol. It is called when an expoter complete it's data - * conversion process and the operation is effectively complete. The resulting data can be accessed via - * SPExporter's exportData method. - */ -- (void)exporterDataConversionProcessComplete:(SPExporter *)exporter -{ - // Do something with the data... - - // If there are no more operations in the queue, close the progress sheet - if ([[operationQueue operations] count] == 0) { - [NSApp endSheet:exportProgressWindow returnCode:0]; - [exportProgressWindow orderOut:self]; +- (void)controlTextDidChange:(NSNotification *)notification +{ + if ([notification object] == exportCustomFilenameTokenField) { + + // Create the table name, but since this is only an example, use the first table in the list + NSString *filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:[[tablesListInstance tables] objectAtIndex:1]]; + + [exportCustomFilenameExampleTextField setStringValue:[NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"Example", @"example label"), filename]]; } } @@ -256,7 +587,7 @@ #pragma mark Other /** - * Invoked when the user + * Invoked when the user dismissing the export dialog and starts the export process if required. */ - (void)sheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { @@ -264,12 +595,12 @@ if (returnCode == NSOKButton) { // Initialize the export after half a second to give the export sheet a chance to close - [self performSelector:@selector(_initializeExportUsingSelectedOptions) withObject:nil afterDelay:0.5]; + [self performSelector:@selector(initializeExportUsingSelectedOptions) withObject:nil afterDelay:0.5]; } } /** - * Invoked when the user dismisses the save panel. Updates the selected directory is they clicked OK. + * Invoked when the user dismisses the save panel. Updates the selected directory if they clicked OK. */ - (void)savePanelDidEnd:(NSSavePanel *)panel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { @@ -286,247 +617,104 @@ - (void)dealloc { [tables release], tables = nil; + [exporters release], exporters = nil; [operationQueue release], operationQueue = nil; - for (id retainedObject in nibObjectsToRelease) [retainedObject release]; - [nibObjectsToRelease release], nibObjectsToRelease = nil; + + if (sqlPreviousConnectionEncoding) [sqlPreviousConnectionEncoding release], sqlPreviousConnectionEncoding = nil; [super dealloc]; } -@end - -@implementation SPExportController (PrivateAPI) +#pragma mark - +#pragma mark Private API /** - * + * Enables or disables the export button based on the state of various interface controls. */ -- (void)_initializeExportUsingSelectedOptions +- (void)_toggleExportButton { - // First determine what type of export the user selected - SPExportType exportType = 0; + NSString *label = [[currentToolbarItem label] lowercaseString]; - for (NSToolbarItem *item in [exportToolbar items]) - { - if ([[item itemIdentifier] isEqualToString:[exportToolbar selectedItemIdentifier]]) { - exportType = [item tag]; - break; - } - } - - // Determine what data to use (filtered result, custom query result or selected table(s)) for the export operation - SPExportSource exportSource = ([exportInputMatrix selectedRow] + 1); - - NSMutableArray *exportTables = [NSMutableArray array]; - - // Get the data depending on the source - switch (exportSource) - { - case SP_FILTERED_EXPORT: - - break; - case SP_CUSTOM_QUERY_EXPORT: - - break; - case SP_TABLE_EXPORT: - // Create an array of tables to export - for (NSMutableArray *table in tables) - { - if ([[table objectAtIndex:0] boolValue]) { - [exportTables addObject:[table objectAtIndex:1]]; - } + BOOL isSQL = [label isEqualToString:@"sql"]; + BOOL isCSV = [label isEqualToString:@"csv"]; + BOOL isXML = [label isEqualToString:@"xml"]; + BOOL isHTML = [label isEqualToString:@"html"]; + BOOL isPDF = [label isEqualToString:@"pdf"]; + + if (isCSV || isXML || isHTML || isPDF) { + [exportButton setEnabled:NO]; + + // Only enable the button if at least one table is selected + for (NSArray *table in tables) + { + if ([NSArrayObjectAtIndex(table, 2) boolValue]) { + [exportButton setEnabled:YES]; + break; } - - break; + } } - - // Begin the export based on the type - switch (exportSource) - { - case SP_FILTERED_EXPORT: - - break; - case SP_CUSTOM_QUERY_EXPORT: - - break; - case SP_TABLE_EXPORT: - [self _exportTables:exportTables asType:exportType toMultipleFiles:[exportFilePerTableCheck state]]; - break; + else if (isSQL) { + BOOL structureEnabled = [exportSQLIncludeStructureCheck state]; + BOOL contentEnabled = [exportSQLIncludeContentCheck state]; + BOOL dropEnabled = [exportSQLIncludeDropSyntaxCheck state]; + + // Disable if all are unchecked + if ((!contentEnabled) && (!structureEnabled) && (!dropEnabled)) { + [exportButton setEnabled:NO]; + } + // Disable if structure is unchecked, but content and drop are as dropping a table then trying to insert + // into it is obviously an error + else if (contentEnabled && (!structureEnabled) && (dropEnabled)) { + [exportButton setEnabled:NO]; + } + else { + [exportButton setEnabled:(contentEnabled || (structureEnabled || dropEnabled))]; + } } } /** - * Exports the contents' of the supplied array of tables. Note that this method currently only supports - * exporting in CSV and XML formats. + * Resizes the export window's height by the supplied delta, while retaining the position of + * all interface controls. */ -- (BOOL)_exportTables:(NSArray *)exportTables asType:(SPExportType)type toMultipleFiles:(BOOL)multipleFiles +- (void)_resizeWindowByHeightDelta:(NSInteger)delta { - NSUInteger i; + NSUInteger scrollMask = [exportTablelistScrollView autoresizingMask]; + NSUInteger buttonBarMask = [exportTableListButtonBar autoresizingMask]; + NSUInteger tabBarMask = [exportTabBar autoresizingMask]; + NSUInteger buttonMask = [exportAdvancedOptionsViewButton autoresizingMask]; + NSUInteger textFieldMask = [exportAdvancedOptionsViewLabelButton autoresizingMask]; + NSUInteger advancedViewMask = [exportAdvancedOptionsView autoresizingMask]; - NSMutableString *errors = [NSMutableString string]; + NSRect frame = [[self window] frame]; - NSDictionary *tableDetails = nil; - //NSStringEncoding encoding = [[self connection] encoding]; + [exportTablelistScrollView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportTableListButtonBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportTabBar setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportAdvancedOptionsViewButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportAdvancedOptionsViewLabelButton setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; + [exportAdvancedOptionsView setAutoresizingMask:NSViewNotSizable | NSViewMinYMargin]; - // Reset the interface - [exportProgressTitle setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Exporting %@", @"text showing that the application is importing a supplied format"), @"CSV"]]; - [exportProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; - [exportProgressText displayIfNeeded]; - [exportProgressIndicator setDoubleValue:0]; - [exportProgressIndicator displayIfNeeded]; + NSInteger newMinHeight = (windowMinHeigth - heightOffset + delta < windowMinHeigth) ? windowMinHeigth : windowMinHeigth - heightOffset + delta; - // Open the progress sheet - [NSApp beginSheet:exportProgressWindow - modalForWindow:[tableDocumentInstance parentWindow] - modalDelegate:self - didEndSelector:nil - contextInfo:nil]; - - // Add a dump header to the dump file - NSMutableString *csvLineEnd = [NSMutableString stringWithString:[exportCSVLinesTerminatedField stringValue]]; - - [csvLineEnd replaceOccurrencesOfString:@"\\t" withString:@"\t" - options:NSLiteralSearch - range:NSMakeRange(0, [csvLineEnd length])]; - - [csvLineEnd replaceOccurrencesOfString:@"\\n" withString:@"\n" - options:NSLiteralSearch - range:NSMakeRange(0, [csvLineEnd length])]; + [[self window] setMinSize:NSMakeSize(windowMinWidth, newMinHeight)]; - [csvLineEnd replaceOccurrencesOfString:@"\\r" withString:@"\r" - options:NSLiteralSearch - range:NSMakeRange(0, [csvLineEnd length])]; + frame.origin.y += heightOffset; + frame.size.height -= heightOffset; - NSUInteger tableCount = [exportTables count]; + heightOffset = delta; - // If - if ((type == SP_CSV_EXPORT) && (!multipleFiles) && (tableCount > 1)) { - - } + frame.origin.y -= heightOffset; + frame.size.height += heightOffset; - /*if ([exportTables count] > 1) { - [infoString setString:[NSString stringWithFormat:@"Host: %@ Database: %@ Generation Time: %@%@%@", - [tableDocumentInstance host], [tableDocumentInstance database], [NSDate date], csvLineEnd, csvLineEnd]]; - }*/ - - // Loop through the tables - for (i = 0 ; i < tableCount; i++) - { - if ([self exportCancelled]) break; - - // Update the progress text and reset the progress bar to indeterminate status - NSString *tableName = [exportTables objectAtIndex:i]; - - [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %l (%@): fetching data...", @"text showing that app is fetching data for table dump"), (unsigned long)(i + 1), (unsigned long)tableCount, tableName]]; - [exportProgressText displayIfNeeded]; - - [exportProgressIndicator setIndeterminate:YES]; - [exportProgressIndicator setUsesThreadedAnimation:YES]; - [exportProgressIndicator startAnimation:self]; - - // For CSV exports of more than one table, output the name of the table - /*if (tableCount > 1) { - [fileHandle writeData:[[NSString stringWithFormat:@"Table %@%@%@", tableName, csvLineEnd, csvLineEnd] dataUsingEncoding:encoding]]; - }*/ - - // Determine whether this table is a table or a view via the create table command, and get the table details - MCPResult *queryResult = [connection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE %@", [tableName backtickQuotedString]]]; - [queryResult setReturnDataAsStrings:YES]; - - if ([queryResult numOfRows]) { - tableDetails = [NSDictionary dictionaryWithDictionary:[queryResult fetchRowAsDictionary]]; - - tableDetails = [NSDictionary dictionaryWithDictionary:([tableDetails objectForKey:@"Create View"]) ? [tableDataInstance informationForView:tableName] : [tableDataInstance informationForTable:tableName]]; - } - - // Retrieve the table details via the data class, and use it to build an array containing column numeric status - NSMutableArray *tableColumnNumericStatus = [NSMutableArray array]; - - for (NSDictionary *column in [tableDetails objectForKey:@"columns"]) - { - NSString *tableColumnTypeGrouping = [column objectForKey:@"typegrouping"]; - - [tableColumnNumericStatus addObject:[NSNumber numberWithBool:([tableColumnTypeGrouping isEqualToString:@"bit"] || - [tableColumnTypeGrouping isEqualToString:@"integer"] || - [tableColumnTypeGrouping isEqualToString:@"float"])]]; - } - - // Use low memory export? - BOOL useLowMemoryBlockingStreaming = ([exportProcessLowMemory state] == NSOnState); - - // Make a streaming request for the data - MCPStreamingResult *queryResultStreaming = [connection streamingQueryString:[NSString stringWithFormat:@"SELECT * FROM %@", [tableName backtickQuotedString]] useLowMemoryBlockingStreaming:useLowMemoryBlockingStreaming]; - - // Note any errors during retrieval - if ([connection queryErrored]) { - [errors appendString:[NSString stringWithFormat:@"%@\n", [connection getLastErrorMessage]]]; - } - - SPExporter *exporter = nil; - SPCSVExporter *csvExporter = nil; - - // Based on the type of export create a new instance of the corresponding exporter and set it's specific options - switch (type) - { - case SP_SQL_EXPORT: - - break; - case SP_CSV_EXPORT: - csvExporter = [[SPCSVExporter alloc] initWithDelegate:self]; - - [csvExporter setCsvOutputFieldNames:[exportCSVIncludeFieldNamesCheck state]]; - [csvExporter setCsvFieldSeparatorString:[exportCSVFieldsTerminatedField stringValue]]; - [csvExporter setCsvEnclosingCharacterString:[exportCSVFieldsWrappedField stringValue]]; - [csvExporter setCsvLineEndingString:[exportCSVLinesTerminatedField stringValue]]; - [csvExporter setCsvEscapeString:[exportCSVFieldsEscapedField stringValue]]; - - [csvExporter setExportOutputEncoding:[MCPConnection encodingForMySQLEncoding:[[tableDocumentInstance connectionEncoding] UTF8String]]]; - [csvExporter setCsvNULLString:[[NSUserDefaults standardUserDefaults] objectForKey:SPNullValue]]; - - [csvExporter setCsvTableColumnNumericStatus:tableColumnNumericStatus]; - - // Assign the data to the exporter - [csvExporter setCsvDataResult:queryResultStreaming]; - - exporter = csvExporter; - - break; - case SP_XML_EXPORT: - - break; - case SP_PDF_EXPORT: - - break; - case SP_HTML_EXPORT: - - break; - case SP_EXCEL_EXPORT: - - break; - } - - // Update the progress text and set the progress bar back to determinate - [exportProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing...", @"text showing that app is writing data for table export"), (unsigned long)(i + 1), (unsigned long)tableCount, tableName]]; - [exportProgressText displayIfNeeded]; - - [exportProgressIndicator stopAnimation:self]; - [exportProgressIndicator setUsesThreadedAnimation:NO]; - [exportProgressIndicator setIndeterminate:NO]; - [exportProgressIndicator setDoubleValue:0]; - [exportProgressIndicator displayIfNeeded]; - - // Start the actual data conversion process by placing the exporter on the operation queue. - // Note that although it is highly likely there is no guarantee that the operation will executed - // as soon as it's placed on the queue. There may be a delay if the queue is already executing it's - // maximum number of concurrent operations. See the docs for more details. - [operationQueue addOperation:exporter]; - - if (csvExporter) [csvExporter release]; - - // Add a spacer to the file - //[fileHandle writeData:[[NSString stringWithFormat:@"%@%@%@", csvLineEnd, csvLineEnd, csvLineEnd] dataUsingEncoding:encoding]]; - } + [[self window] setFrame:frame display:YES animate:YES]; - return YES; + [exportTablelistScrollView setAutoresizingMask:scrollMask]; + [exportTableListButtonBar setAutoresizingMask:buttonBarMask]; + [exportTabBar setAutoresizingMask:tabBarMask]; + [exportAdvancedOptionsViewButton setAutoresizingMask:buttonMask]; + [exportAdvancedOptionsViewLabelButton setAutoresizingMask:textFieldMask]; + [exportAdvancedOptionsView setAutoresizingMask:advancedViewMask]; } @end diff --git a/Source/SPExportInitializer.h b/Source/SPExportInitializer.h new file mode 100644 index 00000000..4d86f619 --- /dev/null +++ b/Source/SPExportInitializer.h @@ -0,0 +1,51 @@ +// +// $Id$ +// +// SPExportInitializer.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 31, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +#import "SPExportController.h" + +@class SPCSVExporter, SPSQLExporter, SPXMLExporter, SPFileHandle; + +/** + * @category SPExportInitializer SPExportInitializer.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * Export initializer category. + */ +@interface SPExportController (SPExportInitializer) + +- (void)initializeExportUsingSelectedOptions; + +- (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray; + +- (SPCSVExporter *)initializeCSVExporterForTable:(NSString *)table orDataArray:(NSArray *)dataArray; +- (SPXMLExporter *)initializeXMLExporterForTable:(NSString *)table orDataArray:(NSArray *)dataArray; + +- (void)writeXMLHeaderToFileHandle:(SPFileHandle *)fileHandle; +- (SPFileHandle *)getFileHandleForFilePath:(NSString *)filePath; + +@end diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m new file mode 100644 index 00000000..0ceccbd6 --- /dev/null +++ b/Source/SPExportInitializer.m @@ -0,0 +1,626 @@ +// +// $Id$ +// +// SPExporterInitializer.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 31, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <MCPKit/MCPKit.h> + +#import "SPExportInitializer.h" +#import "SPStringAdditions.h" +#import "SPTableData.h" +#import "TableDocument.h" +#import "TablesList.h" +#import "SPGrowlController.h" +#import "SPMainThreadTrampoline.h" +#import "TableDocument.h" +#import "CustomQuery.h" +#import "SPFileHandle.h" +#import "SPAlertSheets.h" + +#import "SPCSVExporter.h" +#import "SPSQLExporter.h" +#import "SPXMLExporter.h" +#import "SPDotExporter.h" + +@implementation SPExportController (SPExportInitializer) + +/** + * Initializes the export process by analysing the selected criteria. + */ +- (void)initializeExportUsingSelectedOptions +{ + NSArray *dataArray = nil; + + // Get rid of the cached connection encoding + if (sqlPreviousConnectionEncoding) [sqlPreviousConnectionEncoding release], sqlPreviousConnectionEncoding = nil; + + createCustomFilename = ([exportCustomFilenameButton state] && (![[exportCustomFilenameTokenField stringValue] isEqualToString:@""])); + + // First determine what type of export the user selected + for (NSToolbarItem *item in [exportToolbar items]) + { + if ([[item itemIdentifier] isEqualToString:[exportToolbar selectedItemIdentifier]]) { + exportType = [item tag]; + break; + } + } + + // Determine what data to use (filtered result, custom query result or selected table(s)) for the export operation + exportSource = (exportType == SPDotExport) ? SPTableExport : ([exportInputMatrix selectedRow] + 1); + + NSMutableArray *exportTables = [NSMutableArray array]; + + // Set whether or not we are to export to multiple files + [self setExportToMultipleFiles:[exportFilePerTableCheck state]]; + + // Get the data depending on the source + switch (exportSource) + { + case SPFilteredExport: + dataArray = [tableContentInstance currentResult]; + break; + case SPQueryExport: + dataArray = [customQueryInstance currentResult]; + break; + case SPTableExport: + // Create an array of tables to export + for (NSMutableArray *table in tables) + { + if (exportType == SPSQLExport) { + if ([[table objectAtIndex:1] boolValue] || [[table objectAtIndex:2] boolValue] || [[table objectAtIndex:3] boolValue]) { + [exportTables addObject:table]; + } + } + else if (exportType == SPDotExport) { + [exportTables addObject:[table objectAtIndex:0]]; + } + else { + if ([[table objectAtIndex:2] boolValue]) { + [exportTables addObject:[table objectAtIndex:0]]; + } + } + } + + break; + } + + // Set the export type label + switch (exportType) + { + case SPSQLExport: + exportTypeLabel = @"SQL"; + break; + case SPCSVExport: + exportTypeLabel = @"CSV"; + break; + case SPXMLExport: + exportTypeLabel = @"XML"; + break; + case SPDotExport: + exportTypeLabel = @"Dot"; + break; + } + + // Begin the export based on the source + switch (exportSource) + { + case SPFilteredExport: + case SPQueryExport: + [self exportTables:nil orDataArray:dataArray]; + break; + case SPTableExport: + [self exportTables:exportTables orDataArray:nil]; + break; + } +} + +/** + * Exports the contents of the supplied array of tables or data array. + */ +- (void)exportTables:(NSArray *)exportTables orDataArray:(NSArray *)dataArray +{ + NSUInteger i; + SPFileHandle *singleFileHandle = nil; + BOOL singleFileHeaderHasBeenWritten = NO; + + // Change query logging mode + [tableDocumentInstance setQueryMode:SPImportExportQueryMode]; + + // Start the notification timer to allow notifications to be shown even if frontmost for long queries + [[SPGrowlController sharedGrowlController] setVisibilityForNotificationName:@"Export Finished"]; + + // Reset the interface + [[exportProgressTitle onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Exporting %@", @"text showing that the application is importing a supplied format"), exportTypeLabel]]; + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")]; + + [[exportProgressText onMainThread] displayIfNeeded]; + [[exportProgressIndicator onMainThread] setDoubleValue:0]; + [[exportProgressIndicator onMainThread] displayIfNeeded]; + + // Open the progress sheet + [NSApp beginSheet:exportProgressWindow + modalForWindow:[tableDocumentInstance parentWindow] + modalDelegate:self + didEndSelector:nil + contextInfo:nil]; + + // CSV export + if (exportType == SPCSVExport) { + + SPCSVExporter *csvExporter = nil; + + // If the user has selected to only export to a single file or this is a filtered or custom query + // export, create the single file now and assign it to all subsequently created exporters. + if ((![self exportToMultipleFiles]) || (exportSource == SPFilteredExport) || (exportSource == SPQueryExport)) { + + NSString *filename = @""; + + // Create custom filename if required + if (createCustomFilename) { + filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil]; + } + else { + // Determine what the file name should be + switch (exportSource) + { + case SPFilteredExport: + filename = [NSString stringWithFormat:@"%@_view", [tableDocumentInstance table]]; + break; + case SPQueryExport: + filename = @"query_result"; + break; + case SPTableExport: + filename = [tableDocumentInstance database]; + break; + } + } + + singleFileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:filename]]; + } + + // Start the export process depending on the data source + if (exportSource == SPTableExport) { + + // Cache the number of tables being exported + exportTableCount = [exportTables count]; + + // Loop through the tables, creating an exporter for each + for (NSString *table in exportTables) + { + csvExporter = [self initializeCSVExporterForTable:table orDataArray:nil]; + + // If required create a single file handle for all CSV exports + if (![self exportToMultipleFiles]) { + [csvExporter setExportOutputFileHandle:singleFileHandle]; + + if (!singleFileHeaderHasBeenWritten) { + + NSMutableString *lineEnding = [NSMutableString stringWithString:[exportCSVLinesTerminatedField stringValue]]; + + // Escape tabs, line endings and carriage returns + [lineEnding replaceOccurrencesOfString:@"\\t" withString:@"\t" + options:NSLiteralSearch + range:NSMakeRange(0, [lineEnding length])]; + + + [lineEnding replaceOccurrencesOfString:@"\\n" withString:@"\n" + options:NSLiteralSearch + range:NSMakeRange(0, [lineEnding length])]; + + [lineEnding replaceOccurrencesOfString:@"\\r" withString:@"\r" + options:NSLiteralSearch + range:NSMakeRange(0, [lineEnding length])]; + + // Write the file header and the first table name + [singleFileHandle writeData:[[NSMutableString stringWithFormat:@"%@: %@ %@: %@ %@: %@%@%@%@ %@%@%@", + NSLocalizedString(@"Host", @"csv export host heading"), + [tableDocumentInstance host], + NSLocalizedString(@"Database", @"csv export database heading"), + [tableDocumentInstance database], + NSLocalizedString(@"Generation Time", @"csv export generation time heading"), + [NSDate date], + lineEnding, + lineEnding, + NSLocalizedString(@"Table", @"csv export table heading"), + table, + lineEnding, + lineEnding] dataUsingEncoding:[connection encoding]]]; + + singleFileHeaderHasBeenWritten = YES; + } + } + + [exporters addObject:csvExporter]; + } + } + else { + csvExporter = [self initializeCSVExporterForTable:nil orDataArray:dataArray]; + + [csvExporter setExportOutputFileHandle:singleFileHandle]; + + [exporters addObject:csvExporter]; + } + } + // SQL export + else if (exportType == SPSQLExport) { + + // Cache the number of tables being exported + exportTableCount = [exportTables count]; + + SPSQLExporter *sqlExporter = [[SPSQLExporter alloc] initWithDelegate:self]; + + [sqlExporter setSqlDatabaseHost:[tableDocumentInstance host]]; + [sqlExporter setSqlDatabaseName:[tableDocumentInstance database]]; + [sqlExporter setSqlDatabaseVersion:[tableDocumentInstance mySQLVersion]]; + + [sqlExporter setSqlOutputIncludeUTF8BOM:[exportUseUTF8BOMButton state]]; + [sqlExporter setSqlOutputEncodeBLOBasHex:[exportSQLBLOBFieldsAsHexCheck state]]; + [sqlExporter setSqlOutputCompressFile:[exportCompressOutputFile state]]; + [sqlExporter setSqlOutputIncludeErrors:[exportSQLIncludeErrorsCheck state]]; + + // Set generic properties + [sqlExporter setConnection:connection]; + [sqlExporter setExportOutputEncoding:[connection encoding]]; + [sqlExporter setExportUsingLowMemoryBlockingStreaming:[exportProcessLowMemoryButton state]]; + + // Cache the current connection encoding then change it to UTF-8 to allow SQL dumps to work + sqlPreviousConnectionEncoding = [[NSString alloc] initWithString:[tableDocumentInstance connectionEncoding]]; + sqlPreviousConnectionEncodingViaLatin1 = [tableDocumentInstance connectionEncodingViaLatin1:nil]; + + [tableDocumentInstance setConnectionEncoding:@"utf8" reloadingViews:NO]; + + NSMutableArray *tableTypes = [[NSMutableArray alloc] init]; + NSMutableDictionary *infoDict = [[NSMutableDictionary alloc] init]; + + // Build the table information dictionary as well as the table array with item type + for (NSArray *table in exportTables) + { + [infoDict setObject:[tableDataInstance informationForTable:[table objectAtIndex:0]] forKey:[table objectAtIndex:0]]; + } + + [sqlExporter setSqlTableInformation:infoDict]; + [sqlExporter setSqlExportTables:exportTables]; + + // Set the exporter's max progress + [sqlExporter setExportMaxProgress:((NSInteger)[exportProgressIndicator bounds].size.width)]; + + // Set the progress bar's max value + [exportProgressIndicator setMaxValue:[sqlExporter exportMaxProgress]]; + + [infoDict release]; + [tableTypes release]; + + NSString *filename = @""; + + // Create custom filename if required + filename = (createCustomFilename) ? [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil] : [NSString stringWithFormat:@"%@_%@", [tableDocumentInstance database], [[NSDate date] descriptionWithCalendarFormat:@"%Y-%m-%d" timeZone:nil locale:nil]]; + + SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:[filename stringByAppendingPathExtension:([exportCompressOutputFile state]) ? @"gz" : @"sql"]]]; + + [sqlExporter setExportOutputFileHandle:fileHandle]; + + [exporters addObject:sqlExporter]; + + [sqlExporter release]; + } + // XML export + else if (exportType == SPXMLExport) { + + SPXMLExporter *xmlExporter = nil; + + // If the user has selected to only export to a single file or this is a filtered or custom query + // export, create the single file now and assign it to all subsequently created exporters. + if ((![self exportToMultipleFiles]) || (exportSource == SPFilteredExport) || (exportSource == SPQueryExport)) { + + NSString *filename = @""; + + // Create custom filename if required + if (createCustomFilename) { + filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil]; + } + else { + // Determine what the file name should be + switch (exportSource) + { + case SPFilteredExport: + filename = [NSString stringWithFormat:@"%@_view", [tableDocumentInstance table]]; + break; + case SPQueryExport: + filename = @"query_result"; + break; + case SPTableExport: + filename = [tableDocumentInstance database]; + break; + } + } + + singleFileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:[filename stringByAppendingPathExtension:@"xml"]]]; + + // Write the file header + [self writeXMLHeaderToFileHandle:singleFileHandle]; + } + + // Start the export process depending on the data source + if (exportSource == SPTableExport) { + + // Cache the number of tables being exported + exportTableCount = [exportTables count]; + + // Loop through the tables, creating an exporter for each + for (NSString *table in exportTables) + { + xmlExporter = [self initializeXMLExporterForTable:table orDataArray:nil]; + + // If required create a single file handle for all XML exports + if (![self exportToMultipleFiles]) { + [xmlExporter setExportOutputFileHandle:singleFileHandle]; + + if (!singleFileHeaderHasBeenWritten) { + + // Write the file header + [self writeXMLHeaderToFileHandle:singleFileHandle]; + + singleFileHeaderHasBeenWritten = YES; + } + } + + [exporters addObject:xmlExporter]; + } + } + else { + xmlExporter = [self initializeXMLExporterForTable:nil orDataArray:dataArray]; + + [xmlExporter setExportOutputFileHandle:singleFileHandle]; + + [exporters addObject:xmlExporter]; + } + } + // Dot export + else if (exportType == SPDotExport) { + + // Cache the number of tables being exported + exportTableCount = [exportTables count]; + + SPDotExporter *dotExporter = [[SPDotExporter alloc] initWithDelegate:self]; + + [dotExporter setDotTableData:tableDataInstance]; + + [dotExporter setDotDatabaseHost:[tableDocumentInstance host]]; + [dotExporter setDotDatabaseName:[tableDocumentInstance database]]; + [dotExporter setDotDatabaseVersion:[tableDocumentInstance mySQLVersion]]; + + // Set generic properties + [dotExporter setConnection:connection]; + [dotExporter setExportOutputEncoding:[connection encoding]]; + [dotExporter setExportUsingLowMemoryBlockingStreaming:[exportProcessLowMemoryButton state]]; + + // Cache the current connection encoding then change it to UTF-8 to allow SQL dumps to work + sqlPreviousConnectionEncoding = [[NSString alloc] initWithString:[tableDocumentInstance connectionEncoding]]; + sqlPreviousConnectionEncodingViaLatin1 = [tableDocumentInstance connectionEncodingViaLatin1:nil]; + + [tableDocumentInstance setConnectionEncoding:@"utf8" reloadingViews:NO]; + + [dotExporter setDotExportTables:exportTables]; + + // Set the exporter's max progress + [dotExporter setExportMaxProgress:(NSInteger)[exportProgressIndicator bounds].size.width]; + + // Set the progress bar's max value + [exportProgressIndicator setMaxValue:[dotExporter exportMaxProgress]]; + + NSString *filename = @""; + + // Create custom filename if required + if (createCustomFilename) { + filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:nil]; + } + else { + filename = [tableDocumentInstance database]; + } + + SPFileHandle *fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:[filename stringByAppendingPathExtension:@"dot"]]]; + + [dotExporter setExportOutputFileHandle:fileHandle]; + + [exporters addObject:dotExporter]; + + [dotExporter release]; + } + + // Add the first exporter to the operation queue + [operationQueue addOperation:[exporters objectAtIndex:0]]; + + // Remove the exporter we just added to the operation queue from our list of exporters + // so we know it's already been done. + [exporters removeObjectAtIndex:0]; +} + +/** + * Initialises a CSV exporter for the supplied table name or data array. + */ +- (SPCSVExporter *)initializeCSVExporterForTable:(NSString *)table orDataArray:(NSArray *)dataArray +{ + NSString *filename = @""; + SPFileHandle *fileHandle = nil; + + SPCSVExporter *csvExporter = [[SPCSVExporter alloc] initWithDelegate:self]; + + // Depeding on the export source, set the table name or data array + if (exportSource == SPTableExport) { + [csvExporter setCsvTableName:table]; + } + else { + [csvExporter setCsvDataArray:dataArray]; + } + + [csvExporter setCsvTableData:tableDataInstance]; + + [csvExporter setCsvOutputFieldNames:[exportCSVIncludeFieldNamesCheck state]]; + [csvExporter setCsvFieldSeparatorString:[exportCSVFieldsTerminatedField stringValue]]; + [csvExporter setCsvEnclosingCharacterString:[exportCSVFieldsWrappedField stringValue]]; + [csvExporter setCsvLineEndingString:[exportCSVLinesTerminatedField stringValue]]; + [csvExporter setCsvEscapeString:[exportCSVFieldsEscapedField stringValue]]; + [csvExporter setCsvNULLString:[exportCSVNULLValuesAsTextField stringValue]]; + + // If required create separate files + if ([self exportToMultipleFiles]) { + + if (createCustomFilename) { + + // Create custom filename based on the selected format + filename = [self expandCustomFilenameFormatFromString:[exportCustomFilenameTokenField stringValue] usingTableName:table]; + + // If the user chose to use a custom filename format and we exporting to multiple files, make + // sure the table name is included to ensure the output files are unique. + filename = ([[exportCustomFilenameTokenField stringValue] rangeOfString:@"table" options:NSLiteralSearch].location == NSNotFound) ? [filename stringByAppendingFormat:@"_%@", table] : filename; + } + else { + filename = table; + } + + fileHandle = [self getFileHandleForFilePath:[[exportPathField stringValue] stringByAppendingPathComponent:filename]]; + + [csvExporter setExportOutputFileHandle:fileHandle]; + } + + // Set generic properties + [csvExporter setConnection:connection]; + [csvExporter setExportOutputEncoding:[connection encoding]]; + [csvExporter setExportMaxProgress:((NSInteger)[exportProgressIndicator bounds].size.width)]; + [csvExporter setExportUsingLowMemoryBlockingStreaming:[exportProcessLowMemoryButton state]]; + + // Set the progress bar's max value + [exportProgressIndicator setMaxValue:[csvExporter exportMaxProgress]]; + + return [csvExporter autorelease]; +} + +/** + * Initialises a XML exporter for the supplied table name or data array. + */ +- (SPXMLExporter *)initializeXMLExporterForTable:(NSString *)table orDataArray:(NSArray *)dataArray +{ + NSString *filename = @""; + SPFileHandle *fileHandle = nil; + + SPXMLExporter *xmlExporter = [[SPXMLExporter alloc] initWithDelegate:self]; + + // Depeding on the export source, set the table name or data array + if (exportSource == SPTableExport) { + [xmlExporter setXmlTableName:table]; + } + else { + [xmlExporter setXmlDataArray:dataArray]; + } + + // Regardless of the export source, set exporter's table name as it's used in the output + // of table and table content exports. + [xmlExporter setXmlTableName:[tablesListInstance tableName]]; + + // If required create separate files + if ((exportSource == SPTableExport) && exportToMultipleFiles && (exportTableCount > 0)) { + filename = [[exportPathField stringValue] stringByAppendingPathComponent:table]; + + fileHandle = [self getFileHandleForFilePath:filename]; + + // Write the file header + [self writeXMLHeaderToFileHandle:fileHandle]; + + [xmlExporter setExportOutputFileHandle:fileHandle]; + } + + // Set generic properties + [xmlExporter setConnection:connection]; + [xmlExporter setExportOutputEncoding:[connection encoding]]; + [xmlExporter setExportMaxProgress:((NSInteger)[exportProgressIndicator bounds].size.width)]; + [xmlExporter setExportUsingLowMemoryBlockingStreaming:[exportProcessLowMemoryButton state]]; + + // Set the progress bar's max value + [exportProgressIndicator setMaxValue:[xmlExporter exportMaxProgress]]; + + return [xmlExporter autorelease]; +} + +/** + * Writes the XML file header to the supplied file handle. + */ +- (void)writeXMLHeaderToFileHandle:(SPFileHandle *)fileHandle +{ + NSMutableString *header = [NSMutableString string]; + + [header setString:@"<?xml version=\"1.0\"?>\n\n"]; + [header appendString:@"<!--\n-\n"]; + [header appendString:@"- Sequel Pro XML dump\n"]; + [header appendString:[NSString stringWithFormat:@"- Version %@\n-\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]]; + [header appendString:[NSString stringWithFormat:@"- %@\n- %@\n-\n", SPHomePageURL, SPDevURL]]; + [header appendString:[NSString stringWithFormat:@"- Host: %@ (MySQL %@)\n", [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]]; + [header appendString:[NSString stringWithFormat:@"- Database: %@\n", [tableDocumentInstance database]]]; + [header appendString:[NSString stringWithFormat:@"- Generation Time: %@\n", [NSDate date]]]; + [header appendString:@"-\n-->\n\n"]; + + if (exportSource == SPTableExport) { + [header appendString:[NSString stringWithFormat:@"<%@>\n\n", [[tableDocumentInstance database] HTMLEscapeString]]]; + } + + [fileHandle writeData:[header dataUsingEncoding:NSUTF8StringEncoding]]; +} + +/** + * Returns a file handle for writing at the supplied path. + */ +- (SPFileHandle *)getFileHandleForFilePath:(NSString *)filePath +{ + SPFileHandle *fileHandle = nil; + NSFileManager *fileManager = [NSFileManager defaultManager]; + + if ([fileManager fileExistsAtPath:filePath]) { + if ((![fileManager isWritableFileAtPath:filePath]) || (!(fileHandle = [SPFileHandle fileHandleForWritingAtPath:filePath]))) { + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, + NSLocalizedString(@"Couldn't replace the file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be replaced")); + return nil; + } + } + // Otherwise attempt to create a file + else { + if (![fileManager createFileAtPath:filePath contents:[NSData data] attributes:nil]) { + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, + NSLocalizedString(@"Couldn't write to file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be written")); + return nil; + } + + // Retrieve a filehandle for the file, attempting to delete it on failure. + fileHandle = [SPFileHandle fileHandleForWritingAtPath:filePath]; + + if (!fileHandle) { + [[NSFileManager defaultManager] removeFileAtPath:filePath handler:nil]; + + SPBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [tableDocumentInstance parentWindow], self, nil, nil, + NSLocalizedString(@"Couldn't write to file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be written")); + return nil; + } + } + + return fileHandle; +} + +@end diff --git a/Source/SPExportUtilities.h b/Source/SPExportUtilities.h new file mode 100644 index 00000000..2c7c1e09 --- /dev/null +++ b/Source/SPExportUtilities.h @@ -0,0 +1,30 @@ +// +// $Id$ +// +// SPExportUtilities.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +@interface SPExportUtilities : NSObject + +void SPExportDelegateConformsToProtocol(NSObject *delegate, Protocol *protocol); + +@end diff --git a/Source/SPExportUtilities.m b/Source/SPExportUtilities.m new file mode 100644 index 00000000..bf532bb2 --- /dev/null +++ b/Source/SPExportUtilities.m @@ -0,0 +1,40 @@ +// +// $Id$ +// +// SPExportUtilities.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportUtilities.h" + +@implementation SPExportUtilities + +void SPExportDelegateConformsToProtocol(NSObject *delegate, Protocol *protocol) +{ + // Check that the the supplied delegate conforms to the supplied protocol, if not throw an exception + if (![delegate conformsToProtocol:protocol]) { + @throw [NSException exceptionWithName:@"Protocol Conformance" + reason:[NSString stringWithFormat:@"The supplied delegate does not conform to the protocol '%@'.", NSStringFromProtocol(protocol)] + userInfo:nil]; + } +} + +@end diff --git a/Source/SPExporter.h b/Source/SPExporter.h index 1f52e5db..805173c9 100644 --- a/Source/SPExporter.h +++ b/Source/SPExporter.h @@ -25,9 +25,11 @@ #import <Cocoa/Cocoa.h> -#import "SPExporterDataAccess.h" - /** + * @class SPExporter SPExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * * This class is designed to be the base class of all data exporters and provide basic functionality * common to each of them. Each data exporter (i.e. CSV, SQL, XML, etc.) should be implemented as a subclass * of this class, with the end result being a modular export architecture separated by export type. All exporters @@ -47,28 +49,35 @@ * once the exporter instance is placed on the operation queue once its ready to be run. */ +@class MCPConnection, SPFileHandle; + @interface SPExporter : NSOperation -{ - id <SPExporterDataAccess> delegate; - SEL didEndSelector; +{ + MCPConnection *connection; double exportProgressValue; BOOL exportProcessIsRunning; + BOOL exportUsingLowMemoryBlockingStreaming; NSString *exportData; + SPFileHandle *exportOutputFileHandle; NSStringEncoding exportOutputEncoding; + + NSInteger exportMaxProgress; } -@property (readwrite, assign) id delegate; -@property (readwrite, assign) SEL didEndSelector; -@property (readwrite, assign) double exportProgressValue; +@property(readwrite, retain) MCPConnection *connection; + +@property(readwrite, assign) double exportProgressValue; -@property (readwrite, assign) BOOL exportProcessIsRunning; +@property(readwrite, assign) BOOL exportProcessIsRunning; +@property(readwrite, assign) BOOL exportUsingLowMemoryBlockingStreaming; -@property (readwrite, retain) NSString *exportData; -@property (readwrite, assign) NSStringEncoding exportOutputEncoding; +@property(readwrite, retain) NSString *exportData; +@property(readwrite, retain) SPFileHandle *exportOutputFileHandle; +@property(readwrite, assign) NSStringEncoding exportOutputEncoding; -- (id)initWithDelegate:(id)exportDelegate; +@property(readwrite, assign) NSInteger exportMaxProgress; @end diff --git a/Source/SPExporter.m b/Source/SPExporter.m index cf764b61..b7d9f242 100644 --- a/Source/SPExporter.m +++ b/Source/SPExporter.m @@ -27,21 +27,21 @@ @implementation SPExporter -@synthesize delegate; -@synthesize didEndSelector; +@synthesize connection; @synthesize exportProgressValue; @synthesize exportProcessIsRunning; +@synthesize exportUsingLowMemoryBlockingStreaming; @synthesize exportData; +@synthesize exportOutputFileHandle; @synthesize exportOutputEncoding; +@synthesize exportMaxProgress; /** - * Initialise an instance of SPCSVExporter using the supplied delegate and set some default values. + * Initialise an instance of SPExporter, while setting some default values. */ -- (id)initWithDelegate:(id)exportDelegate +- (id)init { - if ((self = [super init])) { - [self setDelegate:exportDelegate]; - + if ((self = [super init])) { [self setExportProgressValue:0]; [self setExportProcessIsRunning:NO]; @@ -50,8 +50,6 @@ // Default the output encoding to UTF-8 [self setExportOutputEncoding:NSUTF8StringEncoding]; - - [self setDidEndSelector:@selector(exporterDataConversionProcessComplete:)]; } return self; @@ -62,7 +60,9 @@ */ - (void)main { - @throw [NSException exceptionWithName:@"NSOperation main() call" reason:@"Can't call NSOperation's main() method in SPExpoter, must be overriden in subclass." userInfo:nil]; + @throw [NSException exceptionWithName:@"NSOperation main() Call" + reason:@"Can't call NSOperation's main() method in SPExpoter, must be overriden in subclass." + userInfo:nil]; } /** @@ -70,7 +70,9 @@ */ - (void)dealloc { - [exportData release], exportData = nil; + if (exportData) [exportData release], exportData = nil; + if (connection) [connection release], connection = nil; + if (exportOutputFileHandle) [exportOutputFileHandle release], exportOutputFileHandle = nil; [super dealloc]; } diff --git a/Source/SPHTMLExporter.h b/Source/SPHTMLExporter.h new file mode 100644 index 00000000..e58f8c80 --- /dev/null +++ b/Source/SPHTMLExporter.h @@ -0,0 +1,57 @@ +// +// $Id$ +// +// SPHTMLExporter.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +#import "SPExporter.h" +#import "SPHTMLExporterProtocol.h" + +/** + * @class SPHTMLExporter SPHTMLExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * HTML exporter class. + */ +@interface SPHTMLExporter : SPExporter +{ + /** + * Exporter delegate + */ + NSObject <SPHTMLExporterProtocol> *delegate; +} + +@property(readwrite, assign) NSObject *delegate; + +/** + * Initialise an instance of SPHTMLExporter using the supplied delegate. + * + * @param exportDelegate The exporter delegate + * + * @return The initialised instance + */ +- (id)initWithDelegate:(NSObject *)exportDelegate; + +@end diff --git a/Source/SPHTMLExporter.m b/Source/SPHTMLExporter.m new file mode 100644 index 00000000..45f41c54 --- /dev/null +++ b/Source/SPHTMLExporter.m @@ -0,0 +1,62 @@ +// +// $Id$ +// +// SPHTMLExporter.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPHTMLExporter.h" +#import "SPExportUtilities.h" + +@implementation SPHTMLExporter + +@synthesize delegate; + +/** + * Initialise an instance of SPHTMLExporter using the supplied delegate. + */ +- (id)initWithDelegate:(NSObject *)exportDelegate +{ + if ((self = [super init])) { + SPExportDelegateConformsToProtocol(exportDelegate, @protocol(SPHTMLExporterProtocol)); + + [self setDelegate:exportDelegate]; + } + + return self; +} + +/** + * Start the HTML export process. This method is automatically called when an instance of this class + * is placed on an NSOperationQueue. Do not call it directly as there is no manual multithreading. + */ +- (void)main +{ + @try { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [pool release]; + + } + @catch (NSException *e) { } +} + +@end diff --git a/Source/SPHTMLExporterDelegate.h b/Source/SPHTMLExporterDelegate.h new file mode 100644 index 00000000..5cace8af --- /dev/null +++ b/Source/SPHTMLExporterDelegate.h @@ -0,0 +1,38 @@ +// +// $Id$ +// +// SPHTMLExporterDelegate.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportController.h" +#import "SPHTMLExporterProtocol.h" + +/** + * @category SPHTMLExporterDelegate SPHTMLExporterDelegate.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * HTML exporter delegate category. + */ +@interface SPExportController (SPHTMLExporterDelegate) <SPHTMLExporterProtocol> + +@end diff --git a/Source/SPHTMLExporterDelegate.m b/Source/SPHTMLExporterDelegate.m new file mode 100644 index 00000000..e4f02180 --- /dev/null +++ b/Source/SPHTMLExporterDelegate.m @@ -0,0 +1,54 @@ +// +// $Id$ +// +// SPHTMLExporterDelegate.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPHTMLExporterDelegate.h" + +@implementation SPExportController (SPHTMLExporterDelegate) + +/** + * + */ +- (void)htmlExportProcessWillBegin:(SPHTMLExporter *)exporter +{ + +} + +/** + * + */ +- (void)htmlExportProcessComplete:(SPHTMLExporter *)exporter +{ + +} + +/** + * + */ +- (void)htmlExportProcessWillBeginWritingData:(SPHTMLExporter *)exporter +{ + +} + +@end diff --git a/Source/SPHTMLExporterProtocol.h b/Source/SPHTMLExporterProtocol.h new file mode 100644 index 00000000..f5c7328e --- /dev/null +++ b/Source/SPHTMLExporterProtocol.h @@ -0,0 +1,60 @@ +// +// $Id$ +// +// SPHTMLExporterProtocol.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +@class SPHTMLExporter; + +/** + * @protocol SPHTMLExporterProtocol SPHTMLExporterProtocol.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * HTML exporter delegate protocol. + */ +@protocol SPHTMLExporterProtocol + +/** + * Called when the HTML export process is about to begin. + * + * @param SPHTMLExporter The expoter calling the method. + */ +- (void)htmlExportProcessWillBegin:(SPHTMLExporter *)exporter; + +/** + * Called when the HTML export process is complete. + * + * @param SPHTMLExporter The expoter calling the method. + */ +- (void)htmlExportProcessComplete:(SPHTMLExporter *)exporter; + +/** + * Called when the HTML export process is about to begin writing data to disk. + * + * @param SPHTMLExporter The expoter calling the method. + */ +- (void)htmlExportProcessWillBeginWritingData:(SPHTMLExporter *)exporter; + +@end diff --git a/Source/SPPDFExporter.h b/Source/SPPDFExporter.h new file mode 100644 index 00000000..62283c43 --- /dev/null +++ b/Source/SPPDFExporter.h @@ -0,0 +1,57 @@ +// +// $Id$ +// +// SPPDFExporter.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +#import "SPExporter.h" +#import "SPPDFExporterProtocol.h" + +/** + * @class SPPDFExporter SPPDFExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * PDF exporter class. + */ +@interface SPPDFExporter : SPExporter +{ + /** + * Exporter delegate + */ + NSObject <SPPDFExporterProtocol> *delegate; +} + +@property(readwrite, assign) NSObject *delegate; + +/** + * Initialise an instance of SPPDFExporter using the supplied delegate. + * + * @param exportDelegate The exporter delegate + * + * @return The initialised instance + */ +- (id)initWithDelegate:(NSObject *)exportDelegate; + +@end diff --git a/Source/SPPDFExporter.m b/Source/SPPDFExporter.m new file mode 100644 index 00000000..a850e2bf --- /dev/null +++ b/Source/SPPDFExporter.m @@ -0,0 +1,61 @@ +// +// $Id$ +// +// SPPDFExporter.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPPDFExporter.h" +#import "SPExportUtilities.h" + +@implementation SPPDFExporter + +@synthesize delegate; + +/** + * Initialise an instance of SPPDFExporter using the supplied delegate. + */ +- (id)initWithDelegate:(NSObject *)exportDelegate +{ + if ((self = [super init])) { + SPExportDelegateConformsToProtocol(exportDelegate, @protocol(SPPDFExporterProtocol)); + + [self setDelegate:exportDelegate]; + } + + return self; +} + +/** + * Start the PDF export process. This method is automatically called when an instance of this class + * is placed on an NSOperationQueue. Do not call it directly as there is no manual multithreading. + */ +- (void)main +{ + @try { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + [pool release]; + } + @catch (NSException *e) { } +} + +@end diff --git a/Source/SPPDFExporterDelegate.h b/Source/SPPDFExporterDelegate.h new file mode 100644 index 00000000..ef17a741 --- /dev/null +++ b/Source/SPPDFExporterDelegate.h @@ -0,0 +1,38 @@ +// +// $Id$ +// +// SPPDFExporterDelegate.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportController.h" +#import "SPPDFExporterProtocol.h" + +/** + * @category SPPDFExporterDelegate SPPDFExporterDelegate.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * PDF exporter delegate category. + */ +@interface SPExportController (SPPDFExporterDelegate) <SPPDFExporterProtocol> + +@end diff --git a/Source/SPExporterDataAccess.h b/Source/SPPDFExporterDelegate.m index ab44cd39..e838adee 100644 --- a/Source/SPExporterDataAccess.h +++ b/Source/SPPDFExporterDelegate.m @@ -1,11 +1,11 @@ // // $Id$ // -// SPExporterDataAccess.h +// SPPDFExporterDelegate.m // sequel-pro // -// Created by Stuart Connolly (stuconnolly.com) on October 6, 2009 -// Copyright (c) 2009 Stuart Connolly. All rights reserved. +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -23,16 +23,32 @@ // // More info at <http://code.google.com/p/sequel-pro/> -#import <Cocoa/Cocoa.h> +#import "SPPDFExporterDelegate.h" -@class SPExporter; +@implementation SPExportController (SPPDFExporterDelegate) -@protocol SPExporterDataAccess +/** + * + */ +- (void)pdfExportProcessWillBegin:(SPPDFExporter *)exporter +{ + +} + +/** + * + */ +- (void)pdfExportProcessComplete:(SPPDFExporter *)exporter +{ + +} /** - * This method called when an expoter complete it's data conversion process and the operation is effectively - * complete. The resulting data can be accessed via SPExporter's exportData method. + * */ -- (void)exporterDataConversionProcessComplete:(SPExporter *)exporter; +- (void)pdfExportProcessWillBeginWritingData:(SPPDFExporter *)exporter +{ + +} @end diff --git a/Source/SPPDFExporterProtocol.h b/Source/SPPDFExporterProtocol.h new file mode 100644 index 00000000..4381451e --- /dev/null +++ b/Source/SPPDFExporterProtocol.h @@ -0,0 +1,60 @@ +// +// $Id$ +// +// SPPDFExporterProtocol.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 24, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +@class SPPDFExporter; + +/** + * @protocol SPPDFExporterProtocol SPPDFExporterProtocol.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * PDF exporter delegate protocol. + */ +@protocol SPPDFExporterProtocol + +/** + * Called when the PDF export process is about to begin. + * + * @param SPHTMLExporter The expoter calling the method. + */ +- (void)pdfExportProcessWillBegin:(SPPDFExporter *)exporter; + +/** + * Called when the PDF export process is complete. + * + * @param SPHTMLExporter The expoter calling the method. + */ +- (void)pdfExportProcessComplete:(SPPDFExporter *)exporter; + +/** + * Called when the PDF export process is about to begin writing data to disk. + * + * @param SPHTMLExporter The expoter calling the method. + */ +- (void)pdfExportProcessWillBeginWritingData:(SPPDFExporter *)exporter; + +@end diff --git a/Source/SPSQLExporter.h b/Source/SPSQLExporter.h index 7a2e9006..6b4702ce 100644 --- a/Source/SPSQLExporter.h +++ b/Source/SPSQLExporter.h @@ -26,7 +26,107 @@ #import <Cocoa/Cocoa.h> #import "SPExporter.h" +#import "SPSQLExporterProtocol.h" +/** + * @class SPSQLExporter SPSQLExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * SQL exporter class. + */ @interface SPSQLExporter : SPExporter +{ + NSObject <SPSQLExporterProtocol> *delegate; + + /** + * Tables + */ + NSArray *sqlExportTables; + + /** + * Database host + */ + NSString *sqlDatabaseHost; + + /** + * Database name + */ + NSString *sqlDatabaseName; + + /** + * Database version + */ + NSString *sqlDatabaseVersion; + + /** + * Current table + */ + NSString *sqlExportCurrentTable; + + /** + * Export errors + */ + NSString *sqlExportErrors; + + /** + * Include UTF-8 BOM + */ + BOOL sqlOutputIncludeUTF8BOM; + + /** + * Encode BLOB fields as Hex data + */ + BOOL sqlOutputEncodeBLOBasHex; + + /** + * Include export errors + */ + BOOL sqlOutputIncludeErrors; + + /** + * Compress output + */ + BOOL sqlOutputCompressFile; + + /** + * Table information + */ + NSDictionary *sqlTableInformation; +} + +@property(readwrite, assign) NSObject *delegate; + +@property(readwrite, retain) NSArray *sqlExportTables; + +@property(readwrite, retain) NSString *sqlDatabaseHost; +@property(readwrite, retain) NSString *sqlDatabaseName; +@property(readwrite, retain) NSString *sqlDatabaseVersion; + +@property(readwrite, retain) NSString *sqlExportCurrentTable; +@property(readwrite, retain) NSString *sqlExportErrors; + +@property(readwrite, assign) BOOL sqlOutputIncludeUTF8BOM; +@property(readwrite, assign) BOOL sqlOutputEncodeBLOBasHex; +@property(readwrite, assign) BOOL sqlOutputIncludeErrors; +@property(readwrite, assign) BOOL sqlOutputCompressFile; + +@property (readwrite, retain) NSDictionary *sqlTableInformation; + +/** + * Initialise an instance of SPSQLExporter using the supplied delegate. + * + * @param exportDelegate The exporter delegate + * + * @return The initialised instance + */ +- (id)initWithDelegate:(NSObject *)exportDelegate; + +/** + * Returns whether or not any export errors occurred. + * + * @return A BOOL indicating the occurrence of errors + */ +- (BOOL)didExportErrorsOccur; @end diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index db9e4532..9b7cbaf6 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -23,26 +23,794 @@ // // More info at <http://code.google.com/p/sequel-pro/> +#import <MCPKit/MCPKit.h> + #import "SPSQLExporter.h" +#import "TablesList.h" +#import "SPConstants.h" +#import "SPArrayAdditions.h" +#import "SPStringAdditions.h" +#import "SPFileHandle.h" +#import "SPExportUtilities.h" + +@interface SPSQLExporter (PrivateAPI) + +- (NSString *)_createViewPlaceholderSyntaxForView:(NSString *)viewName; + +@end @implementation SPSQLExporter +@synthesize delegate; +@synthesize sqlExportTables; +@synthesize sqlDatabaseHost; +@synthesize sqlDatabaseName; +@synthesize sqlDatabaseVersion; +@synthesize sqlExportCurrentTable; +@synthesize sqlExportErrors; +@synthesize sqlOutputIncludeUTF8BOM; +@synthesize sqlOutputEncodeBLOBasHex; +@synthesize sqlOutputIncludeErrors; +@synthesize sqlOutputCompressFile; +@synthesize sqlTableInformation; + +/** + * Initialise an instance of SPSQLExporter using the supplied delegate. + */ +- (id)initWithDelegate:(NSObject *)exportDelegate +{ + if ((self = [super init])) { + SPExportDelegateConformsToProtocol(exportDelegate, @protocol(SPSQLExporterProtocol)); + + [self setDelegate:exportDelegate]; + [self setSqlExportCurrentTable:nil]; + } + + return self; +} + /** - * Start the SQL data conversion process. This method is automatically called when an instance of this object + * Start the SQL export process. This method is automatically called when an instance of this class * is placed on an NSOperationQueue. Do not call it directly as there is no manual multithreading. */ - (void)main { @try { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSAutoreleasePool *sqlExportPool = [[NSAutoreleasePool alloc] init]; + + MCPResult *queryResult; + MCPStreamingResult *streamingResult; + + NSArray *row; + NSString *tableName; + NSDictionary *tableDetails; + NSMutableArray *tableColumnNumericStatus; + SPTableType tableType = SPTableTypeTable; + + id createTableSyntax = nil; + NSUInteger i, j, t, s, rowCount, queryLength, lastProgressValue; + + BOOL sqlOutputIncludeStructure; + BOOL sqlOutputIncludeContent; + BOOL sqlOutputIncludeDropSyntax; + + NSMutableArray *tables = [NSMutableArray array]; + NSMutableArray *procs = [NSMutableArray array]; + NSMutableArray *funcs = [NSMutableArray array]; + + NSMutableString *metaString = [NSMutableString string]; + NSMutableString *cellValue = [NSMutableString string]; + NSMutableString *errors = [[NSMutableString alloc] init]; + NSMutableString *sqlString = [[NSMutableString alloc] init]; + + NSMutableDictionary *viewSyntaxes = [NSMutableDictionary dictionary]; + + // Check that we have all the required info before starting the export + if ((![self sqlExportTables]) || ([[self sqlExportTables] count] == 0) || + (![self sqlTableInformation]) || ([[self sqlTableInformation] count] == 0) || + (![self sqlDatabaseHost]) || ([[self sqlDatabaseHost] isEqualToString:@""]) || + (![self sqlDatabaseName]) || ([[self sqlDatabaseName] isEqualToString:@""]) || + (![self sqlDatabaseVersion] || ([[self sqlDatabaseName] isEqualToString:@""]))) + { + [pool release]; + return; + } + + // Inform the delegate that the export process is about to begin + [delegate performSelectorOnMainThread:@selector(sqlExportProcessWillBegin:) withObject:self waitUntilDone:NO]; + + // Mark the process as running + [self setExportProcessIsRunning:YES]; + + // Clear errors + [self setSqlExportErrors:@""]; + + // Copy over the selected item names into tables in preparation for iteration + NSMutableArray *targetArray; + + for (NSArray *item in [self sqlExportTables]) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + switch ([NSArrayObjectAtIndex(item, 4) intValue]) { + case SPTableTypeProc: + targetArray = procs; + break; + case SPTableTypeFunc: + targetArray = funcs; + break; + default: + targetArray = tables; + break; + } + + [targetArray addObject:item]; + } + + // If required write the UTF-8 Byte Order Mark + if ([self sqlOutputIncludeUTF8BOM]) { + [metaString setString:@"\xef\xbb\xbf"]; + [metaString appendString:@"# ************************************************************\n"]; + } + else { + [metaString setString:@"# ************************************************************\n"]; + } + + // If required set the file handle to compress it's output + [[self exportOutputFileHandle] setShouldWriteWithGzipCompression:[self sqlOutputCompressFile]]; + + // Add the dump header to the dump file + [metaString appendString:@"# Sequel Pro SQL dump\n"]; + [metaString appendString:[NSString stringWithFormat:@"# Version %@\n#\n", [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]]; + [metaString appendString:[NSString stringWithFormat:@"# %@\n# %@\n#\n", SPHomePageURL, SPDevURL]]; + [metaString appendString:[NSString stringWithFormat:@"# Host: %@ (MySQL %@)\n", [self sqlDatabaseHost], [self sqlDatabaseVersion]]]; + [metaString appendString:[NSString stringWithFormat:@"# Database: %@\n", [self sqlDatabaseName]]]; + [metaString appendString:[NSString stringWithFormat:@"# Generation Time: %@\n", [NSDate date]]]; + [metaString appendString:@"# ************************************************************\n\n\n"]; + + // Add commands to store the client encodings used when importing and set to UTF8 to preserve data + [metaString appendString:@"/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n"]; + [metaString appendString:@"/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n"]; + [metaString appendString:@"/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n"]; + [metaString appendString:@"/*!40101 SET NAMES utf8 */;\n"]; + + // Add commands to store and disable unique checks, foreign key checks, mode and notes where supported. + // Include trailing semicolons to ensure they're run individually. Use MySQL-version based comments. + //if (sqlOutputIncludeDropSyntax) { + //[metaString appendString:@"/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"]; + //} + + [metaString appendString:@"/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n"]; + [metaString appendString:@"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n"]; + [metaString appendString:@"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n\n"]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:[self exportOutputEncoding]]]; + + // Loop through the selected tables + for (NSArray *table in [self sqlExportTables]) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + tableName = NSArrayObjectAtIndex(table, 0); + + sqlOutputIncludeStructure = [NSArrayObjectAtIndex(table, 1) boolValue]; + sqlOutputIncludeContent = [NSArrayObjectAtIndex(table, 2) boolValue]; + sqlOutputIncludeDropSyntax = [NSArrayObjectAtIndex(table, 3) boolValue]; + + // Set the current table + [self setSqlExportCurrentTable:tableName]; + + // Inform the delegate that we are about to start fetcihing data for the current table + [delegate performSelectorOnMainThread:@selector(sqlExportProcessWillBeginFetchingData:) withObject:self waitUntilDone:NO]; + + lastProgressValue = 0; + + // Add the name of table + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"# Dump of table %@\n# ------------------------------------------------------------\n\n", tableName] dataUsingEncoding:[self exportOutputEncoding]]]; + + // Determine whether this table is a table or a view via the CREATE TABLE command, and keep the create table syntax + queryResult = [connection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE %@", [tableName backtickQuotedString]]]; + + [queryResult setReturnDataAsStrings:YES]; + + if ([queryResult numOfRows]) { + tableDetails = [[NSDictionary alloc] initWithDictionary:[queryResult fetchRowAsDictionary]]; + + if ([tableDetails objectForKey:@"Create View"]) { + [viewSyntaxes setValue:[[[[tableDetails objectForKey:@"Create View"] copy] autorelease] createViewSyntaxPrettifier] forKey:tableName]; + createTableSyntax = [self _createViewPlaceholderSyntaxForView:tableName]; + tableType = SPTableTypeView; + } + else { + createTableSyntax = [[[tableDetails objectForKey:@"Create Table"] copy] autorelease]; + tableType = SPTableTypeTable; + } + + [tableDetails release]; + } + + if ([connection queryErrored]) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [connection getLastErrorMessage]]]; + + if ([self sqlOutputIncludeErrors]) { + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"# Error: %@\n", [connection getLastErrorMessage]] dataUsingEncoding:NSUTF8StringEncoding]]; + } + } + + // Add a 'DROP TABLE' command if required + if (sqlOutputIncludeDropSyntax) + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"DROP %@ IF EXISTS %@;\n\n", ((tableType == SPTableTypeTable) ? @"TABLE" : @"VIEW"), [tableName backtickQuotedString]] + dataUsingEncoding:[self exportOutputEncoding]]]; + + + // Add the create syntax for the table if specified in the export dialog + if (sqlOutputIncludeStructure && createTableSyntax) { + + if ([createTableSyntax isKindOfClass:[NSData class]]) { + createTableSyntax = [[[NSString alloc] initWithData:createTableSyntax encoding:[self exportOutputEncoding]] autorelease]; + } + + [[self exportOutputFileHandle] writeData:[createTableSyntax dataUsingEncoding:NSUTF8StringEncoding]]; + [[self exportOutputFileHandle] writeData:[[NSString stringWithString:@";\n\n"] dataUsingEncoding:NSUTF8StringEncoding]]; + } + + // Add the table content if required + if (sqlOutputIncludeContent && (tableType == SPTableTypeTable)) { + + // Retrieve the table details via the data class, and use it to build an array containing column numeric status + tableDetails = [NSDictionary dictionaryWithDictionary:[[self sqlTableInformation] objectForKey:tableName]]; + + NSUInteger colCount = [[tableDetails objectForKey:@"columns"] count]; + + tableColumnNumericStatus = [NSMutableArray arrayWithCapacity:colCount]; + + for (j = 0; j < colCount; j++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + NSString *tableColumnTypeGrouping = [NSArrayObjectAtIndex([tableDetails objectForKey:@"columns"], j) objectForKey:@"typegrouping"]; + + [tableColumnNumericStatus addObject:[NSNumber numberWithBool:([tableColumnTypeGrouping isEqualToString:@"bit"] || [tableColumnTypeGrouping isEqualToString:@"integer"] || [tableColumnTypeGrouping isEqualToString:@"float"])]]; + } + + // Retrieve the number of rows in the table for progress bar drawing + rowCount = [NSArrayObjectAtIndex([[connection queryString:[NSString stringWithFormat:@"SELECT COUNT(1) FROM %@", [tableName backtickQuotedString]]] fetchRowAsArray], 0) integerValue]; + + // Set up a result set in streaming mode + streamingResult = [[connection streamingQueryString:[NSString stringWithFormat:@"SELECT * FROM %@", [tableName backtickQuotedString]] useLowMemoryBlockingStreaming:([self exportUsingLowMemoryBlockingStreaming])] retain]; + + NSArray *fieldNames = [streamingResult fetchFieldNames]; + + // Inform the delegate that we are about to start writing data for the current table + [delegate performSelectorOnMainThread:@selector(sqlExportProcessWillBeginWritingData:) withObject:self waitUntilDone:NO]; + + if (rowCount) { + queryLength = 0; + + // Lock the table for writing and disable keys if supported + [metaString setString:@""]; + [metaString appendString:[NSString stringWithFormat:@"LOCK TABLES %@ WRITE;\n", [tableName backtickQuotedString]]]; + [metaString appendString:[NSString stringWithFormat:@"/*!40000 ALTER TABLE %@ DISABLE KEYS */;\n\n", [tableName backtickQuotedString]]]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:[self exportOutputEncoding]]]; + + // Construct the start of the insertion command + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"INSERT INTO %@ (%@)\nVALUES\n\t(", + [tableName backtickQuotedString], [fieldNames componentsJoinedAndBacktickQuoted]] dataUsingEncoding:NSUTF8StringEncoding]]; + + // Iterate through the rows to construct a VALUES group for each + j = 0; + + sqlExportPool = [[NSAutoreleasePool alloc] init]; + + // Inform the delegate that we are about to start writing the data to disk + [delegate performSelectorOnMainThread:@selector(sqlExportProcessWillBeginWritingData:) withObject:self waitUntilDone:NO]; + + while (row = [streamingResult fetchNextRowAsArray]) + { + // Check for cancellation flag + if ([self isCancelled]) { + [connection cancelCurrentQuery]; + [streamingResult cancelResultLoad]; + [sqlExportPool release]; + [pool release]; + + return; + } + + j++; + [sqlString setString:@""]; + + // Update the progress + if ((j * ([self exportMaxProgress] / rowCount)) > lastProgressValue) { + + NSInteger progress = (j * ([self exportMaxProgress] / rowCount)); + + [self setExportProgressValue:progress]; + + lastProgressValue = progress; + + // Inform the delegate that the export's progress has been updated + [delegate performSelectorOnMainThread:@selector(sqlExportProcessProgressUpdated:) withObject:self waitUntilDone:NO]; + } + + for (t = 0; t < colCount; t++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [sqlExportPool release]; + [pool release]; + + return; + } + + // Add NULL values directly to the output row + if ([NSArrayObjectAtIndex(row, t) isMemberOfClass:[NSNull class]]) { + [sqlString appendString:@"NULL"]; + } + // Add data types directly as hex data + else if ([NSArrayObjectAtIndex(row, t) isKindOfClass:[NSData class]]) { + + if ([self sqlOutputEncodeBLOBasHex]) { + [sqlString appendString:@"X'"]; + [sqlString appendString:[connection prepareBinaryData:NSArrayObjectAtIndex(row, t)]]; + } + else { + [sqlString appendString:@"'"]; + + NSString *data = [[NSString alloc] initWithData:NSArrayObjectAtIndex(row, t) encoding:[self exportOutputEncoding]]; + + if (data == nil) { + data = [[NSString alloc] initWithData:NSArrayObjectAtIndex(row, t) encoding:NSASCIIStringEncoding]; + } + + [sqlString appendString:data]; + + [data release]; + } + + [sqlString appendString:@"'"]; + } + else { + [cellValue setString:[NSArrayObjectAtIndex(row, t) description]]; + + // Add empty strings as a pair of quotes + if ([cellValue length] == 0) { + [sqlString appendString:@"''"]; + } + else { + // If this is a numeric column type, add the number directly. + if ([NSArrayObjectAtIndex(tableColumnNumericStatus, t) boolValue]) { + [sqlString appendString:cellValue]; + } + // Otherwise add a quoted string with special characters escaped + else { + [sqlString appendString:@"'"]; + [sqlString appendString:[connection prepareString:cellValue]]; + [sqlString appendString:@"'"]; + } + } + } + + // Add the field separator if this isn't the last cell in the row + if (t != ([row count] - 1)) [sqlString appendString:@","]; + } + + queryLength += [sqlString length]; + + // Close this VALUES group and set up the next one if appropriate + if (j != rowCount) { + + // Add a new INSERT starter command every ~250k of data + if (queryLength > 250000) { + [sqlString appendString:[NSString stringWithFormat:@");\n\nINSERT INTO %@ (%@)\nVALUES\n\t(", + [tableName backtickQuotedString], [fieldNames componentsJoinedAndBacktickQuoted]]]; + queryLength = 0; + + // Use the opportunity to drain and reset the autorelease pool + [sqlExportPool release]; + sqlExportPool = [[NSAutoreleasePool alloc] init]; + } + else { + [sqlString appendString:@"),\n\t("]; + } + } + else { + [sqlString appendString:@")"]; + } + + // Write this row to the file + [[self exportOutputFileHandle] writeData:[sqlString dataUsingEncoding:NSUTF8StringEncoding]]; + } + + // Complete the command + [[self exportOutputFileHandle] writeData:[[NSString stringWithString:@";\n\n"] dataUsingEncoding:NSUTF8StringEncoding]]; + + // Unlock the table and re-enable keys if supported + [metaString setString:@""]; + [metaString appendString:[NSString stringWithFormat:@"/*!40000 ALTER TABLE %@ ENABLE KEYS */;\n", [tableName backtickQuotedString]]]; + [metaString appendString:@"UNLOCK TABLES;\n"]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + + // Drain the autorelease pool + [sqlExportPool release]; + } + + if ([connection queryErrored]) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [connection getLastErrorMessage]]]; + + if ([self sqlOutputIncludeErrors]) { + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"# Error: %@\n", [connection getLastErrorMessage]] + dataUsingEncoding:NSUTF8StringEncoding]]; + } + } + + // Release the result set + [streamingResult release]; + + queryResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW TRIGGERS WHERE `Table` = %@ */;", [tableName tickQuotedString]]]; + + [queryResult setReturnDataAsStrings:YES]; + + if ([queryResult numOfRows]) { + + [metaString setString:@"\n"]; + [metaString appendString:@"DELIMITER ;;\n"]; + + for (s = 0; s < [queryResult numOfRows]; s++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + NSDictionary *triggers = [[NSDictionary alloc] initWithDictionary:[queryResult fetchRowAsDictionary]]; + + // Definer is user@host but we need to escape it to `user`@`host` + NSArray *triggersDefiner = [[triggers objectForKey:@"Definer"] componentsSeparatedByString:@"@"]; + + NSString *escapedDefiner = [NSString stringWithFormat:@"%@@%@", + [NSArrayObjectAtIndex(triggersDefiner, 0) backtickQuotedString], + [NSArrayObjectAtIndex(triggersDefiner, 1) backtickQuotedString] + ]; + + [metaString appendString:[NSString stringWithFormat:@"/*!50003 SET SESSION SQL_MODE=\"%@\" */;;\n", [triggers objectForKey:@"sql_mode"]]]; + [metaString appendString:@"/*!50003 CREATE */ "]; + [metaString appendString:[NSString stringWithFormat:@"/*!50017 DEFINER=%@ */ ", escapedDefiner]]; + [metaString appendString:[NSString stringWithFormat:@"/*!50003 TRIGGER %@ %@ %@ ON %@ FOR EACH ROW %@ */;;\n", + [[triggers objectForKey:@"Trigger"] backtickQuotedString], + [triggers objectForKey:@"Timing"], + [triggers objectForKey:@"Event"], + [[triggers objectForKey:@"Table"] backtickQuotedString], + [triggers objectForKey:@"Statement"] + ]]; + + [triggers release]; + } + + [metaString appendString:@"DELIMITER ;\n"]; + [metaString appendString:@"/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;\n"]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + } + + if ([connection queryErrored]) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [connection getLastErrorMessage]]]; + + if ([self sqlOutputIncludeErrors]) { + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"# Error: %@\n", [connection getLastErrorMessage]] + dataUsingEncoding:NSUTF8StringEncoding]]; + } + } + + } + + // Add an additional separator between tables + [[self exportOutputFileHandle] writeData:[[NSString stringWithString:@"\n\n"] dataUsingEncoding:NSUTF8StringEncoding]]; + } + // Process any deferred views, adding commands to delete the placeholder tables and add the actual views + for (tableName in viewSyntaxes) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + [metaString setString:@"\n\n"]; + [metaString appendFormat:@"DROP TABLE %@;\n", [tableName backtickQuotedString]]; + [metaString appendFormat:@"%@;\n", [viewSyntaxes objectForKey:tableName]]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + } + // Export procedures and functions + for (NSString *procedureType in [NSArray arrayWithObjects:@"PROCEDURE", @"FUNCTION", nil]) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + // Retrieve the array of selected procedures or functions, and skip export if not selected + NSMutableArray *items; + + if ([procedureType isEqualToString:@"PROCEDURE"]) items = procs; + else items = funcs; + + if ([items count] == 0) continue; + + // Retrieve the definitions + queryResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW %@ STATUS WHERE `Db` = %@ */;", procedureType, + [[self sqlDatabaseName] tickQuotedString]]]; + + [queryResult setReturnDataAsStrings:YES]; + + if ([queryResult numOfRows]) { + + [metaString setString:@"\n"]; + [metaString appendString:@"--\n"]; + [metaString appendString:[NSString stringWithFormat:@"-- Dumping routines (%@) for database %@\n", procedureType, + [[self sqlDatabaseName] tickQuotedString]]]; + + [metaString appendString:@"--\n"]; + [metaString appendString:@"DELIMITER ;;\n"]; + + // Loop through the definitions, exporting if enabled + for (s = 0; s < [queryResult numOfRows]; s++) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + NSDictionary *proceduresList = [[NSDictionary alloc] initWithDictionary:[queryResult fetchRowAsDictionary]]; + NSString *procedureName = [NSString stringWithFormat:@"%@", [proceduresList objectForKey:@"Name"]]; + + // Only proceed if the item was selected for export + if (![items containsObject:procedureName]) { + [proceduresList release]; + continue; + } + + // Only proceed if the item is in the list of items + for (NSArray *item in items) + { + // Check for cancellation flag + if ([self isCancelled]) { + [pool release]; + return; + } + + if ([NSArrayObjectAtIndex(item, 0) isEqualToString:procedureName]) { + sqlOutputIncludeStructure = [NSArrayObjectAtIndex(item, 1) boolValue]; + sqlOutputIncludeContent = [NSArrayObjectAtIndex(item, 2) boolValue]; + sqlOutputIncludeDropSyntax = [NSArrayObjectAtIndex(item, 3) boolValue]; + } + } + + // Add the 'DROP' command if required + if (sqlOutputIncludeDropSyntax) { + [metaString appendString:[NSString stringWithFormat:@"/*!50003 DROP %@ IF EXISTS %@ */;;\n", procedureType, + [procedureName backtickQuotedString]]]; + } + + // Only continue if the 'CREATE SYNTAX' is required + if (sqlOutputIncludeStructure) { + [proceduresList release]; + continue; + } + + // Definer is user@host but we need to escape it to `user`@`host` + NSArray *procedureDefiner = [[proceduresList objectForKey:@"Definer"] componentsSeparatedByString:@"@"]; + + NSString *escapedDefiner = [NSString stringWithFormat:@"%@@%@", + [NSArrayObjectAtIndex(procedureDefiner, 0) backtickQuotedString], + [NSArrayObjectAtIndex(procedureDefiner, 1) backtickQuotedString] + ]; + + MCPResult *createProcedureResult = [connection queryString:[NSString stringWithFormat:@"/*!50003 SHOW CREATE %@ %@ */;;", procedureType, + [procedureName backtickQuotedString]]]; + + [createProcedureResult setReturnDataAsStrings:YES]; + + NSDictionary *procedureInfo = [[NSDictionary alloc] initWithDictionary:[createProcedureResult fetchRowAsDictionary]]; + + [metaString appendString:[NSString stringWithFormat:@"/*!50003 SET SESSION SQL_MODE=\"%@\"*/;;\n", [procedureInfo objectForKey:@"sql_mode"]]]; + + NSString *createProcedure = [procedureInfo objectForKey:[NSString stringWithFormat:@"Create %@", [procedureType capitalizedString]]]; + NSRange procedureRange = [createProcedure rangeOfString:procedureType options:NSCaseInsensitiveSearch]; + NSString *procedureBody = [createProcedure substringFromIndex:procedureRange.location]; + + // /*!50003 CREATE*/ /*!50020 DEFINER=`sequelpro`@`%`*/ /*!50003 PROCEDURE `p`() + // BEGIN + // /* This procedure does nothing */ + // END */;; + // + // Build the CREATE PROCEDURE string to include MySQL Version limiters + [metaString appendString:[NSString stringWithFormat:@"/*!50003 CREATE*/ /*!50020 DEFINER=%@*/ /*!50003 %@ */;;\n", escapedDefiner, procedureBody]]; + + [procedureInfo release]; + [proceduresList release]; + + [metaString appendString:@"/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE */;;\n"]; + } + + [metaString appendString:@"DELIMITER ;\n"]; + + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + } + + if ([connection queryErrored]) { + [errors appendString:[NSString stringWithFormat:@"%@\n", [connection getLastErrorMessage]]]; + + if ([self sqlOutputIncludeErrors]) { + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"# Error: %@\n", [connection getLastErrorMessage]] dataUsingEncoding:NSUTF8StringEncoding]]; + } + } + + } + + // Restore unique checks, foreign key checks, and other settings saved at the start + [metaString setString:@"\n"]; + [metaString appendString:@"/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;\n"]; + [metaString appendString:@"/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n"]; + [metaString appendString:@"/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n"]; + + //if (sqlOutputIncludeDropSyntax) { + //[metaString appendString:@"/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n"]; + //} + + // Restore the client encoding to the original encoding before import + [metaString appendString:@"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n"]; + [metaString appendString:@"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n"]; + [metaString appendString:@"/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n"]; + + // Write footer-type information to the file + [[self exportOutputFileHandle] writeData:[metaString dataUsingEncoding:NSUTF8StringEncoding]]; + + // Set export errors + [self setSqlExportErrors:errors]; + + [errors release]; + [sqlString release]; + + // Close the file + [[self exportOutputFileHandle] closeFile]; + + // Mark the process as not running + [self setExportProcessIsRunning:NO]; + + // Inform the delegate that the export process is complete + [delegate performSelectorOnMainThread:@selector(sqlExportProcessComplete:) withObject:self waitUntilDone:NO]; [pool release]; } - @catch (NSException *e) { + @catch (NSException *e) {} +} + +/** + * Returns whether or not any export errors occurred by examing the length of the errors string. + */ +- (BOOL)didExportErrorsOccur +{ + return [[self sqlExportErrors] length]; +} + +/** + * Retrieve information for a view and use that to construct a CREATE TABLE string for an equivalent basic + * table. Allows the construction of placeholder tables to resolve view interdependencies in dumps. + */ +- (NSString *)_createViewPlaceholderSyntaxForView:(NSString *)viewName +{ + NSInteger i, j; + NSMutableString *placeholderSyntax; + + // Get structured information for the view via the SPTableData parsers + NSDictionary *viewInformation = [[self sqlTableInformation] objectForKey:viewName]; + + if (!viewInformation) return nil; + + NSArray *viewColumns = [viewInformation objectForKey:@"columns"]; + + // Set up the start of the placeholder string and initialise an empty field string + placeholderSyntax = [[NSMutableString alloc] initWithFormat:@"CREATE TABLE %@ (\n", [viewName backtickQuotedString]]; + + NSMutableString *fieldString = [[NSMutableString alloc] init]; + + // Loop through the columns, creating an appropriate column definition for each and appending it to the syntax string + for (i = 0; i < [viewColumns count]; i++) + { + NSDictionary *column = NSArrayObjectAtIndex(viewColumns, i); + + [fieldString setString:[[column objectForKey:@"name"] backtickQuotedString]]; + + // Add the type and length information as appropriate + if ([column objectForKey:@"length"]) { + [fieldString appendFormat:@" %@(%@)", [column objectForKey:@"type"], [column objectForKey:@"length"]]; + } + else if ([column objectForKey:@"values"]) { + [fieldString appendFormat:@" %@(", [column objectForKey:@"type"]]; + + for (j = 0; j < [[column objectForKey:@"values"] count]; j++) + { + [fieldString appendFormat:@"'%@'%@", [connection prepareString:NSArrayObjectAtIndex([column objectForKey:@"values"], j)], ((j + 1) == [[column objectForKey:@"values"] count]) ? @"" : @","]; + } + + [fieldString appendString:@")"]; + } + else { + [fieldString appendFormat:@" %@", [column objectForKey:@"type"]]; + } + + // Field specification details + if ([[column objectForKey:@"unsigned"] integerValue] == 1) [fieldString appendString:@" UNSIGNED"]; + if ([[column objectForKey:@"zerofill"] integerValue] == 1) [fieldString appendString:@" ZEROFILL"]; + if ([[column objectForKey:@"binary"] integerValue] == 1) [fieldString appendString:@" BINARY"]; + if ([[column objectForKey:@"null"] integerValue] == 0) [fieldString appendString:@" NOT NULL"]; + // Provide the field default if appropriate + if ([column objectForKey:@"default"]) { + + // Some MySQL server versions show a default of NULL for NOT NULL columns - don't export those + if ([column objectForKey:@"default"] == [NSNull null]) { + if ([[column objectForKey:@"null"] integerValue]) { + [fieldString appendString:@" DEFAULT NULL"]; + } + } + else if ([[column objectForKey:@"type"] isEqualToString:@"TIMESTAMP"] && [column objectForKey:@"default"] != [NSNull null] && [[[column objectForKey:@"default"] uppercaseString] isEqualToString:@"CURRENT_TIMESTAMP"]) { + [fieldString appendString:@" DEFAULT CURRENT_TIMESTAMP"]; + } + else { + [fieldString appendFormat:@" DEFAULT '%@'", [connection prepareString:[column objectForKey:@"default"]]]; + } + } + + // Extras aren't required for the temp table + // Add the field string to the syntax string + [placeholderSyntax appendFormat:@" %@%@\n", fieldString, (i == [viewColumns count] - 1) ? @"" : @","]; } + + // Append the remainder of the table string + [placeholderSyntax appendString:@") ENGINE=MyISAM;"]; + + // Clean up and return + [fieldString release]; + + return [placeholderSyntax autorelease]; +} + +/** + * Dealloc + */ +- (void)dealloc +{ + [sqlExportTables release], sqlExportTables = nil; + [sqlDatabaseHost release], sqlDatabaseHost = nil; + [sqlDatabaseName release], sqlDatabaseName = nil; + [sqlExportCurrentTable release], sqlExportCurrentTable = nil; + [sqlDatabaseVersion release], sqlDatabaseVersion = nil; + [sqlTableInformation release], sqlTableInformation = nil; + + [super dealloc]; } @end diff --git a/Source/SPSQLExporterDelegate.h b/Source/SPSQLExporterDelegate.h new file mode 100644 index 00000000..1a439cd2 --- /dev/null +++ b/Source/SPSQLExporterDelegate.h @@ -0,0 +1,38 @@ +// +// $Id$ +// +// SPSQLExporterDelegate.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 28, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportController.h" +#import "SPSQLExporterProtocol.h" + +/** + * @category SPSQLExporterDelegate SPSQLExporterDelegate.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * SQL exporter delegate category. + */ +@interface SPExportController (SPSQLExporterDelegate) <SPSQLExporterProtocol> + +@end diff --git a/Source/SPSQLExporterDelegate.m b/Source/SPSQLExporterDelegate.m new file mode 100644 index 00000000..b9afe724 --- /dev/null +++ b/Source/SPSQLExporterDelegate.m @@ -0,0 +1,105 @@ +// +// $Id$ +// +// SPSQLExporterDelegate.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on March 28, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPSQLExporterDelegate.h" +#import "SPSQLExporter.h" +#import "TableDocument.h" +#import "SPMainThreadTrampoline.h" + +@implementation SPExportController (SPSQLExporterDelegate) + +/** + * + */ +- (void)sqlExportProcessWillBegin:(SPSQLExporter *)exporter +{ + [[exportProgressTitle onMainThread] setStringValue:NSLocalizedString(@"Exporting SQL", @"text showing that the application is exporting SQL")]; + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")]; + + [[exportProgressTitle onMainThread] displayIfNeeded]; + [[exportProgressText onMainThread] displayIfNeeded]; +} + +/** + * + */ +- (void)sqlExportProcessComplete:(SPSQLExporter *)exporter +{ + [NSApp endSheet:exportProgressWindow returnCode:0]; + [exportProgressWindow orderOut:self]; + + [tableDocumentInstance setQueryMode:SPInterfaceQueryMode]; + + // Restore the connection encoding to it's pre-export value + [tableDocumentInstance setConnectionEncoding:[NSString stringWithFormat:@"%@%@", sqlPreviousConnectionEncoding, (sqlPreviousConnectionEncodingViaLatin1) ? @"-" : @""] reloadingViews:NO]; + + // Display Growl notification + [self displayExportFinishedGrowlNotification]; + + // Check for errors and display the errors sheet if necessary + if ([exporter didExportErrorsOccur]) { + [self openExportErrorsSheetWithString:[exporter sqlExportErrors]]; + } +} + +/** + * + */ +- (void)sqlExportProcessProgressUpdated:(SPSQLExporter *)exporter +{ + //NSLog(@"updating: %f", [exporter exportProgressValue]); + + [exportProgressIndicator setDoubleValue:[exporter exportProgressValue]]; +} + +/** + * + */ +- (void)sqlExportProcessWillBeginFetchingData:(SPSQLExporter *)exporter +{ + // Update the current table export index + currentTableExportIndex = (exportTableCount - [exporters count]); + + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter sqlExportCurrentTable]]]; + + [[exportProgressText onMainThread] displayIfNeeded]; + + [[exportProgressIndicator onMainThread] stopAnimation:self]; + [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO]; + [[exportProgressIndicator onMainThread] setIndeterminate:NO]; + [[exportProgressIndicator onMainThread] setDoubleValue:0]; +} + +/** + * + */ +- (void)sqlExportProcessWillBeginWritingData:(SPSQLExporter *)exporter +{ + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter sqlExportCurrentTable]]]; + + [[exportProgressText onMainThread] displayIfNeeded]; +} + +@end diff --git a/Source/SPSQLExporterProtocol.h b/Source/SPSQLExporterProtocol.h new file mode 100644 index 00000000..2998e1c9 --- /dev/null +++ b/Source/SPSQLExporterProtocol.h @@ -0,0 +1,72 @@ +// +// $Id$ +// +// SPSQLExporterProtocol.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 15, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +@class SPSQLExporter; + +/** + * @protocol SPSQLExporterProtocol SPSQLExporterProtocol.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * SQL exporter delegate protocol. + */ +@protocol SPSQLExporterProtocol + +/** + * Called when the SQL export process is about to begin. + * + * @param SPSQLExporter The expoter calling the method. + */ +- (void)sqlExportProcessWillBegin:(SPSQLExporter *)exporter; + +/** + * Called when the SQL export process is complete. + * + * @param SPSQLExporter The expoter calling the method. + */ +- (void)sqlExportProcessComplete:(SPSQLExporter *)exporter; + +/** + * alled when the progress of the SQL export process is updated. + * + * @param SPSQLExporter The expoter calling the method. + */ +- (void)sqlExportProcessProgressUpdated:(SPSQLExporter *)exporter; + +/** + * Called when the SQL export process is about to begin fetching data from the database. + * + * @param SPSQLExporter The expoter calling the method. + */ +- (void)sqlExportProcessWillBeginFetchingData:(SPSQLExporter *)exporter; + +/** + * Called when the SQL export process is about to begin writing data to disk. + * + * @param SPSQLExporter The expoter calling the method. + */ +- (void)sqlExportProcessWillBeginWritingData:(SPSQLExporter *)exporter; + +@end diff --git a/Source/SPStringAdditions.h b/Source/SPStringAdditions.h index 3f7c9066..1bcf158f 100644 --- a/Source/SPStringAdditions.h +++ b/Source/SPStringAdditions.h @@ -59,14 +59,15 @@ static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedS + (NSString *)stringForByteSize:(long long)byteSize; + (NSString *)stringForTimeInterval:(CGFloat)timeInterval; +- (NSString *)HTMLEscapeString; - (NSString *)backtickQuotedString; - (NSString *)tickQuotedString; - (NSString *)replaceUnderscoreWithSpace; - (NSArray *)lineRangesForRange:(NSRange)aRange; - (NSString *)createViewSyntaxPrettifier; -- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet*) charSet options:(NSUInteger) mask; -- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet*) charSet; +- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet*)charSet options:(NSUInteger)mask; +- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet*)charSet; - (CGFloat)levenshteinDistanceWithWord:(NSString *)stringB; diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index c36e55c1..de1fdf5e 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -82,12 +82,9 @@ return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:size]]; } - -// ------------------------------------------------------------------------------- -// stringForTimeInterval: -// -// Returns a human readable version string of the supplied time interval. -// ------------------------------------------------------------------------------- +/** + * Returns a human readable version string of the supplied time interval. + */ + (NSString *)stringForTimeInterval:(CGFloat)timeInterval { NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease]; @@ -145,42 +142,64 @@ return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:timeInterval]]; } +/** + * Escapes HTML special characters. + */ +- (NSString *)HTMLEscapeString +{ + NSMutableString *mutableString = [NSMutableString stringWithString:self]; + + [mutableString replaceOccurrencesOfString:@"&" withString:@"&" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + + [mutableString replaceOccurrencesOfString:@"<" withString:@"<" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + + [mutableString replaceOccurrencesOfString:@">" withString:@">" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + + [mutableString replaceOccurrencesOfString:@"\"" withString:@""" + options:NSLiteralSearch + range:NSMakeRange(0, [mutableString length])]; + + return [NSString stringWithString:mutableString]; +} -// ------------------------------------------------------------------------------- -// backtickQuotedString -// -// Returns the string quoted with backticks as required for MySQL identifiers -// eg.: tablename => `tablename` -// my`table => `my``table` -// ------------------------------------------------------------------------------- +/** + * Returns the string quoted with backticks as required for MySQL identifiers + * eg.: tablename => `tablename` + * my`table => `my``table` + */ - (NSString *)backtickQuotedString { return [NSString stringWithFormat: @"`%@`", [self stringByReplacingOccurrencesOfString:@"`" withString:@"``"]]; } -// ------------------------------------------------------------------------------- -// tickQuotedString -// -// Returns the string quoted with ticks as required for MySQL identifiers -// eg.: tablename => 'tablename' -// my'table => 'my''table' -// ------------------------------------------------------------------------------- +/** + * Returns the string quoted with ticks as required for MySQL identifiers + * eg.: tablename => 'tablename' + * my'table => 'my''table' + */ - (NSString *)tickQuotedString { return [NSString stringWithFormat: @"'%@'", [self stringByReplacingOccurrencesOfString:@"'" withString:@"''"]]; } +/** + * + */ - (NSString *)replaceUnderscoreWithSpace { return [self stringByReplacingOccurrencesOfString:@"_" withString:@" "]; } -// ------------------------------------------------------------------------------- -// createViewSyntaxPrettifier -// -// Returns a 'CREATE VIEW SYNTAX' string a bit more readable -// If the string doesn't match it returns the unchanged string. -// ------------------------------------------------------------------------------- +/** + * Returns a 'CREATE VIEW SYNTAX' string a bit more readable + * If the string doesn't match it returns the unchanged string. + */ - (NSString *)createViewSyntaxPrettifier { NSRange searchRange = NSMakeRange(0, [self length]); @@ -219,16 +238,13 @@ return(tblSyntax); } - -// ------------------------------------------------------------------------------- -// lineRangesForRange -// -// Returns an array of serialised NSRanges, each representing a line within the string -// which is at least partially covered by the NSRange supplied. -// Each line includes the line termination character(s) for the line. As per -// lineRangeForRange, lines are split by CR, LF, CRLF, U+2028 (Unicode line separator), -// or U+2029 (Unicode paragraph separator). -// ------------------------------------------------------------------------------- +/** + * Returns an array of serialised NSRanges, each representing a line within the string + * which is at least partially covered by the NSRange supplied. + * Each line includes the line termination character(s) for the line. As per + * lineRangeForRange, lines are split by CR, LF, CRLF, U+2028 (Unicode line separator), + * or U+2029 (Unicode paragraph separator). + */ - (NSArray *)lineRangesForRange:(NSRange)aRange { NSMutableArray *lineRangesArray = [NSMutableArray array]; @@ -252,7 +268,6 @@ return lineRangesArray; } - #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 /* * componentsSeparatedByCharactersInSet: @@ -286,8 +301,10 @@ } #endif - -- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet*) charSet options:(NSUInteger) mask +/** + * + */ +- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)charSet options:(NSUInteger)mask { NSRange range; NSMutableString* newString = [NSMutableString string]; @@ -316,13 +333,17 @@ return newString; } - -- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet*) charSet +/** + * + */ +- (NSString *)stringByRemovingCharactersInSet:(NSCharacterSet *)charSet { return [self stringByRemovingCharactersInSet:charSet options:0]; } -// calculate the distance between two string case-insensitively +/** + * Calculate the distance between two string case-insensitively + */ - (CGFloat)levenshteinDistanceWithWord:(NSString *)stringB { // normalize strings @@ -368,10 +389,13 @@ return distance; } + return 0.0; } -// return the minimum of a, b and c +/** + * Returns the minimum of a, b and c + */ - (NSInteger)smallestOf:(NSInteger)a andOf:(NSInteger)b andOf:(NSInteger)c { NSInteger min = a; diff --git a/Source/SPXMLExporter.h b/Source/SPXMLExporter.h index dba81cba..a9e6c2dd 100644 --- a/Source/SPXMLExporter.h +++ b/Source/SPXMLExporter.h @@ -26,7 +26,45 @@ #import <Cocoa/Cocoa.h> #import "SPExporter.h" +#import "SPXMLExporterProtocol.h" +/** + * @class SPXMLExporter SPXMLExporter.m + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * XML exporter class. + */ @interface SPXMLExporter : SPExporter +{ + /** + * Exporter delegate + */ + NSObject <SPXMLExporterProtocol> *delegate; + + /** + * Data array + */ + NSArray *xmlDataArray; + + /** + * Table name + */ + NSString *xmlTableName; +} + +@property(readwrite, assign) NSObject *delegate; + +@property(readwrite, retain) NSArray *xmlDataArray; +@property(readwrite, retain) NSString *xmlTableName; + +/** + * Initialise an instance of SPXMLExporter using the supplied delegate. + * + * @param exportDelegate The exporter delegate + * + * @return The initialised instance + */ +- (id)initWithDelegate:(NSObject *)exportDelegate; @end diff --git a/Source/SPXMLExporter.m b/Source/SPXMLExporter.m index dabfe263..94cfec05 100644 --- a/Source/SPXMLExporter.m +++ b/Source/SPXMLExporter.m @@ -23,26 +23,236 @@ // // More info at <http://code.google.com/p/sequel-pro/> +#import <MCPKit/MCPKit.h> + #import "SPXMLExporter.h" +#import "SPArrayAdditions.h" +#import "SPStringAdditions.h" +#import "SPFileHandle.h" +#import "SPConstants.h" +#import "SPExportUtilities.h" @implementation SPXMLExporter +@synthesize delegate; +@synthesize xmlDataArray; +@synthesize xmlTableName; + +/** + * Initialise an instance of SPXMLExporter using the supplied delegate. + */ +- (id)initWithDelegate:(NSObject *)exportDelegate +{ + if ((self = [super init])) { + SPExportDelegateConformsToProtocol(exportDelegate, @protocol(SPXMLExporterProtocol)); + + [self setDelegate:exportDelegate]; + } + + return self; +} + /** - * Start the SQL data conversion process. This method is automatically called when an instance of this object + * Start the XML export process. This method is automatically called when an instance of this class * is placed on an NSOperationQueue. Do not call it directly as there is no manual multithreading. */ - (void)main { @try { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSAutoreleasePool *xmlExportPool = [[NSAutoreleasePool alloc] init]; + NSArray *xmlRow = nil; + NSString *dataConversionString = nil; + MCPStreamingResult *streamingResult = nil; + NSMutableArray *xmlTags = [NSMutableArray array]; + NSMutableString *xmlString = [NSMutableString string]; + NSMutableString *xmlItem = [NSMutableString string]; - [pool release]; - } - @catch (NSException *e) { + NSUInteger xmlRowCount = 0; + NSUInteger i, totalRows, currentRowIndex, lastProgressValue, currentPoolDataLength; + + // Check to see if we have at least a table name or data array + if ((![self xmlTableName]) && (![self xmlDataArray]) || + ([[self xmlTableName] isEqualToString:@""]) && ([[self xmlDataArray] count] == 0)) + { + [pool release]; + return; + } + + // Inform the delegate that the export process is about to begin + [delegate performSelectorOnMainThread:@selector(xmlExportProcessWillBegin:) withObject:self waitUntilDone:NO]; + + // Mark the process as running + [self setExportProcessIsRunning:YES]; + + lastProgressValue = 0; + + // Make a streaming request for the data if the data array isn't set + if ((![self xmlDataArray]) && [self xmlTableName]) { + totalRows = [[[[connection queryString:[NSString stringWithFormat:@"SELECT COUNT(1) FROM %@", [[self xmlTableName] backtickQuotedString]]] fetchRowAsArray] objectAtIndex:0] integerValue]; + streamingResult = [connection streamingQueryString:[NSString stringWithFormat:@"SELECT * FROM %@", [[self xmlTableName] backtickQuotedString]] useLowMemoryBlockingStreaming:[self exportUsingLowMemoryBlockingStreaming]]; + } + else { + totalRows = [[self xmlDataArray] count]; + } + + // Set up an array of encoded field names as opening and closing tags + xmlRow = ([self xmlDataArray]) ? [[self xmlDataArray] objectAtIndex:0] : [streamingResult fetchFieldNames]; + + for (i = 0; i < [xmlRow count]; i++) + { + [xmlTags addObject:[NSMutableArray array]]; + + [[xmlTags objectAtIndex:i] addObject:[NSString stringWithFormat:@"\t\t<%@>", [[[xmlRow objectAtIndex:i] description] HTMLEscapeString]]]; + [[xmlTags objectAtIndex:i] addObject:[NSString stringWithFormat:@"</%@>\n", [[[xmlRow objectAtIndex:i] description] HTMLEscapeString]]]; + } + [[self exportOutputFileHandle] writeData:[xmlString dataUsingEncoding:[self exportOutputEncoding]]]; + + // Write an opening tag in the form of the table name + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"\t<%@>\n", ([self xmlTableName]) ? [[self xmlTableName] HTMLEscapeString] : @"custom"] dataUsingEncoding:[self exportOutputEncoding]]]; + + // Set up the starting row, which is 0 for streaming result sets and + // 1 for supplied arrays which include the column headers as the first row. + currentRowIndex = 0; + + if ([self xmlDataArray]) currentRowIndex++; + + // Drop into the processing loop + xmlExportPool = [[NSAutoreleasePool alloc] init]; + + currentPoolDataLength = 0; + + while (1) + { + // Check for cancellation flag + if ([self isCancelled]) { + if (streamingResult) { + [connection cancelCurrentQuery]; + [streamingResult cancelResultLoad]; + } + + [xmlExportPool release]; + [pool release]; + + return; + } + + // Retrieve the next row from the supplied data, either directly from the array... + if ([self xmlDataArray]) { + xmlRow = NSArrayObjectAtIndex([self xmlDataArray], currentRowIndex); + } + // Or by reading an appropriate row from the streaming result + else { + xmlRow = [streamingResult fetchNextRowAsArray]; + + if (!xmlRow) break; + } + + // Get the cell count if we don't already have it stored + if (!xmlRowCount) xmlRowCount = [xmlRow count]; + + // Construct the row + [xmlString setString:@"\t<row>\n"]; + + for (i = 0; i < xmlRowCount; i++) + { + // Check for cancellation flag + if ([self isCancelled]) { + if (streamingResult) { + [connection cancelCurrentQuery]; + [streamingResult cancelResultLoad]; + } + + [xmlExportPool release]; + [pool release]; + + return; + } + + // Retrieve the contents of this tag + if ([NSArrayObjectAtIndex(xmlRow, i) isKindOfClass:[NSData class]]) { + dataConversionString = [[NSString alloc] initWithData:NSArrayObjectAtIndex(xmlRow, i) encoding:[self exportOutputEncoding]]; + + if (dataConversionString == nil) { + dataConversionString = [[NSString alloc] initWithData:NSArrayObjectAtIndex(xmlRow, i) encoding:NSASCIIStringEncoding]; + } + + [xmlItem setString:[NSString stringWithString:dataConversionString]]; + [dataConversionString release]; + } + else { + [xmlItem setString:[NSArrayObjectAtIndex(xmlRow, i) description]]; + } + + // Add the opening and closing tag and the contents to the XML string + [xmlString appendString:NSArrayObjectAtIndex(NSArrayObjectAtIndex(xmlTags, i), 0)]; + [xmlString appendString:[xmlItem HTMLEscapeString]]; + [xmlString appendString:NSArrayObjectAtIndex(NSArrayObjectAtIndex(xmlTags, i), 1)]; + } + + [xmlString appendString:@"\t</row>\n"]; + + // Record the total length for use with pool flushing + currentPoolDataLength += [xmlString length]; + + // Write the row to the filehandle + [[self exportOutputFileHandle] writeData:[xmlString dataUsingEncoding:[self exportOutputEncoding]]]; + + // Update the progress counter and progress bar + currentRowIndex++; + + // Update the progress + if (totalRows && (currentRowIndex * ([self exportMaxProgress] / totalRows)) > lastProgressValue) { + + NSInteger progress = (currentRowIndex * ([self exportMaxProgress] / totalRows)); + + [self setExportProgressValue:progress]; + + lastProgressValue = progress; + } + + // Inform the delegate that the export's progress has been updated + [delegate performSelectorOnMainThread:@selector(xmlExportProcessProgressUpdated:) withObject:self waitUntilDone:NO]; + + // If an array was supplied and we've processed all rows, break + if ([self xmlDataArray] && totalRows == currentRowIndex) break; + + // Drain the autorelease pool as required to keep memory usage low + if (currentPoolDataLength > 250000) { + [xmlExportPool release]; + xmlExportPool = [[NSAutoreleasePool alloc] init]; + } + } + + // Write the closing tag for the table + [[self exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"\t</%@>\n\n", ([self xmlTableName]) ? [[self xmlTableName] HTMLEscapeString] : @"custom"] dataUsingEncoding:[self exportOutputEncoding]]]; + + // Write data to disk + [[self exportOutputFileHandle] synchronizeFile]; + + // Mark the process as not running + [self setExportProcessIsRunning:NO]; + + // Inform the delegate that the export process is complete + [delegate performSelectorOnMainThread:@selector(xmlExportProcessComplete:) withObject:self waitUntilDone:NO]; + + [pool release]; } + @catch (NSException *e) { } +} + +/** + * Dealloc + */ +- (void)dealloc +{ + if (xmlDataArray) [xmlDataArray release], xmlDataArray = nil; + if (xmlTableName) [xmlTableName release], xmlTableName = nil; + + [super dealloc]; } @end diff --git a/Source/SPXMLExporterDelegate.h b/Source/SPXMLExporterDelegate.h new file mode 100644 index 00000000..720a8c9b --- /dev/null +++ b/Source/SPXMLExporterDelegate.h @@ -0,0 +1,38 @@ +// +// $Id$ +// +// SPXMLExporterDelegate.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 6, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPExportController.h" +#import "SPXMLExporterProtocol.h" + +/** + * @category SPXMLExporterDelegate SPXMLExporterDelegate.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * XML exporter delegate category. + */ +@interface SPExportController (SPXMLExporterDelegate) <SPXMLExporterProtocol> + +@end diff --git a/Source/SPXMLExporterDelegate.m b/Source/SPXMLExporterDelegate.m new file mode 100644 index 00000000..b8edaaf9 --- /dev/null +++ b/Source/SPXMLExporterDelegate.m @@ -0,0 +1,133 @@ +// +// $Id$ +// +// SPXMLExporterDelegate.m +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 6, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import "SPXMLExporterDelegate.h" +#import "SPXMLExporter.h" +#import "SPMainThreadTrampoline.h" +#import "TableDocument.h" +#import "SPFileHandle.h" +#import "SPStringAdditions.h" + +@implementation SPExportController (SPXMLExporterDelegate) + +/** + * + */ +- (void)xmlExportProcessWillBegin:(SPXMLExporter *)exporter +{ + [[exportProgressText onMainThread] displayIfNeeded]; + + [[exportProgressIndicator onMainThread] setIndeterminate:YES]; + [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:YES]; + [[exportProgressIndicator onMainThread] startAnimation:self]; + + // Only update the progress text if this is a table export + if (exportSource == SPTableExport) { + // Update the current table export index + currentTableExportIndex = (exportTableCount - [exporters count]); + + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Fetching data...", @"export label showing that the app is fetching data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]]; + } + else { + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Fetching data...", @"export label showing that the app is fetching data")]; + } + + [[exportProgressText onMainThread] displayIfNeeded]; +} + +/** + * + */ +- (void)xmlExportProcessComplete:(SPXMLExporter *)exporter +{ + NSUInteger exportCount = [exporters count]; + + // If required add the next exporter to the operation queue + if ((exportCount > 0) && (exportSource == SPTableExport)) { + + // If we're exporting to multiple files then close the file handle of the exporter + // that just finished, ensuring its data is written to disk. + if (exportToMultipleFiles) { + [[exporter exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"</%@>\n", [[tableDocumentInstance database] HTMLEscapeString]] dataUsingEncoding:[connection encoding]]]; + + [[exporter exportOutputFileHandle] closeFile]; + } + + [operationQueue addOperation:[exporters objectAtIndex:0]]; + + // Remove the exporter we just added to the operation queue from our list of exporters + // so we know it's already been done. + [exporters removeObjectAtIndex:0]; + } + // Otherwise if the exporter list is empty, close the progress sheet + else { + if (exportSource == SPTableExport) { + [[exporter exportOutputFileHandle] writeData:[[NSString stringWithFormat:@"</%@>\n", [[tableDocumentInstance database] HTMLEscapeString]] dataUsingEncoding:[connection encoding]]]; + } + + // Close the last exporter's file handle + [[exporter exportOutputFileHandle] closeFile]; + + [NSApp endSheet:exportProgressWindow returnCode:0]; + [exportProgressWindow orderOut:self]; + + // Restore query mode + [tableDocumentInstance setQueryMode:SPInterfaceQueryMode]; + + // Display Growl notification + [self displayExportFinishedGrowlNotification]; + } +} + +/** + * + */ +- (void)xmlExportProcessProgressUpdated:(SPXMLExporter *)exporter +{ + // Only update the progress text if this is a table export + if (exportSource == SPTableExport) { + [[exportProgressText onMainThread] setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Table %lu of %lu (%@): Writing data...", @"export label showing app if writing data for a specific table"), currentTableExportIndex, exportTableCount, [exporter xmlTableName]]]; + } + else { + [[exportProgressText onMainThread] setStringValue:NSLocalizedString(@"Writing data...", @"export label showing app is writing data")]; + } + + [[exportProgressText onMainThread] displayIfNeeded]; + + [[exportProgressIndicator onMainThread] stopAnimation:self]; + [[exportProgressIndicator onMainThread] setUsesThreadedAnimation:NO]; + [[exportProgressIndicator onMainThread] setIndeterminate:NO]; + [[exportProgressIndicator onMainThread] setDoubleValue:0]; +} + +/** + * + */ +- (void)xmlExportProcessWillBeginWritingData:(SPXMLExporter *)exporter +{ + [exportProgressIndicator setDoubleValue:[exporter exportProgressValue]]; +} + +@end diff --git a/Source/SPXMLExporterProtocol.h b/Source/SPXMLExporterProtocol.h new file mode 100644 index 00000000..cac692c7 --- /dev/null +++ b/Source/SPXMLExporterProtocol.h @@ -0,0 +1,65 @@ +// +// $Id$ +// +// SPXMLExporterProtocol.h +// sequel-pro +// +// Created by Stuart Connolly (stuconnolly.com) on April 15, 2010 +// Copyright (c) 2010 Stuart Connolly. All rights reserved. +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +@class SPXMLExporter; + +/** + * @protocol SPXMLExporterProtocol SPXMLExporterProtocol.h + * + * @author Stuart Connolly http://stuconnolly.com/ + * + * SQL exporter delegate protocol. + */ +@protocol SPXMLExporterProtocol + +/** + * Called when the XML export process is about to begin. + * + * @param SPXMLExporter The expoter calling the method. + */ +- (void)xmlExportProcessWillBegin:(SPXMLExporter *)exporter; + +/** + * Called when the XML export process is complete. + * + * @param SPXMLExporter The expoter calling the method. + */ +- (void)xmlExportProcessComplete:(SPXMLExporter *)exporter; + +/** + * Called when the progress of the XML export process is updated. + * + * @param SPXMLExporter The expoter calling the method. + */ +- (void)xmlExportProcessProgressUpdated:(SPXMLExporter *)exporter; + +/** + * Called when the XML export process is about to begin writing data to disk. + * + * @param SPXMLExporter The expoter calling the method. + */ +- (void)xmlExportProcessWillBeginWritingData:(SPXMLExporter *)exporter; + +@end diff --git a/Source/TableDocument.h b/Source/TableDocument.h index b8478f98..5b6697a6 100644 --- a/Source/TableDocument.h +++ b/Source/TableDocument.h @@ -256,6 +256,7 @@ - (IBAction)copyCreateTableSyntaxFromSheet:(id)sender; - (IBAction)focusOnTableContentFilter:(id)sender; - (IBAction)focusOnTableListFilter:(id)sender; +- (IBAction)exportSelectedTablesAs:(id)sender; // Other methods - (void) setQueryMode:(NSInteger)theQueryMode; diff --git a/Source/TableDocument.m b/Source/TableDocument.m index d0637eed..ce87a1ef 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -2283,6 +2283,14 @@ [tablesListInstance performSelector:@selector(makeTableListFilterHaveFocus) withObject:nil afterDelay:0.1]; } +/** + * Exports the selected tables in the chosen file format. + */ +- (IBAction)exportSelectedTablesAs:(id)sender +{ + [exportControllerInstance exportTables:[tablesListInstance selectedTableItems] asFormat:[sender tag]]; +} + #pragma mark - #pragma mark Other Methods @@ -3159,9 +3167,18 @@ return YES; } } + + // Data export + if ([menuItem action] == @selector(export:)) { + return (([self database] != nil) && ([[tablesListInstance tables] count] > 1)); + } + + // Selected tables data export + if ([menuItem action] == @selector(exportSelectedTablesAs:)) { + return (([self database] != nil) && ([[[tablesListInstance valueForKeyPath:@"tablesListView"] selectedRowIndexes] count])); + } if ([menuItem action] == @selector(import:) || - [menuItem action] == @selector(export:) || [menuItem action] == @selector(exportMultipleTables:) || [menuItem action] == @selector(removeDatabase:) || [menuItem action] == @selector(copyDatabase:) || diff --git a/sequel-pro.xcodeproj/project.pbxproj b/sequel-pro.xcodeproj/project.pbxproj index 760426ec..38f241fb 100644 --- a/sequel-pro.xcodeproj/project.pbxproj +++ b/sequel-pro.xcodeproj/project.pbxproj @@ -28,6 +28,17 @@ 173C4362104455CA001F3A30 /* QueryFavoriteManager.xib in Resources */ = {isa = PBXBuildFile; fileRef = 173C4360104455CA001F3A30 /* QueryFavoriteManager.xib */; }; 173C4366104455E0001F3A30 /* SPQueryFavoriteManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C4365104455E0001F3A30 /* SPQueryFavoriteManager.m */; }; 173C44D81044A6B0001F3A30 /* SPOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C44D71044A6B0001F3A30 /* SPOutlineView.m */; }; + 173C837111AAD26E00B8B084 /* SPExportInitializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C836E11AAD26E00B8B084 /* SPExportInitializer.m */; }; + 173C837211AAD26E00B8B084 /* SPExportUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C837011AAD26E00B8B084 /* SPExportUtilities.m */; }; + 173C837911AAD2AE00B8B084 /* SPDotExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C837411AAD2AE00B8B084 /* SPDotExporter.m */; }; + 173C837A11AAD2AE00B8B084 /* SPHTMLExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C837611AAD2AE00B8B084 /* SPHTMLExporter.m */; }; + 173C837B11AAD2AE00B8B084 /* SPPDFExporter.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C837811AAD2AE00B8B084 /* SPPDFExporter.m */; }; + 173C839011AAD32A00B8B084 /* SPCSVExporterDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C838511AAD32A00B8B084 /* SPCSVExporterDelegate.m */; }; + 173C839111AAD32A00B8B084 /* SPDotExporterDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C838711AAD32A00B8B084 /* SPDotExporterDelegate.m */; }; + 173C839211AAD32A00B8B084 /* SPHTMLExporterDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C838911AAD32A00B8B084 /* SPHTMLExporterDelegate.m */; }; + 173C839311AAD32A00B8B084 /* SPPDFExporterDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C838B11AAD32A00B8B084 /* SPPDFExporterDelegate.m */; }; + 173C839411AAD32A00B8B084 /* SPSQLExporterDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C838D11AAD32A00B8B084 /* SPSQLExporterDelegate.m */; }; + 173C839511AAD32A00B8B084 /* SPXMLExporterDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 173C838F11AAD32A00B8B084 /* SPXMLExporterDelegate.m */; }; 1740FABB0FC4372F00CF3699 /* SPDatabaseData.m in Sources */ = {isa = PBXBuildFile; fileRef = 1740FABA0FC4372F00CF3699 /* SPDatabaseData.m */; }; 174CE11E10AB80B5008F892B /* DatabaseProcessList.xib in Resources */ = {isa = PBXBuildFile; fileRef = 174CE11C10AB80B5008F892B /* DatabaseProcessList.xib */; }; 174CE14210AB9281008F892B /* SPProcessListController.m in Sources */ = {isa = PBXBuildFile; fileRef = 174CE14110AB9281008F892B /* SPProcessListController.m */; }; @@ -363,6 +374,34 @@ 173C4365104455E0001F3A30 /* SPQueryFavoriteManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPQueryFavoriteManager.m; sourceTree = "<group>"; }; 173C44D61044A6AF001F3A30 /* SPOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPOutlineView.h; sourceTree = "<group>"; }; 173C44D71044A6B0001F3A30 /* SPOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPOutlineView.m; sourceTree = "<group>"; }; + 173C836D11AAD26E00B8B084 /* SPExportInitializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportInitializer.h; sourceTree = "<group>"; }; + 173C836E11AAD26E00B8B084 /* SPExportInitializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportInitializer.m; sourceTree = "<group>"; }; + 173C836F11AAD26E00B8B084 /* SPExportUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPExportUtilities.h; sourceTree = "<group>"; }; + 173C837011AAD26E00B8B084 /* SPExportUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPExportUtilities.m; sourceTree = "<group>"; }; + 173C837311AAD2AE00B8B084 /* SPDotExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDotExporter.h; sourceTree = "<group>"; }; + 173C837411AAD2AE00B8B084 /* SPDotExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDotExporter.m; sourceTree = "<group>"; }; + 173C837511AAD2AE00B8B084 /* SPHTMLExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPHTMLExporter.h; sourceTree = "<group>"; }; + 173C837611AAD2AE00B8B084 /* SPHTMLExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPHTMLExporter.m; sourceTree = "<group>"; }; + 173C837711AAD2AE00B8B084 /* SPPDFExporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPDFExporter.h; sourceTree = "<group>"; }; + 173C837811AAD2AE00B8B084 /* SPPDFExporter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPPDFExporter.m; sourceTree = "<group>"; }; + 173C837E11AAD2FF00B8B084 /* SPCSVExporterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPCSVExporterProtocol.h; sourceTree = "<group>"; }; + 173C837F11AAD2FF00B8B084 /* SPDotExporterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDotExporterProtocol.h; sourceTree = "<group>"; }; + 173C838011AAD2FF00B8B084 /* SPHTMLExporterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPHTMLExporterProtocol.h; sourceTree = "<group>"; }; + 173C838111AAD2FF00B8B084 /* SPPDFExporterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPDFExporterProtocol.h; sourceTree = "<group>"; }; + 173C838211AAD2FF00B8B084 /* SPSQLExporterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPSQLExporterProtocol.h; sourceTree = "<group>"; }; + 173C838311AAD2FF00B8B084 /* SPXMLExporterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPXMLExporterProtocol.h; sourceTree = "<group>"; }; + 173C838411AAD32A00B8B084 /* SPCSVExporterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPCSVExporterDelegate.h; sourceTree = "<group>"; }; + 173C838511AAD32A00B8B084 /* SPCSVExporterDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPCSVExporterDelegate.m; sourceTree = "<group>"; }; + 173C838611AAD32A00B8B084 /* SPDotExporterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDotExporterDelegate.h; sourceTree = "<group>"; }; + 173C838711AAD32A00B8B084 /* SPDotExporterDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDotExporterDelegate.m; sourceTree = "<group>"; }; + 173C838811AAD32A00B8B084 /* SPHTMLExporterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPHTMLExporterDelegate.h; sourceTree = "<group>"; }; + 173C838911AAD32A00B8B084 /* SPHTMLExporterDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPHTMLExporterDelegate.m; sourceTree = "<group>"; }; + 173C838A11AAD32A00B8B084 /* SPPDFExporterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPPDFExporterDelegate.h; sourceTree = "<group>"; }; + 173C838B11AAD32A00B8B084 /* SPPDFExporterDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPPDFExporterDelegate.m; sourceTree = "<group>"; }; + 173C838C11AAD32A00B8B084 /* SPSQLExporterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPSQLExporterDelegate.h; sourceTree = "<group>"; }; + 173C838D11AAD32A00B8B084 /* SPSQLExporterDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPSQLExporterDelegate.m; sourceTree = "<group>"; }; + 173C838E11AAD32A00B8B084 /* SPXMLExporterDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPXMLExporterDelegate.h; sourceTree = "<group>"; }; + 173C838F11AAD32A00B8B084 /* SPXMLExporterDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPXMLExporterDelegate.m; sourceTree = "<group>"; }; 1740FAB90FC4372F00CF3699 /* SPDatabaseData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SPDatabaseData.h; sourceTree = "<group>"; }; 1740FABA0FC4372F00CF3699 /* SPDatabaseData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SPDatabaseData.m; sourceTree = "<group>"; }; 174CE11D10AB80B5008F892B /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Interfaces/English.lproj/DatabaseProcessList.xib; sourceTree = "<group>"; }; @@ -896,6 +935,59 @@ name = Data; sourceTree = "<group>"; }; + 173C836C11AAD24300B8B084 /* Exporters */ = { + isa = PBXGroup; + children = ( + 17F5B1521048C50D00FC794F /* SPExporter.h */, + 17F5B1531048C50D00FC794F /* SPExporter.m */, + 17F5B14F1048C4E400FC794F /* SPCSVExporter.h */, + 17F5B1501048C4E400FC794F /* SPCSVExporter.m */, + 17F5B39A1049B96A00FC794F /* SPSQLExporter.h */, + 17F5B39B1049B96A00FC794F /* SPSQLExporter.m */, + 17292441107AC41000B21980 /* SPXMLExporter.h */, + 17292442107AC41000B21980 /* SPXMLExporter.m */, + 173C837311AAD2AE00B8B084 /* SPDotExporter.h */, + 173C837411AAD2AE00B8B084 /* SPDotExporter.m */, + 173C837711AAD2AE00B8B084 /* SPPDFExporter.h */, + 173C837811AAD2AE00B8B084 /* SPPDFExporter.m */, + 173C837511AAD2AE00B8B084 /* SPHTMLExporter.h */, + 173C837611AAD2AE00B8B084 /* SPHTMLExporter.m */, + ); + name = Exporters; + sourceTree = "<group>"; + }; + 173C837C11AAD2C500B8B084 /* Delegate Protocols */ = { + isa = PBXGroup; + children = ( + 173C837E11AAD2FF00B8B084 /* SPCSVExporterProtocol.h */, + 173C838211AAD2FF00B8B084 /* SPSQLExporterProtocol.h */, + 173C838311AAD2FF00B8B084 /* SPXMLExporterProtocol.h */, + 173C837F11AAD2FF00B8B084 /* SPDotExporterProtocol.h */, + 173C838111AAD2FF00B8B084 /* SPPDFExporterProtocol.h */, + 173C838011AAD2FF00B8B084 /* SPHTMLExporterProtocol.h */, + ); + name = "Delegate Protocols"; + sourceTree = "<group>"; + }; + 173C837D11AAD2D300B8B084 /* Delegate Categories */ = { + isa = PBXGroup; + children = ( + 173C838411AAD32A00B8B084 /* SPCSVExporterDelegate.h */, + 173C838511AAD32A00B8B084 /* SPCSVExporterDelegate.m */, + 173C838C11AAD32A00B8B084 /* SPSQLExporterDelegate.h */, + 173C838D11AAD32A00B8B084 /* SPSQLExporterDelegate.m */, + 173C838E11AAD32A00B8B084 /* SPXMLExporterDelegate.h */, + 173C838F11AAD32A00B8B084 /* SPXMLExporterDelegate.m */, + 173C838611AAD32A00B8B084 /* SPDotExporterDelegate.h */, + 173C838711AAD32A00B8B084 /* SPDotExporterDelegate.m */, + 173C838A11AAD32A00B8B084 /* SPPDFExporterDelegate.h */, + 173C838B11AAD32A00B8B084 /* SPPDFExporterDelegate.m */, + 173C838811AAD32A00B8B084 /* SPHTMLExporterDelegate.h */, + 173C838911AAD32A00B8B084 /* SPHTMLExporterDelegate.m */, + ); + name = "Delegate Categories"; + sourceTree = "<group>"; + }; 173E70A1107FF495008733C9 /* Core Data */ = { isa = PBXGroup; children = ( @@ -1279,8 +1371,8 @@ 17E6416E0EF01F3B001BC333 /* Other */ = { isa = PBXGroup; children = ( - 1198F5B01174EDA700670590 /* DatabaseActions */, 296DC8A40F90914B002A3258 /* MGTemplateEngine */, + 1198F5B01174EDA700670590 /* DatabaseActions */, 17128B890FE6DFFA0035DD75 /* QuickLook */, 583CE39511722B70008F148E /* Compression */, 173284E51088FEC20062E892 /* Data */, @@ -1456,16 +1548,15 @@ 17F5B1491048C4C000FC794F /* Data Export */ = { isa = PBXGroup; children = ( - 17F5B1521048C50D00FC794F /* SPExporter.h */, - 17F5B1531048C50D00FC794F /* SPExporter.m */, - 17F5B14F1048C4E400FC794F /* SPCSVExporter.h */, - 17F5B1501048C4E400FC794F /* SPCSVExporter.m */, - 17F5B39A1049B96A00FC794F /* SPSQLExporter.h */, - 17F5B39B1049B96A00FC794F /* SPSQLExporter.m */, - 17292441107AC41000B21980 /* SPXMLExporter.h */, - 17292442107AC41000B21980 /* SPXMLExporter.m */, B5E92F1A0F75B2E800012500 /* SPExportController.h */, B5E92F1B0F75B2E800012500 /* SPExportController.m */, + 173C836D11AAD26E00B8B084 /* SPExportInitializer.h */, + 173C836E11AAD26E00B8B084 /* SPExportInitializer.m */, + 173C836F11AAD26E00B8B084 /* SPExportUtilities.h */, + 173C837011AAD26E00B8B084 /* SPExportUtilities.m */, + 173C836C11AAD24300B8B084 /* Exporters */, + 173C837C11AAD2C500B8B084 /* Delegate Protocols */, + 173C837D11AAD2D300B8B084 /* Delegate Categories */, ); name = "Data Export"; sourceTree = "<group>"; @@ -2025,6 +2116,17 @@ 11B55BFE1189E3B2009EF465 /* SPDBActionCommons.m in Sources */, 58A8A79111A036C000B95749 /* SPWindowController.m in Sources */, 5806B76411A991EC00813A88 /* SPDocumentController.m in Sources */, + 173C837111AAD26E00B8B084 /* SPExportInitializer.m in Sources */, + 173C837211AAD26E00B8B084 /* SPExportUtilities.m in Sources */, + 173C837911AAD2AE00B8B084 /* SPDotExporter.m in Sources */, + 173C837A11AAD2AE00B8B084 /* SPHTMLExporter.m in Sources */, + 173C837B11AAD2AE00B8B084 /* SPPDFExporter.m in Sources */, + 173C839011AAD32A00B8B084 /* SPCSVExporterDelegate.m in Sources */, + 173C839111AAD32A00B8B084 /* SPDotExporterDelegate.m in Sources */, + 173C839211AAD32A00B8B084 /* SPHTMLExporterDelegate.m in Sources */, + 173C839311AAD32A00B8B084 /* SPPDFExporterDelegate.m in Sources */, + 173C839411AAD32A00B8B084 /* SPSQLExporterDelegate.m in Sources */, + 173C839511AAD32A00B8B084 /* SPXMLExporterDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; |