aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMCopyTable.h92
-rw-r--r--CMCopyTable.m183
-rw-r--r--CMImageView.h36
-rw-r--r--CMImageView.m48
-rw-r--r--CMMCPConnection.h37
-rw-r--r--CMMCPConnection.m221
-rw-r--r--CMMCPResult.h33
-rw-r--r--CMMCPResult.m153
-rw-r--r--CMTextView.h32
-rw-r--r--CMTextView.m296
-rwxr-xr-xCocoaMySQL.scriptSuite37
-rwxr-xr-xCocoaMySQL.scriptTerminology31
-rw-r--r--CocoaMySQL.xcodeproj/abhi.mode1v31418
-rw-r--r--CocoaMySQL.xcodeproj/abhi.pbxuser1114
-rw-r--r--CocoaMySQL.xcodeproj/ide.pbxuser222
-rw-r--r--CocoaMySQL.xcodeproj/ltextor.mode11332
-rw-r--r--CocoaMySQL.xcodeproj/ltextor.pbxuser1005
-rw-r--r--CocoaMySQL.xcodeproj/project.pbxproj764
-rw-r--r--CustomQuery.h105
-rw-r--r--CustomQuery.m755
-rw-r--r--English.lproj/Credits.rtf34
-rw-r--r--English.lproj/DBView.nib/classes.nib586
-rw-r--r--English.lproj/DBView.nib/info.nib20
-rw-r--r--English.lproj/DBView.nib/keyedobjects.nibbin0 -> 169967 bytes
-rw-r--r--English.lproj/DBView~.nib/classes.nib288
-rw-r--r--English.lproj/DBView~.nib/info.nib27
-rw-r--r--English.lproj/DBView~.nib/keyedobjects.nibbin0 -> 157338 bytes
-rw-r--r--English.lproj/DBView~.nib/objects.nibbin0 -> 72559 bytes
-rw-r--r--English.lproj/InfoPlist.stringsbin0 -> 522 bytes
-rw-r--r--English.lproj/Localizable.stringsbin0 -> 32914 bytes
-rw-r--r--English.lproj/MainMenu.nib/JavaCompiling.plist8
-rw-r--r--English.lproj/MainMenu.nib/_MainMenu_EOArchive_English.java736
-rw-r--r--English.lproj/MainMenu.nib/classes.nib134
-rw-r--r--English.lproj/MainMenu.nib/info.nib20
-rw-r--r--English.lproj/MainMenu.nib/keyedobjects.nibbin0 -> 50405 bytes
-rw-r--r--English.lproj/MainMenu~.nib/JavaCompiling.plist8
-rw-r--r--English.lproj/MainMenu~.nib/_MainMenu_EOArchive_English.java728
-rw-r--r--English.lproj/MainMenu~.nib/classes.nib67
-rw-r--r--English.lproj/MainMenu~.nib/info.nib17
-rw-r--r--English.lproj/MainMenu~.nib/keyedobjects.nibbin0 -> 45226 bytes
-rw-r--r--English.lproj/MainMenu~.nib/objects.nibbin0 -> 21008 bytes
-rw-r--r--English.lproj/english_help/bar.gifbin0 -> 184 bytes
-rw-r--r--English.lproj/english_help/cocoamysql_logo.jpgbin0 -> 1678 bytes
-rw-r--r--English.lproj/english_help/english_help idxbin0 -> 6144 bytes
-rw-r--r--English.lproj/english_help/icon.gifbin0 -> 1036 bytes
-rwxr-xr-xEnglish.lproj/english_help/index.html101
-rw-r--r--English.lproj/english_help/topics/bar.gifbin0 -> 184 bytes
-rw-r--r--English.lproj/english_help/topics/cocoamysql_logo.jpgbin0 -> 1678 bytes
-rwxr-xr-xEnglish.lproj/english_help/topics/connect.html59
-rw-r--r--English.lproj/english_help/topics/connect.jpgbin0 -> 6812 bytes
-rwxr-xr-xEnglish.lproj/english_help/topics/console.html48
-rwxr-xr-xEnglish.lproj/english_help/topics/data.html92
-rwxr-xr-xEnglish.lproj/english_help/topics/dump.html93
-rwxr-xr-xEnglish.lproj/english_help/topics/encoding.html73
-rwxr-xr-xEnglish.lproj/english_help/topics/preferences.html58
-rw-r--r--English.lproj/english_help/topics/preferences.jpgbin0 -> 8025 bytes
-rwxr-xr-xEnglish.lproj/english_help/topics/query.html58
-rwxr-xr-xEnglish.lproj/english_help/topics/reference.html212
-rwxr-xr-xEnglish.lproj/english_help/topics/sample_query.html81
-rwxr-xr-xEnglish.lproj/english_help/topics/sample_tables.html374
-rwxr-xr-xEnglish.lproj/english_help/topics/syntax.html49
-rwxr-xr-xEnglish.lproj/english_help/topics/tables.html89
-rw-r--r--Info.plist82
-rw-r--r--KeyChain.h37
-rw-r--r--KeyChain.m64
-rw-r--r--MCPKit_bundled.framework/Headers/MCPAttribute.h104
-rw-r--r--MCPKit_bundled.framework/Headers/MCPClassDescription+MCPEntreprise.h42
-rw-r--r--MCPKit_bundled.framework/Headers/MCPClassDescription.h91
-rw-r--r--MCPKit_bundled.framework/Headers/MCPConnection.h158
-rw-r--r--MCPKit_bundled.framework/Headers/MCPConnectionWinCont.h52
-rw-r--r--MCPKit_bundled.framework/Headers/MCPConstants.h33
-rw-r--r--MCPKit_bundled.framework/Headers/MCPDocument.h95
-rw-r--r--MCPKit_bundled.framework/Headers/MCPEntrepriseNotifications.h35
-rw-r--r--MCPKit_bundled.framework/Headers/MCPFastQueries.h47
-rw-r--r--MCPKit_bundled.framework/Headers/MCPJoin.h68
-rw-r--r--MCPKit_bundled.framework/Headers/MCPKit_bundled.h38
-rw-r--r--MCPKit_bundled.framework/Headers/MCPModel+MCPEntreprise.h32
-rw-r--r--MCPKit_bundled.framework/Headers/MCPModel.h78
-rw-r--r--MCPKit_bundled.framework/Headers/MCPNull.h36
-rw-r--r--MCPKit_bundled.framework/Headers/MCPNumber.h84
-rw-r--r--MCPKit_bundled.framework/Headers/MCPObject.h106
-rw-r--r--MCPKit_bundled.framework/Headers/MCPRelation.h109
-rw-r--r--MCPKit_bundled.framework/Headers/MCPResult.h110
-rw-r--r--MCPKit_bundled.framework/Headers/MCPResultPlus.h43
-rw-r--r--MCPKit_bundled.framework/Headers/my_alloc.h52
-rw-r--r--MCPKit_bundled.framework/Headers/my_list.h46
-rw-r--r--MCPKit_bundled.framework/Headers/mysql.h738
-rw-r--r--MCPKit_bundled.framework/Headers/mysql_com.h397
-rw-r--r--MCPKit_bundled.framework/Headers/mysql_embed.h33
-rw-r--r--MCPKit_bundled.framework/Headers/mysql_time.h56
-rw-r--r--MCPKit_bundled.framework/Headers/mysql_version.h29
-rw-r--r--MCPKit_bundled.framework/Headers/typelib.h34
-rwxr-xr-xMCPKit_bundled.framework/MCPKit_bundledbin0 -> 1749152 bytes
-rw-r--r--MCPKit_bundled.framework/PrivateHeaders/MCPAttribute+Private.h35
-rw-r--r--MCPKit_bundled.framework/PrivateHeaders/MCPClassDescription+Private.h41
-rw-r--r--MCPKit_bundled.framework/PrivateHeaders/MCPRelation+Private.h41
-rw-r--r--MCPKit_bundled.framework/Resources/English.lproj/InfoPlist.stringsbin0 -> 192 bytes
-rw-r--r--MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist8
-rw-r--r--MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java424
-rw-r--r--MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib28
-rw-r--r--MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/info.nib16
-rw-r--r--MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nibbin0 -> 9169 bytes
-rw-r--r--MCPKit_bundled.framework/Resources/Info.plist20
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h104
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h42
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h91
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h158
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h52
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h33
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h95
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h35
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h47
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h68
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h38
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h32
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h78
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h36
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h84
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h106
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h109
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h110
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h43
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h52
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/my_list.h46
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/mysql.h738
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h397
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h33
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h56
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h29
-rw-r--r--MCPKit_bundled.framework/Versions/A/Headers/typelib.h34
-rwxr-xr-xMCPKit_bundled.framework/Versions/A/MCPKit_bundledbin0 -> 1749152 bytes
-rw-r--r--MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h35
-rw-r--r--MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h41
-rw-r--r--MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h41
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.stringsbin0 -> 192 bytes
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist8
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java424
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib28
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib16
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nibbin0 -> 9169 bytes
-rw-r--r--MCPKit_bundled.framework/Versions/A/Resources/Info.plist20
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPAttribute.h104
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription+MCPEntreprise.h42
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription.h91
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPConnection.h158
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPConnectionWinCont.h52
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPConstants.h33
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPDocument.h95
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPEntrepriseNotifications.h35
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPFastQueries.h47
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPJoin.h68
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPKit_bundled.h38
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPModel+MCPEntreprise.h32
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPModel.h78
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPNull.h36
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPNumber.h84
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPObject.h106
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPRelation.h109
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPResult.h110
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/MCPResultPlus.h43
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/my_alloc.h52
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/my_list.h46
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/mysql.h738
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/mysql_com.h397
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/mysql_embed.h33
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/mysql_time.h56
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/mysql_version.h29
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Headers/typelib.h34
-rwxr-xr-xMCPKit_bundled.framework/Versions/Current/MCPKit_bundledbin0 -> 1749152 bytes
-rw-r--r--MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPAttribute+Private.h35
-rw-r--r--MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPClassDescription+Private.h41
-rw-r--r--MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPRelation+Private.h41
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/InfoPlist.stringsbin0 -> 192 bytes
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist8
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java424
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib28
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/info.nib16
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nibbin0 -> 9169 bytes
-rw-r--r--MCPKit_bundled.framework/Versions/Current/Resources/Info.plist20
-rw-r--r--MainController.h109
-rw-r--r--MainController.m826
-rw-r--r--SSHTunnel.h57
-rwxr-xr-xSSHTunnel.m531
-rwxr-xr-xSSHTunnel_old.h41
-rwxr-xr-xSSHTunnel_old.m225
-rw-r--r--TableContent.h134
-rw-r--r--TableContent.m1900
-rw-r--r--TableDocument.h190
-rw-r--r--TableDocument.m1625
-rw-r--r--TableDump.h136
-rw-r--r--TableDump.m1451
-rw-r--r--TableSource.h125
-rw-r--r--TableSource.m1157
-rw-r--r--TableStatus.h63
-rw-r--r--TableStatus.m113
-rw-r--r--TablesList.h95
-rw-r--r--TablesList.m655
-rwxr-xr-xaskForPass.sh12
-rw-r--r--gpl.html1
-rw-r--r--gpl.txt340
-rwxr-xr-ximages/appicon.icnsbin0 -> 63814 bytes
-rw-r--r--images/clearconsole.tiffbin0 -> 16528 bytes
-rw-r--r--images/columnadd.tiffbin0 -> 16208 bytes
-rw-r--r--images/columncopy.tiffbin0 -> 15292 bytes
-rw-r--r--images/columndelete.tiffbin0 -> 16984 bytes
-rw-r--r--images/columnrefresh.tiffbin0 -> 15400 bytes
-rw-r--r--images/connectionadd.tiffbin0 -> 16208 bytes
-rw-r--r--images/connectioncopy.tiffbin0 -> 15296 bytes
-rw-r--r--images/connectiondelete.tiffbin0 -> 17000 bytes
-rw-r--r--images/connectionrefresh.tiffbin0 -> 15440 bytes
-rw-r--r--images/createtablesyntax.tiffbin0 -> 15940 bytes
-rw-r--r--images/databases.tiffbin0 -> 15436 bytes
-rw-r--r--images/dbadd.tiffbin0 -> 16324 bytes
-rw-r--r--images/dbdelete.tiffbin0 -> 17084 bytes
-rw-r--r--images/dbrefresh.tiffbin0 -> 15544 bytes
-rw-r--r--images/flushprivileges.tiffbin0 -> 17236 bytes
-rw-r--r--images/hideconsole.tiffbin0 -> 16972 bytes
-rw-r--r--images/indexadd.tiffbin0 -> 16144 bytes
-rw-r--r--images/indexdelete.tiffbin0 -> 16124 bytes
-rw-r--r--images/optimizetable.tiffbin0 -> 16840 bytes
-rw-r--r--images/query.tiffbin0 -> 15332 bytes
-rw-r--r--images/queryadd.tiffbin0 -> 16284 bytes
-rw-r--r--images/querycopy.tiffbin0 -> 15352 bytes
-rw-r--r--images/querydelete.tiffbin0 -> 16280 bytes
-rw-r--r--images/queryrefresh.tiffbin0 -> 15496 bytes
-rw-r--r--images/reload.tiffbin0 -> 15488 bytes
-rw-r--r--images/rowadd.tiffbin0 -> 16112 bytes
-rw-r--r--images/rowcopy.tiffbin0 -> 15280 bytes
-rw-r--r--images/rowdelete.tiffbin0 -> 16144 bytes
-rw-r--r--images/rowrefresh.tiffbin0 -> 15364 bytes
-rw-r--r--images/selectall.tiffbin0 -> 15396 bytes
-rw-r--r--images/selectnone.tiffbin0 -> 15236 bytes
-rw-r--r--images/sheettotable.tiffbin0 -> 15376 bytes
-rw-r--r--images/showconsole.tiffbin0 -> 16880 bytes
-rw-r--r--images/showvariables.tiffbin0 -> 16980 bytes
-rw-r--r--images/sort-down.tiffbin0 -> 518 bytes
-rw-r--r--images/sort-up.tiffbin0 -> 518 bytes
-rw-r--r--images/tableadd.tiffbin0 -> 16348 bytes
-rw-r--r--images/tablecopy.tiffbin0 -> 15380 bytes
-rw-r--r--images/tabledelete.tiffbin0 -> 16324 bytes
-rw-r--r--images/tablerefresh.tiffbin0 -> 15572 bytes
-rw-r--r--images/tables.tiffbin0 -> 15316 bytes
-rw-r--r--images/tabletosheet.tiffbin0 -> 15368 bytes
-rw-r--r--images/textencode.tiffbin0 -> 15240 bytes
-rw-r--r--main.m6
245 files changed, 32026 insertions, 0 deletions
diff --git a/CMCopyTable.h b/CMCopyTable.h
new file mode 100644
index 00000000..9e767069
--- /dev/null
+++ b/CMCopyTable.h
@@ -0,0 +1,92 @@
+/*!
+ @header CMCopyTable.h
+ @abstract CocoaMySQL
+ @discussion <pre>
+ $Id:$
+ Created by Stuart Glenn on Wed Apr 21 2004.
+ Changed by Lorenz Textor on Sat Nov 13 2004
+ Copyright (c) 2004 Stuart Glenn. All rights reserved.
+</pre>
+*/
+
+// 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
+
+#import <AppKit/AppKit.h>
+
+
+/*!
+ @class copyTable
+ @abstract subclassed NSTableView to implement copy & drag-n-drop
+ @discussion Allows copying by creating a string with each table row as
+ a separate line and each cell then separate via tabs. The drag out
+ is in similar format. The values for each cell are obtained via the
+ objects description method
+*/
+@interface CMCopyTable : NSTableView
+{
+
+}
+
+/*!
+ @method copy:
+ @abstract does the work of copying
+ @discussion gets selected (if any) row(s) as a string setting it
+ then into th default pasteboard as a string type and tabular text type.
+ @param sender who asked for this copy?
+*/
+- (void)copy:(id)sender;
+
+/*!
+ @method validateMenuItem:
+ @abstract Dynamically enable Copy menu item for the table view
+ @discussion Will only enable the Copy item when something is selected in
+ this table view
+ @param anItem the menu item being validated
+ @result YES if there is at least one row selected & the menu item is
+ copy, NO otherwise
+*/
+- (BOOL)validateMenuItem:(NSMenuItem*)anItem;
+
+/*!
+ @method draggingSourceOperationMaskForLocal:
+ @discussion Allows for dragging out of the table to other applications
+ @param isLocal who cares
+ @result Always calls for a copy type drag operation
+*/
+- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal;
+
+/*!
+ @method selectedRowsAsTabString
+ @abstract getter of the selected rows of the table for copy
+ @discussion For the selected rows returns a single string with each row
+ separated by a newline and then for each column value separated by a
+ tab. Values are from the objects description method, so make sure it
+ returns something meaningful.
+ @result The above described string, or nil if nothing selected
+*/
+- (NSString *)selectedRowsAsTabString;
+
+/*!
+ @method draggedRowsAsTabString:
+ @abstract getter of the dragged rows of the table for drag
+ @discussion For the dragged rows returns a single string with each row
+ separated by a newline and then for each column value separated by a
+ tab. Values are from the objects description method, so make sure it
+ returns something meaningful.
+ @result The above described string, or nil if nothing selected
+*/
+- (NSString *)draggedRowsAsTabString:(NSArray *)rows;
+
+@end
diff --git a/CMCopyTable.m b/CMCopyTable.m
new file mode 100644
index 00000000..759f0f92
--- /dev/null
+++ b/CMCopyTable.m
@@ -0,0 +1,183 @@
+//
+// CMCopyTable.m
+// CocoaMySQL
+//
+// Created by Stuart Glenn on Wed Apr 21 2004.
+// Changed by Lorenz Textor on Sat Nov 13 2004
+// Copyright (c) 2004 Stuart Glenn. 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
+
+#import "CMCopyTable.h"
+
+
+@implementation CMCopyTable
+
+- (void)copy:(id)sender
+{
+ NSString *tmp = [self selectedRowsAsTabString];
+
+ if ( nil != tmp )
+ {
+ NSPasteboard *pb = [NSPasteboard generalPasteboard];
+
+ [pb declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType,
+ NSStringPboardType, nil]
+ owner:nil];
+
+ [pb setString:tmp forType:NSStringPboardType];
+ [pb setString:tmp forType:NSTabularTextPboardType];
+ }
+}
+
+//allow for drag-n-drop out of the application as a copy
+- (unsigned int)draggingSourceOperationMaskForLocal:(BOOL)isLocal
+{
+ return NSDragOperationCopy;
+}
+
+//only have the copy menu item enabled when row(s) are selected
+- (BOOL)validateMenuItem:(NSMenuItem*)anItem
+{
+ int row = [self selectedRow];
+ if ([[anItem title] isEqualToString:@"Copy"] )
+ {
+ if (row < 0 )
+ {
+ return NO;
+ }
+ }
+ return YES;
+}
+
+//get selected rows a string of newline separated lines of tab separated fields
+//the value in each field is from the objects description method
+- (NSString *)selectedRowsAsTabString
+{
+ if ( [self numberOfSelectedRows] > 0 )
+ {
+ NSArray *columns = [self tableColumns];
+ int numColumns = [columns count];
+ id dataSource = [self dataSource];
+
+ NSMutableString *result = [NSMutableString stringWithCapacity:numColumns];
+
+ //this is really deprecated in 10.3, but the new method is really weird
+ NSEnumerator *enumerator = [self selectedRowEnumerator];
+
+ int c;
+ id row = nil;
+ id rowData = nil;
+ NSTableColumn *col = nil;
+
+ while (row = [enumerator nextObject])
+ {
+ rowData = nil;
+ for ( c = 0; c < numColumns; c++)
+ {
+ col = [columns objectAtIndex:c];
+ rowData = [dataSource tableView:self
+ objectValueForTableColumn:col
+ row:[row intValue] ];
+
+ if ( nil != rowData )
+ {
+ [result appendString:[NSString stringWithFormat:@"%@\t", [rowData description] ] ];
+ }
+ else
+ {
+ [result appendString:@"\t"];
+ }
+ } //end for each column
+
+ if ( [result length] )
+ {
+ [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)];
+ }
+ [result appendString: [ NSString stringWithFormat:@"\n"]];
+ } //end for each row
+
+ if ( [result length] )
+ {
+ [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)];
+ }
+ return result;
+ }
+ else
+ {
+ return nil;
+ }
+}
+
+//get dragged rows a string of newline separated lines of tab separated fields
+//the value in each field is from the objects description method
+- (NSString *)draggedRowsAsTabString:(NSArray *)rows
+{
+ if ( [rows count] > 0 )
+ {
+ NSArray *columns = [self tableColumns];
+ int numColumns = [columns count];
+ id dataSource = [self dataSource];
+
+ NSMutableString *result = [NSMutableString stringWithCapacity:numColumns];
+
+ //this is really deprecated in 10.3, but the new method is really weird
+ NSEnumerator *enumerator = [rows objectEnumerator];
+
+ int c;
+ id row = nil;
+ id rowData = nil;
+ NSTableColumn *col = nil;
+
+ while (row = [enumerator nextObject])
+ {
+ rowData = nil;
+ for ( c = 0; c < numColumns; c++)
+ {
+ col = [columns objectAtIndex:c];
+ rowData = [dataSource tableView:self
+ objectValueForTableColumn:col
+ row:[row intValue] ];
+
+ if ( nil != rowData )
+ {
+ [result appendString:[NSString stringWithFormat:@"%@\t", [rowData description] ] ];
+ }
+ else
+ {
+ [result appendString:@"\t"];
+ }
+ } //end for each column
+
+ if ( [result length] )
+ {
+ [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)];
+ }
+ [result appendString: [ NSString stringWithFormat:@"\n"]];
+ } //end for each row
+
+ if ( [result length] )
+ {
+ [result deleteCharactersInRange:NSMakeRange([result length]-1, 1)];
+ }
+ return result;
+ }
+ else
+ {
+ return nil;
+ }
+}
+
+@end
diff --git a/CMImageView.h b/CMImageView.h
new file mode 100644
index 00000000..fb3e9098
--- /dev/null
+++ b/CMImageView.h
@@ -0,0 +1,36 @@
+//
+// CMImageView.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Sat Sep 06 2003.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface CMImageView : NSImageView {
+
+ NSString *draggedFilePath;
+
+}
+
+- (NSString *)draggedFilePath;
+
+@end
diff --git a/CMImageView.m b/CMImageView.m
new file mode 100644
index 00000000..ade12d41
--- /dev/null
+++ b/CMImageView.m
@@ -0,0 +1,48 @@
+//
+// CMImageView.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Sat Sep 06 2003.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "CMImageView.h"
+
+
+@implementation CMImageView
+
+- (NSString *)draggedFilePath
+/*
+returns the path of the dragged file
+*/
+{
+ return [NSString stringWithString:draggedFilePath];
+}
+
+- (void)concludeDragOperation:(id <NSDraggingInfo>)sender
+{
+ if ( draggedFilePath )
+ [draggedFilePath release];
+
+ draggedFilePath = [[NSString stringWithString:[[[sender draggingPasteboard] propertyListForType:@"NSFilenamesPboardType"] objectAtIndex:0]] retain];
+
+ [super concludeDragOperation:sender];
+}
+
+@end
diff --git a/CMMCPConnection.h b/CMMCPConnection.h
new file mode 100644
index 00000000..0957cfb0
--- /dev/null
+++ b/CMMCPConnection.h
@@ -0,0 +1,37 @@
+//
+// CMMCPConnection.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMMCPResult.h"
+
+@interface CMMCPConnection : MCPConnection {
+ id delegate;
+}
+
+- (CMMCPResult *) queryString:(NSString *) query;
+- (void)setDelegate:(id)object;
+- (NSTimeZone *) timeZone;
+
+@end
diff --git a/CMMCPConnection.m b/CMMCPConnection.m
new file mode 100644
index 00000000..a630b1f7
--- /dev/null
+++ b/CMMCPConnection.m
@@ -0,0 +1,221 @@
+//
+// CMMCPConnection.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "CMMCPConnection.h"
+
+
+@implementation CMMCPConnection
+
+/*
++ (NSStringEncoding) encodingForMySQLEncoding:(const char *) mysqlEncoding
+ Gets a proper NSStringEncoding according to the given MySQL charset.
+
+ MySQL 4.0 offers this charsets:
+ big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin1_de latin2 latin5 sjis swe7 tis620 ujis usa7 win1250 win1251ukr
+
+ WARNING : incomplete implementation. Please, send your fixes.
+{
+// unicode
+ if (!strncmp(mysqlEncoding, "utf8", 4)) {
+ return NSUTF8StringEncoding;
+ }
+ if (!strncmp(mysqlEncoding, "ucs2", 4)) {
+ return NSUnicodeStringEncoding;
+ }
+// west european
+ if (!strncmp(mysqlEncoding, "ascii", 5)) {
+ return NSASCIIStringEncoding;
+ }
+ if (!strncmp(mysqlEncoding, "latin1", 6)) {
+ return NSISOLatin1StringEncoding;
+ }
+ if (!strncmp(mysqlEncoding, "macroman", 8)) {
+ return NSMacOSRomanStringEncoding;
+ }
+// central european
+ if (!strncmp(mysqlEncoding, "cp1250", 6)) {
+ return NSWindowsCP1250StringEncoding;
+ }
+ if (!strncmp(mysqlEncoding, "latin2", 6)) {
+ return NSISOLatin2StringEncoding;
+ }
+// south european and middle east
+ if (!strncmp(mysqlEncoding, "cp1256", 6)) {
+ return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsArabic);
+ }
+ if (!strncmp(mysqlEncoding, "greek", 5)) {
+ return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinGreek);
+ }
+ if (!strncmp(mysqlEncoding, "hebrew", 6)) {
+ CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinHebrew);
+ }
+ if (!strncmp(mysqlEncoding, "latin5", 6)) {
+ return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin5);
+ }
+// baltic
+ if (!strncmp(mysqlEncoding, "cp1257", 6)) {
+ return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsBalticRim);
+ }
+// cyrillic
+ if (!strncmp(mysqlEncoding, "cp1251", 6)) {
+ return NSWindowsCP1251StringEncoding;
+ }
+// asian
+ if (!strncmp(mysqlEncoding, "big5", 4)) {
+ return CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingBig5);
+ }
+ if (!strncmp(mysqlEncoding, "ujis", 4)) {
+ return NSJapaneseEUCStringEncoding;
+ }
+ if (!strncmp(mysqlEncoding, "sjis", 4)) {
+ return NSShiftJISStringEncoding;
+ }
+
+// default to iso latin 1, even if it is not exact (throw an exception?)
+ NSLog(@"warning: unknown encoding %s! falling back to latin1.", mysqlEncoding);
+ return NSISOLatin1StringEncoding;
+}
+*/
+
+- (CMMCPResult *) queryString:(NSString *) query
+/*
+modified version of queryString to be used in CocoaMySQL
+*/
+{
+ CMMCPResult *theResult;
+ const char *theCQuery = [self cStringFromString:query];
+ int theQueryCode;
+
+//[DIFF]: check connection
+ if ( ![self checkConnection] ) {
+ NSLog(@"Connection was gone, but should be reestablished now!");
+ }
+//end [DIFF]
+
+//[DIFF]: inform the delegate about the query
+ if ( delegate && [delegate respondsToSelector:@selector(willQueryString:)] )
+ [delegate willQueryString:query];
+//end [DIFF]
+
+ if (0 == (theQueryCode = mysql_query(mConnection, theCQuery))) {
+ if (mysql_field_count(mConnection) != 0) {
+//[DIFF]: use CMMCPResult instad of MCPResult
+ theResult = [[CMMCPResult alloc] initWithMySQLPtr:mConnection encoding:mEncoding timeZone:mTimeZone];
+//end [DIFF]
+ }
+ else {
+ return nil;
+ }
+ }
+ else {
+// NSLog (@"Problem in queryString error code is : %d, query is : %s -in ObjC : %@-\n", theQueryCode, theCQuery, query);
+// NSLog(@"Error message is : %@\n", [self getLastErrorMessage]);
+// theResult = [theResult init]; // Old version...
+// theResult = nil;
+//[DIFF]: inform the delegate about errors
+ if ( delegate && [delegate respondsToSelector:@selector(queryGaveError:)] )
+ [delegate queryGaveError:[self getLastErrorMessage]];
+//end [DIFF]
+ return nil;
+ }
+ return [theResult autorelease];
+}
+
+- (void)setDelegate:(id)object
+/*
+sets the delegate
+*/
+{
+ delegate = object;
+}
+
+
+
+
+
+- (NSTimeZone *) timeZone
+/*" Getting the currently used time zone (in communication with the DB server). "*/
+/* fixes mysql 4.1.14 problem, can be deleted as soon as fixed in the framework */
+{
+ if ([self checkConnection]) {
+ MCPResult *theSessionTZ = [self queryString:@"SHOW VARIABLES LIKE '%time_zone'"];
+ NSArray *theRow;
+// diff
+ id theTZName;
+// end diff
+ NSTimeZone *theTZ;
+
+ [theSessionTZ dataSeek:1ULL];
+ theRow = [theSessionTZ fetchRowAsArray];
+ theTZName = [theRow objectAtIndex:1];
+// diff
+ if ( [theTZName isKindOfClass:[NSData class]] ) {
+ // MySQL 4.1.14 returns the mysql variables as nsdata
+ theTZName = [self stringWithText:theTZName];
+ }
+// end diff
+ if ([theTZName isEqualToString:@"SYSTEM"]) {
+ [theSessionTZ dataSeek:0ULL];
+ theRow = [theSessionTZ fetchRowAsArray];
+ theTZName = [theRow objectAtIndex:1];
+// diff
+ if ( [theTZName isKindOfClass:[NSData class]] ) {
+ // MySQL 4.1.14 returns the mysql variables as nsdata
+ theTZName = [self stringWithText:theTZName];
+ }
+// end diff
+ }
+ if (theTZName) { // Old versions of the server does not support there own time zone ?
+ theTZ = [NSTimeZone timeZoneWithName:theTZName];
+ }
+ else { // By default set the time zone to the local one..
+ // Try to get the name using the previously available variable:
+// NSLog(@"Fecthing time-zone on 'old' DB server : variable name is : timezone");
+ theSessionTZ = [self queryString:@"SHOW VARIABLES LIKE 'timezone'"];
+ [theSessionTZ dataSeek:0ULL];
+ theRow = [theSessionTZ fetchRowAsArray];
+ theTZName = [theRow objectAtIndex:1];
+ if (theTZName) { // Finally we found one ...
+// NSLog(@"Result is : %@", theTZName);
+ theTZ = [NSTimeZone timeZoneWithName:theTZName];
+ }
+ else {
+ theTZ = [NSTimeZone defaultTimeZone];
+// theTZ = [NSTimeZone systemTimeZone];
+ NSLog(@"The time zone is not defined on the server, set it to the default one : %@", theTZ);
+ }
+ }
+ if (theTZ != mTimeZone) {
+ [mTimeZone release];
+ mTimeZone = [theTZ retain];
+ }
+ }
+ return mTimeZone;
+}
+
+
+
+
+
+@end
diff --git a/CMMCPResult.h b/CMMCPResult.h
new file mode 100644
index 00000000..b4421caf
--- /dev/null
+++ b/CMMCPResult.h
@@ -0,0 +1,33 @@
+//
+// CMMCPResult.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+
+
+@interface CMMCPResult : MCPResult {
+
+}
+
+@end
diff --git a/CMMCPResult.m b/CMMCPResult.m
new file mode 100644
index 00000000..7f02da25
--- /dev/null
+++ b/CMMCPResult.m
@@ -0,0 +1,153 @@
+//
+// CMMCPResult.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed Sept 21 2005.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "CMMCPResult.h"
+
+
+@implementation CMMCPResult
+
+- (id) fetchRowAsType:(MCPReturnType) aType
+/*"
+modified version for use with CocoaMySQL
+"*/
+{
+ MYSQL_ROW theRow;
+ unsigned long *theLengths;
+ MYSQL_FIELD *theField;
+ int i;
+ id theReturn;
+
+ if (mResult == NULL) {
+// If there is no results, returns nil, as after the last row...
+ return nil;
+ }
+
+ theRow = mysql_fetch_row(mResult);
+ if (theRow == NULL) {
+ return nil;
+ }
+
+ switch (aType) {
+ case MCPTypeArray:
+ theReturn = [NSMutableArray arrayWithCapacity:mNumOfFields];
+ break;
+ case MCPTypeDictionary:
+ if (mNames == nil) {
+ [self fetchFieldNames];
+ }
+ theReturn = [NSMutableDictionary dictionaryWithCapacity:mNumOfFields];
+ break;
+ default :
+ NSLog (@"Unknown type : %d, will return an Array!\n", aType);
+ theReturn = [NSMutableArray arrayWithCapacity:mNumOfFields];
+ break;
+ }
+
+ theLengths = mysql_fetch_lengths(mResult);
+ theField = mysql_fetch_fields(mResult);
+ for (i=0; i<mNumOfFields; i++) {
+ id theCurrentObj;
+
+ if (theRow[i] == NULL) {
+ theCurrentObj = [NSNull null];
+ }
+ else {
+ char *theData = calloc(sizeof(char),theLengths[i]+1);
+// char *theUselLess;
+ memcpy(theData, theRow[i],theLengths[i]);
+ theData[theLengths[i]] = '\0';
+
+ switch (theField[i].type) {
+ case FIELD_TYPE_TINY:
+ case FIELD_TYPE_SHORT:
+ case FIELD_TYPE_INT24:
+ case FIELD_TYPE_LONG:
+ case FIELD_TYPE_LONGLONG:
+ case FIELD_TYPE_DECIMAL:
+ case FIELD_TYPE_FLOAT:
+ case FIELD_TYPE_DOUBLE:
+ theCurrentObj = [self stringWithCString:theData];
+ break;
+ case FIELD_TYPE_TIMESTAMP:
+ case FIELD_TYPE_DATE:
+ case FIELD_TYPE_TIME:
+ case FIELD_TYPE_DATETIME:
+ case FIELD_TYPE_YEAR:
+ theCurrentObj = [self stringWithCString:theData];
+ break;
+ case FIELD_TYPE_VAR_STRING:
+ case FIELD_TYPE_STRING:
+ theCurrentObj = [self stringWithCString:theData];
+ break;
+ case FIELD_TYPE_TINY_BLOB:
+ case FIELD_TYPE_BLOB:
+ case FIELD_TYPE_MEDIUM_BLOB:
+ case FIELD_TYPE_LONG_BLOB:
+ theCurrentObj = [NSData dataWithBytes:theData length:theLengths[i]];
+ if (!(theField[i].flags & BINARY_FLAG)) { // It is TEXT and NOT BLOB...
+ theCurrentObj = [self stringWithText:theCurrentObj];
+ }
+//#warning Should check for TEXT (using theField[i].flag BINARY_FLAG)
+ break;
+ case FIELD_TYPE_SET:
+ theCurrentObj = [self stringWithCString:theData];
+ break;
+ case FIELD_TYPE_ENUM:
+ theCurrentObj = [self stringWithCString:theData];
+ break;
+ case FIELD_TYPE_NULL:
+ theCurrentObj = [NSNull null];
+ break;
+ case FIELD_TYPE_NEWDATE:
+// Don't know what the format for this type is...
+ theCurrentObj = [self stringWithCString:theData];
+ break;
+ default:
+ NSLog (@"in fetchRowAsDictionary : Unknown type : %d for column %d, send back a NSData object", (int)theField[i].type, (int)i);
+ theCurrentObj = [NSData dataWithBytes:theData length:theLengths[i]];
+ break;
+ }
+ free(theData);
+// Some of the creators return nil object...
+ if (theCurrentObj == nil) {
+ theCurrentObj = [NSNull null];
+ }
+ }
+ switch (aType) {
+ case MCPTypeArray :
+ [theReturn addObject:theCurrentObj];
+ break;
+ case MCPTypeDictionary :
+ [theReturn setObject:theCurrentObj forKey:[mNames objectAtIndex:i]];
+ break;
+ default :
+ [theReturn addObject:theCurrentObj];
+ break;
+ }
+ }
+
+ return theReturn;
+}
+
+@end
diff --git a/CMTextView.h b/CMTextView.h
new file mode 100644
index 00000000..2067d943
--- /dev/null
+++ b/CMTextView.h
@@ -0,0 +1,32 @@
+//
+// CMTextView.h
+// CocoaMySQL
+//
+// Created by Carsten BlŸm.
+//
+// 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+
+@interface CMTextView : NSTextView {
+}
+
+-(NSArray *)completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int *)index;
+-(NSArray *)keywords;
+
+@end
diff --git a/CMTextView.m b/CMTextView.m
new file mode 100644
index 00000000..587bf071
--- /dev/null
+++ b/CMTextView.m
@@ -0,0 +1,296 @@
+//
+// CMTextView.m
+// CocoaMySQL
+//
+// Created by Carsten BlŸm.
+//
+// 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "CMTextView.h"
+
+@implementation CMTextView
+
+- (NSArray *)completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int *)index
+{
+
+ NSString *partialString = [[self string] substringWithRange:charRange];
+ unsigned int partialLength = [partialString length];
+ unsigned int options = NSCaseInsensitiveSearch | NSAnchoredSearch;
+ unsigned int i;
+ NSRange partialRange = NSMakeRange(0, partialLength);
+ NSMutableArray *compl = [[NSMutableArray alloc] initWithCapacity:32];
+ NSArray *keywords = [self keywords];
+
+ // Get the document
+// id tableDocument = [[[self window] windowController] document];
+ id tableDocument = [[self window] delegate];
+
+//NSLog(@"doc: %@", [[[self window] windowController] document]);
+
+ // Get an array of table names for the current database
+ id tableNames = [[tableDocument valueForKeyPath:@"tablesListInstance"] valueForKey:@"tables"];
+
+ // Add matching table names to compl
+ for (i = 0; i < [tableNames count]; i ++)
+ {
+ if ([[tableNames objectAtIndex:i] length] > partialLength)
+ {
+ NSRange range = [[tableNames objectAtIndex:i] rangeOfString:partialString
+ options:options
+ range:partialRange];
+ if (range.location != NSNotFound)
+ {
+ [compl addObject:[tableNames objectAtIndex:i]];
+ }
+ }
+
+ }
+
+ // Add matching keywords to compl
+ for (i = 0; i < [keywords count]; i ++)
+ {
+ if ([[keywords objectAtIndex:i] length] > partialLength)
+ {
+ NSRange range = [[keywords objectAtIndex:i] rangeOfString:partialString
+ options:options
+ range:partialRange];
+ if (range.location != NSNotFound)
+ {
+ [compl addObject:[keywords objectAtIndex:i]];
+ }
+ }
+ }
+
+ return [compl autorelease];
+}
+
+
+
+-(NSArray *)keywords {
+ return [NSArray arrayWithObjects:
+ @"ADD",
+ @"ALL",
+ @"ALTER",
+ @"ANALYZE",
+ @"AND",
+ @"ASC",
+ @"ASENSITIVE",
+ @"BEFORE",
+ @"BETWEEN",
+ @"BIGINT",
+ @"BINARY",
+ @"BLOB",
+ @"BOTH",
+ @"CALL",
+ @"CASCADE",
+ @"CASE",
+ @"CHANGE",
+ @"CHAR",
+ @"CHARACTER",
+ @"CHECK",
+ @"COLLATE",
+ @"COLUMN",
+ @"COLUMNS",
+ @"CONDITION",
+ @"CONNECTION",
+ @"CONSTRAINT",
+ @"CONTINUE",
+ @"CONVERT",
+ @"CREATE",
+ @"CROSS",
+ @"CURRENT_DATE",
+ @"CURRENT_TIME",
+ @"CURRENT_TIMESTAMP",
+ @"CURRENT_USER",
+ @"CURSOR",
+ @"DATABASE",
+ @"DATABASES",
+ @"DAY_HOUR",
+ @"DAY_MICROSECOND",
+ @"DAY_MINUTE",
+ @"DAY_SECOND",
+ @"DEC",
+ @"DECIMAL",
+ @"DECLARE",
+ @"DEFAULT",
+ @"DELAYED",
+ @"DELETE",
+ @"DESC",
+ @"DESCRIBE",
+ @"DETERMINISTIC",
+ @"DISTINCT",
+ @"DISTINCTROW",
+ @"DIV",
+ @"DOUBLE",
+ @"DROP",
+ @"DUAL",
+ @"EACH",
+ @"ELSE",
+ @"ELSEIF",
+ @"ENCLOSED",
+ @"ESCAPED",
+ @"EXISTS",
+ @"EXIT",
+ @"EXPLAIN",
+ @"FALSE",
+ @"FETCH",
+ @"FIELDS",
+ @"FLOAT",
+ @"FOR",
+ @"FORCE",
+ @"FOREIGN",
+ @"FOUND",
+ @"FROM",
+ @"FULLTEXT",
+ @"GOTO",
+ @"GRANT",
+ @"GROUP",
+ @"HAVING",
+ @"HIGH_PRIORITY",
+ @"HOUR_MICROSECOND",
+ @"HOUR_MINUTE",
+ @"HOUR_SECOND",
+ @"IGNORE",
+ @"INDEX",
+ @"INFILE",
+ @"INNER",
+ @"INOUT",
+ @"INSENSITIVE",
+ @"INSERT",
+ @"INT",
+ @"INTEGER",
+ @"INTERVAL",
+ @"INTO",
+ @"ITERATE",
+ @"JOIN",
+ @"KEY",
+ @"KEYS",
+ @"KILL",
+ @"LEADING",
+ @"LEAVE",
+ @"LEFT",
+ @"LIKE",
+ @"LIMIT",
+ @"LINES",
+ @"LOAD",
+ @"LOCALTIME",
+ @"LOCALTIMESTAMP",
+ @"LOCK",
+ @"LONG",
+ @"LONGBLOB",
+ @"LONGTEXT",
+ @"LOOP",
+ @"LOW_PRIORITY",
+ @"MATCH",
+ @"MEDIUMBLOB",
+ @"MEDIUMINT",
+ @"MEDIUMTEXT",
+ @"MIDDLEINT",
+ @"MINUTE_MICROSECOND",
+ @"MINUTE_SECOND",
+ @"MOD",
+ @"NATURAL",
+ @"NOT",
+ @"NO_WRITE_TO_BINLOG",
+ @"NULL",
+ @"NUMERIC",
+ @"ON",
+ @"OPTIMIZE",
+ @"OPTION",
+ @"OPTIONALLY",
+ @"ORDER",
+ @"OUT",
+ @"OUTER",
+ @"OUTFILE",
+ @"PRECISION",
+ @"PRIMARY",
+ @"PRIVILEGES",
+ @"PROCEDURE",
+ @"PURGE",
+ @"READ",
+ @"REAL",
+ @"REFERENCES",
+ @"REGEXP",
+ @"RENAME",
+ @"REPEAT",
+ @"REPLACE",
+ @"REQUIRE",
+ @"RESTRICT",
+ @"RETURN",
+ @"REVOKE",
+ @"RIGHT",
+ @"RLIKE",
+ @"SECOND_MICROSECOND",
+ @"SELECT",
+ @"SENSITIVE",
+ @"SEPARATOR",
+ @"SET",
+ @"SHOW",
+ @"SMALLINT",
+ @"SONAME",
+ @"SPATIAL",
+ @"SPECIFIC",
+ @"SQL",
+ @"SQLEXCEPTION",
+ @"SQLSTATE",
+ @"SQLWARNING",
+ @"SQL_BIG_RESULT",
+ @"SQL_CALC_FOUND_ROWS",
+ @"SQL_SMALL_RESULT",
+ @"SSL",
+ @"STARTING",
+ @"STRAIGHT_JOIN",
+ @"TABLE",
+ @"TABLES",
+ @"TERMINATED",
+ @"THEN",
+ @"TINYBLOB",
+ @"TINYINT",
+ @"TINYTEXT",
+ @"TRAILING",
+ @"TRIGGER",
+ @"TRUE",
+ @"UNDO",
+ @"UNION",
+ @"UNIQUE",
+ @"UNLOCK",
+ @"UNSIGNED",
+ @"UPDATE",
+ @"USAGE",
+ @"USE",
+ @"USING",
+ @"UTC_DATE",
+ @"UTC_TIME",
+ @"UTC_TIMESTAMP",
+ @"VALUES",
+ @"VARBINARY",
+ @"VARCHAR",
+ @"VARCHARACTER",
+ @"VARYING",
+ @"WHEN",
+ @"WHERE",
+ @"WHILE",
+ @"WITH",
+ @"WRITE",
+ @"XOR",
+ @"YEAR_MONTH",
+ @"ZEROFILL",
+ nil];
+}
+
+@end
diff --git a/CocoaMySQL.scriptSuite b/CocoaMySQL.scriptSuite
new file mode 100755
index 00000000..937ff008
--- /dev/null
+++ b/CocoaMySQL.scriptSuite
@@ -0,0 +1,37 @@
+{
+ "Name" = "CocoaMySQL";
+ "AppleEventCode" = "cmec";
+
+ "Classes" = {
+ "MainController" = {
+ "Superclass" = "NSCoreSuite.NSAbstractObject";
+ "AppleEventCode" = "capp";
+ "SupportedCommands" = {
+ "authenticate" = "authenticate:";
+ "NSCoreSuite.Quit" = "handleQuitScriptCommand:";
+ };
+ };
+ };
+ "Commands" = {
+ "authenticate" = {
+ "CommandClass" = "NSScriptCommand";
+ "AppleEventCode" = "auth";
+ "Class" = "NSString";
+ "ResultAppleEventCode" = "****";
+ "Arguments" = {
+ "query" = {
+ "Type" = "NSString";
+ "AppleEventCode" = "qery";
+ };
+ "fifo" = {
+ "Type" = "NSString";
+ "AppleEventCode" = "fifo";
+ };
+ "tunnelName" = {
+ "Type" = "NSString";
+ "AppleEventCode" = "tunn";
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/CocoaMySQL.scriptTerminology b/CocoaMySQL.scriptTerminology
new file mode 100755
index 00000000..be6269a6
--- /dev/null
+++ b/CocoaMySQL.scriptTerminology
@@ -0,0 +1,31 @@
+{
+ "Name" = "CocoaMySQL suite";
+ "Description" = "Suite for handling tunnel management";
+ "Classes" = {
+ "MainController" = {
+ "Name" = "application";
+ "PluralName" = "applications";
+ "Description" = "CocoaMySQL application";
+ };
+ };
+ "Commands" = {
+ "authenticate" = {
+ "Name" = "authenticate";
+ "Description" = "Open the dialog asking for password or passphrase";
+ "Arguments" = {
+ "query" = {
+ "Name" = "query phrase";
+ "Description" = "The string to show in the dialog";
+ };
+ "fifo" = {
+ "Name" = "fifo";
+ "Description" = "The FIFO file where expecting the passphrase";
+ };
+ "tunnelName" = {
+ "Name" = "tunnel";
+ "Description" = "Tunnel's name";
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/CocoaMySQL.xcodeproj/abhi.mode1v3 b/CocoaMySQL.xcodeproj/abhi.mode1v3
new file mode 100644
index 00000000..62396339
--- /dev/null
+++ b/CocoaMySQL.xcodeproj/abhi.mode1v3
@@ -0,0 +1,1418 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActivePerspectiveName</key>
+ <string>Project</string>
+ <key>AllowedModules</key>
+ <array>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Name</key>
+ <string>Groups and Files Outline View</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Name</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCTaskListModule</string>
+ <key>Name</key>
+ <string>Task List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Name</key>
+ <string>File and Smart Group Detail Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Name</key>
+ <string>Detailed Build Results Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Name</key>
+ <string>Project Batch Find Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Name</key>
+ <string>Project Format Conflicts List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Name</key>
+ <string>Bookmarks Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Name</key>
+ <string>Class Browser</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Name</key>
+ <string>Source Code Control Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXDebugBreakpointsModule</string>
+ <key>Name</key>
+ <string>Debug Breakpoints Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDockableInspector</string>
+ <key>Name</key>
+ <string>Inspector</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXOpenQuicklyModule</string>
+ <key>Name</key>
+ <string>Open Quickly Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Name</key>
+ <string>Debugger</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Name</key>
+ <string>Debug Console</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Name</key>
+ <string>Snapshots Tool</string>
+ </dict>
+ </array>
+ <key>BundlePath</key>
+ <string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
+ <key>Description</key>
+ <string>DefaultDescriptionKey</string>
+ <key>DockingSystemVisible</key>
+ <false/>
+ <key>Extension</key>
+ <string>mode1v3</string>
+ <key>FavBarConfig</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>38B8740A0DA3AC0A009FC6AE</string>
+ <key>XCBarModuleItemNames</key>
+ <dict/>
+ <key>XCBarModuleItems</key>
+ <array/>
+ </dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>com.apple.perspectives.project.mode1v3</string>
+ <key>MajorVersion</key>
+ <integer>33</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Default</string>
+ <key>Notifications</key>
+ <array/>
+ <key>OpenEditors</key>
+ <array/>
+ <key>PerspectiveWidths</key>
+ <array>
+ <integer>-1</integer>
+ <integer>-1</integer>
+ </array>
+ <key>Perspectives</key>
+ <array>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>active-target-popup</string>
+ <string>active-buildstyle-popup</string>
+ <string>action</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>buildOrClean</string>
+ <string>build-and-goOrGo</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>get-info</string>
+ <string>toggle-editor</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>com.apple.pbx.toolbar.searchfield</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProjectWithEditor</string>
+ <key>Identifier</key>
+ <string>perspective.project</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>294</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>2A37F4AAFDCFA73011CA2CEA</string>
+ <string>2A37F4ABFDCFA73011CA2CEA</string>
+ <string>2A37F4B8FDCFA73011CA2CEA</string>
+ <string>F5C0859D04A82C0E01B3137E</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>13</integer>
+ <integer>9</integer>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {294, 810}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <true/>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {311, 828}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>294</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>-1440 31 1440 869 -1440 0 1440 900 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>311pt</string>
+ </dict>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20306471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>TableDocument.m</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20406471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>TableDocument.m</string>
+ <key>_historyCapacity</key>
+ <integer>0</integer>
+ <key>bookmark</key>
+ <string>3832AD7F0DA524D40040DA7A</string>
+ <key>history</key>
+ <array>
+ <string>38B874FE0DA3B178009FC6AE</string>
+ <string>38B874FF0DA3B178009FC6AE</string>
+ <string>38B875010DA3B178009FC6AE</string>
+ <string>38B875040DA3B178009FC6AE</string>
+ <string>3832AD460DA51EFC0040DA7A</string>
+ <string>3832AD5D0DA5200B0040DA7A</string>
+ <string>3832AD5E0DA5200B0040DA7A</string>
+ <string>3832AD5F0DA5200B0040DA7A</string>
+ <string>3832AD600DA5200B0040DA7A</string>
+ <string>3832AD610DA5200B0040DA7A</string>
+ <string>3832AD620DA5200B0040DA7A</string>
+ </array>
+ <key>nextStack</key>
+ <array>
+ <string>3832AD640DA5200B0040DA7A</string>
+ </array>
+ <key>prevStack</key>
+ <array>
+ <string>38B875070DA3B178009FC6AE</string>
+ <string>38B875080DA3B178009FC6AE</string>
+ <string>38B8750B0DA3B178009FC6AE</string>
+ <string>3832AD630DA5200B0040DA7A</string>
+ </array>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1124, 823}}</string>
+ <key>RubberWindowFrame</key>
+ <string>-1440 31 1440 869 -1440 0 1440 900 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>823pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20506471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 828}, {1124, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>-1440 31 1440 869 -1440 0 1440 900 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>1124pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCModuleDock</string>
+ <string>PBXNavigatorGroup</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>3832AD030DA515020040DA7A</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>3832AD040DA515020040DA7A</string>
+ <string>1CE0B20306471E060097A5F4</string>
+ <string>1CE0B20506471E060097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.defaultV3</string>
+ </dict>
+ <dict>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProject</string>
+ <key>Identifier</key>
+ <string>perspective.morph</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {186, 337}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>1</integer>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 355}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>373 269 690 397 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Morph</string>
+ <key>PreferredWidth</key>
+ <integer>300</integer>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default.shortV3</string>
+ </dict>
+ </array>
+ <key>PerspectivesBarVisible</key>
+ <false/>
+ <key>ShelfIsVisible</key>
+ <false/>
+ <key>SourceDescription</key>
+ <string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TimeStamp</key>
+ <real>0.0</real>
+ <key>ToolbarDisplayMode</key>
+ <integer>2</integer>
+ <key>ToolbarIsVisible</key>
+ <true/>
+ <key>ToolbarSizeMode</key>
+ <integer>2</integer>
+ <key>Type</key>
+ <string>Perspectives</string>
+ <key>UpdateMessage</key>
+ <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string>
+ <key>WindowJustification</key>
+ <integer>5</integer>
+ <key>WindowOrderList</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>38B8740B0DA3AC0A009FC6AE</string>
+ <string>1C78EAAD065D492600B07095</string>
+ <string>/Users/abhi/Desktop/CocoaMySQL/CocoaMySQL.xcodeproj</string>
+ </array>
+ <key>WindowString</key>
+ <string>-1440 31 1440 869 -1440 0 1440 900 </string>
+ <key>WindowToolsV3</key>
+ <array>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.build</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528F0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>TableDocument.m</string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {500, 218}}</string>
+ <key>RubberWindowFrame</key>
+ <string>396 256 500 500 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>218pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build</string>
+ <key>XCBuildResultsTrigger_Collapse</key>
+ <integer>1021</integer>
+ <key>XCBuildResultsTrigger_Open</key>
+ <integer>1011</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 223}, {500, 236}}</string>
+ <key>RubberWindowFrame</key>
+ <string>396 256 500 500 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Proportion</key>
+ <string>236pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>459pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Build Results</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBuildResultsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>38B8740B0DA3AC0A009FC6AE</string>
+ <string>3832AD050DA515020040DA7A</string>
+ <string>1CD0528F0623707200166675</string>
+ <string>XCMainBuildResultsModuleGUID</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.buildV3</string>
+ <key>WindowString</key>
+ <string>396 256 500 500 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>38B8740B0DA3AC0A009FC6AE</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.debugger</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {316, 194}}</string>
+ <string>{{316, 0}, {378, 194}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {694, 194}}</string>
+ <string>{{0, 194}, {694, 187}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C162984064C10D400B95A72</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug - GLUTExamples (Underwater)</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 0}, {694, 381}}</string>
+ <key>PBXDebugSessionStackFrameViewKey</key>
+ <dict>
+ <key>DebugVariablesTableConfiguration</key>
+ <array>
+ <string>Name</string>
+ <real>120</real>
+ <string>Value</string>
+ <real>85</real>
+ <string>Summary</string>
+ <real>148</real>
+ </array>
+ <key>Frame</key>
+ <string>{{316, 0}, {378, 194}}</string>
+ <key>RubberWindowFrame</key>
+ <string>396 334 694 422 0 0 1440 878 </string>
+ </dict>
+ <key>RubberWindowFrame</key>
+ <string>396 334 694 422 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>381pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>381pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>3832AD060DA515020040DA7A</string>
+ <string>1C162984064C10D400B95A72</string>
+ <string>3832AD070DA515020040DA7A</string>
+ <string>3832AD080DA515020040DA7A</string>
+ <string>3832AD090DA515020040DA7A</string>
+ <string>3832AD0A0DA515020040DA7A</string>
+ <string>3832AD0B0DA515020040DA7A</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugV3</string>
+ <key>WindowString</key>
+ <string>396 334 694 422 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.find</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CDD528C0622207200134675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>&lt;No Editor&gt;</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528D0623707200166675</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {781, 167}}</string>
+ <key>RubberWindowFrame</key>
+ <string>62 385 781 470 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>781pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>50%</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528E0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Project Find</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{8, 0}, {773, 254}}</string>
+ <key>RubberWindowFrame</key>
+ <string>62 385 781 470 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Proportion</key>
+ <string>50%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>428pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Find</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXProjectFindModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>1C530D58069F1CE1000CFCEE</string>
+ <string>1C530D59069F1CE1000CFCEE</string>
+ <string>1CDD528C0622207200134675</string>
+ <string>1C530D5A069F1CE1000CFCEE</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CD0528E0623707200166675</string>
+ </array>
+ <key>WindowString</key>
+ <string>62 385 781 470 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>MENUSEPARATOR</string>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.debuggerConsole</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAAC065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debugger Console</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {399, 310}}</string>
+ <key>RubberWindowFrame</key>
+ <string>1041 94 399 351 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Proportion</key>
+ <string>310pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>310pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger Console</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugCLIModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAAD065D492600B07095</string>
+ <string>3832AD0C0DA515020040DA7A</string>
+ <string>1C78EAAC065D492600B07095</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.consoleV3</string>
+ <key>WindowString</key>
+ <string>1041 94 399 351 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C78EAAD065D492600B07095</string>
+ <key>WindowToolIsVisible</key>
+ <true/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.snapshots</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>XCSnapshotModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Snapshots</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCSnapshotModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <string>Yes</string>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.snapshots</string>
+ <key>WindowString</key>
+ <string>315 824 300 550 0 0 1440 878 </string>
+ <key>WindowToolIsVisible</key>
+ <string>Yes</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.scm</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB2065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>&lt;No Editor&gt;</string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB3065D492600B07095</string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <integer>1</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {452, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD052920623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SCM</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ConsoleFrame</key>
+ <string>{{0, 259}, {452, 0}}</string>
+ <key>Frame</key>
+ <string>{{0, 7}, {452, 259}}</string>
+ <key>RubberWindowFrame</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ <key>TableConfiguration</key>
+ <array>
+ <string>Status</string>
+ <real>30</real>
+ <string>FileName</string>
+ <real>199</real>
+ <string>Path</string>
+ <real>197.09500122070312</real>
+ </array>
+ <key>TableFrame</key>
+ <string>{{0, 0}, {452, 250}}</string>
+ </dict>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Proportion</key>
+ <string>262pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>266pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>SCM</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXCVSModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C78EAB4065D492600B07095</string>
+ <string>1C78EAB5065D492600B07095</string>
+ <string>1C78EAB2065D492600B07095</string>
+ <string>1CD052920623707200166675</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.scm</string>
+ <key>WindowString</key>
+ <string>743 379 452 308 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.breakpoints</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>no</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>168</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {168, 350}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>0</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {185, 368}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>168</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>185pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA1AED706398EBD00589147</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{190, 0}, {554, 368}}</string>
+ <key>RubberWindowFrame</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>554pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>368pt</string>
+ </dict>
+ </array>
+ <key>MajorVersion</key>
+ <integer>3</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Breakpoints</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <string>1CDDB66907F98D9800BB5817</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CA1AED706398EBD00589147</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.breakpointsV3</string>
+ <key>WindowString</key>
+ <string>315 424 744 409 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1CDDB66807F98D9800BB5817</string>
+ <key>WindowToolIsVisible</key>
+ <integer>1</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugAnimator</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debug Visualizer</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXNavigatorGroup</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>1</integer>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugAnimatorV3</string>
+ <key>WindowString</key>
+ <string>100 100 700 500 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.bookmarks</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Bookmarks</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBookmarksModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowString</key>
+ <string>538 42 401 187 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.projectFormatConflicts</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>XCProjectFormatConflictsModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Format Conflicts</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCProjectFormatConflictsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowContentMinSize</key>
+ <string>450 300</string>
+ <key>WindowString</key>
+ <string>50 850 472 307 0 0 1440 877</string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.classBrowser</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>OptionsSetName</key>
+ <string>Hierarchy, all classes</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA6456E063B45B4001379D8</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Class Browser - NSObject</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ClassesFrame</key>
+ <string>{{0, 0}, {374, 96}}</string>
+ <key>ClassesTreeTableConfiguration</key>
+ <array>
+ <string>PBXClassNameColumnIdentifier</string>
+ <real>208</real>
+ <string>PBXClassBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>Frame</key>
+ <string>{{0, 0}, {630, 331}}</string>
+ <key>MembersFrame</key>
+ <string>{{0, 105}, {374, 395}}</string>
+ <key>MembersTreeTableConfiguration</key>
+ <array>
+ <string>PBXMemberTypeIconColumnIdentifier</string>
+ <real>22</real>
+ <string>PBXMemberNameColumnIdentifier</string>
+ <real>216</real>
+ <string>PBXMemberTypeColumnIdentifier</string>
+ <real>97</real>
+ <string>PBXMemberBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>PBXModuleWindowStatusBarHidden2</key>
+ <integer>1</integer>
+ <key>RubberWindowFrame</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Class Browser</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXClassBrowserModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <string>1C0AD2B0069F1E9B00FABCE6</string>
+ <string>1CA6456E063B45B4001379D8</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.classbrowser</string>
+ <key>WindowString</key>
+ <string>385 179 630 352 0 0 1440 878 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <integer>0</integer>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.refactoring</string>
+ <key>IncludeInToolsMenu</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{0, 0}, {500, 335}</string>
+ <key>RubberWindowFrame</key>
+ <string>{0, 0}, {500, 335}</string>
+ </dict>
+ <key>Module</key>
+ <string>XCRefactoringModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Refactoring</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCRefactoringModule</string>
+ </array>
+ <key>WindowString</key>
+ <string>200 200 500 356 0 0 1920 1200 </string>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/CocoaMySQL.xcodeproj/abhi.pbxuser b/CocoaMySQL.xcodeproj/abhi.pbxuser
new file mode 100644
index 00000000..a1d48254
--- /dev/null
+++ b/CocoaMySQL.xcodeproj/abhi.pbxuser
@@ -0,0 +1,1114 @@
+// !$*UTF8*$!
+{
+ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
+ activeArchitecture = ppc;
+ activeBuildConfigurationName = Development;
+ activeExecutable = 38B873E00DA3ABFE009FC6AE /* CocoaMySQL */;
+ activeTarget = 9B9ACE9008DEBE70009E313E /* CocoaMySQL */;
+ codeSenseManager = 38B8740E0DA3AC0A009FC6AE /* Code sense */;
+ executables = (
+ 38B873E00DA3ABFE009FC6AE /* CocoaMySQL */,
+ );
+ perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 885,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 228919228;
+ PBXWorkspaceStateSaveDate = 228919228;
+ };
+ perUserProjectItems = {
+ 3832ACFE0DA515020040DA7A /* PBXTextBookmark */ = 3832ACFE0DA515020040DA7A /* PBXTextBookmark */;
+ 3832ACFF0DA515020040DA7A /* PBXTextBookmark */ = 3832ACFF0DA515020040DA7A /* PBXTextBookmark */;
+ 3832AD000DA515020040DA7A /* PBXTextBookmark */ = 3832AD000DA515020040DA7A /* PBXTextBookmark */;
+ 3832AD010DA515020040DA7A /* PBXTextBookmark */ = 3832AD010DA515020040DA7A /* PBXTextBookmark */;
+ 3832AD020DA515020040DA7A /* PBXTextBookmark */ = 3832AD020DA515020040DA7A /* PBXTextBookmark */;
+ 3832AD100DA5154C0040DA7A /* PBXTextBookmark */ = 3832AD100DA5154C0040DA7A /* PBXTextBookmark */;
+ 3832AD110DA515DE0040DA7A /* PBXTextBookmark */ = 3832AD110DA515DE0040DA7A /* PBXTextBookmark */;
+ 3832AD120DA516410040DA7A /* PBXTextBookmark */ = 3832AD120DA516410040DA7A /* PBXTextBookmark */;
+ 3832AD140DA516410040DA7A /* PBXTextBookmark */ = 3832AD140DA516410040DA7A /* PBXTextBookmark */;
+ 3832AD150DA516410040DA7A /* PBXTextBookmark */ = 3832AD150DA516410040DA7A /* PBXTextBookmark */;
+ 3832AD170DA516410040DA7A /* PBXTextBookmark */ = 3832AD170DA516410040DA7A /* PBXTextBookmark */;
+ 3832AD1A0DA519140040DA7A /* PBXTextBookmark */ = 3832AD1A0DA519140040DA7A /* PBXTextBookmark */;
+ 3832AD1B0DA519140040DA7A /* PBXTextBookmark */ = 3832AD1B0DA519140040DA7A /* PBXTextBookmark */;
+ 3832AD1C0DA519140040DA7A /* PBXTextBookmark */ = 3832AD1C0DA519140040DA7A /* PBXTextBookmark */;
+ 3832AD1D0DA519140040DA7A /* PBXTextBookmark */ = 3832AD1D0DA519140040DA7A /* PBXTextBookmark */;
+ 3832AD1E0DA519140040DA7A /* PBXTextBookmark */ = 3832AD1E0DA519140040DA7A /* PBXTextBookmark */;
+ 3832AD1F0DA519560040DA7A /* PBXTextBookmark */ = 3832AD1F0DA519560040DA7A /* PBXTextBookmark */;
+ 3832AD240DA51AEA0040DA7A /* PBXTextBookmark */ = 3832AD240DA51AEA0040DA7A /* PBXTextBookmark */;
+ 3832AD250DA51AEA0040DA7A /* PBXTextBookmark */ = 3832AD250DA51AEA0040DA7A /* PBXTextBookmark */;
+ 3832AD270DA51B210040DA7A /* PBXTextBookmark */ = 3832AD270DA51B210040DA7A /* PBXTextBookmark */;
+ 3832AD280DA51B210040DA7A /* PBXTextBookmark */ = 3832AD280DA51B210040DA7A /* PBXTextBookmark */;
+ 3832AD290DA51B210040DA7A /* PBXTextBookmark */ = 3832AD290DA51B210040DA7A /* PBXTextBookmark */;
+ 3832AD2A0DA51B210040DA7A /* PBXTextBookmark */ = 3832AD2A0DA51B210040DA7A /* PBXTextBookmark */;
+ 3832AD2B0DA51B210040DA7A /* PBXTextBookmark */ = 3832AD2B0DA51B210040DA7A /* PBXTextBookmark */;
+ 3832AD2C0DA51B320040DA7A /* PBXTextBookmark */ = 3832AD2C0DA51B320040DA7A /* PBXTextBookmark */;
+ 3832AD2E0DA51B3C0040DA7A /* PBXTextBookmark */ = 3832AD2E0DA51B3C0040DA7A /* PBXTextBookmark */;
+ 3832AD2F0DA51B4C0040DA7A /* PBXTextBookmark */ = 3832AD2F0DA51B4C0040DA7A /* PBXTextBookmark */;
+ 3832AD310DA51BA40040DA7A /* PBXTextBookmark */ = 3832AD310DA51BA40040DA7A /* PBXTextBookmark */;
+ 3832AD340DA51C0C0040DA7A /* PBXTextBookmark */ = 3832AD340DA51C0C0040DA7A /* PBXTextBookmark */;
+ 3832AD350DA51C260040DA7A /* PBXTextBookmark */ = 3832AD350DA51C260040DA7A /* PBXTextBookmark */;
+ 3832AD370DA51C340040DA7A /* PBXTextBookmark */ = 3832AD370DA51C340040DA7A /* PBXTextBookmark */;
+ 3832AD380DA51C440040DA7A /* PBXTextBookmark */ = 3832AD380DA51C440040DA7A /* PBXTextBookmark */;
+ 3832AD3A0DA51C880040DA7A /* PBXTextBookmark */ = 3832AD3A0DA51C880040DA7A /* PBXTextBookmark */;
+ 3832AD3B0DA51C880040DA7A /* PBXTextBookmark */ = 3832AD3B0DA51C880040DA7A /* PBXTextBookmark */;
+ 3832AD3C0DA51C880040DA7A /* PBXTextBookmark */ = 3832AD3C0DA51C880040DA7A /* PBXTextBookmark */;
+ 3832AD3D0DA51C880040DA7A /* PBXTextBookmark */ = 3832AD3D0DA51C880040DA7A /* PBXTextBookmark */;
+ 3832AD3E0DA51C880040DA7A /* PBXTextBookmark */ = 3832AD3E0DA51C880040DA7A /* PBXTextBookmark */;
+ 3832AD400DA51D700040DA7A /* PBXTextBookmark */ = 3832AD400DA51D700040DA7A /* PBXTextBookmark */;
+ 3832AD430DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD430DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD440DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD440DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD460DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD460DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD480DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD480DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD490DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD490DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD4A0DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD4A0DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD4C0DA51EFC0040DA7A /* PBXTextBookmark */ = 3832AD4C0DA51EFC0040DA7A /* PBXTextBookmark */;
+ 3832AD4D0DA51F140040DA7A /* PBXTextBookmark */ = 3832AD4D0DA51F140040DA7A /* PBXTextBookmark */;
+ 3832AD4E0DA51F140040DA7A /* PBXTextBookmark */ = 3832AD4E0DA51F140040DA7A /* PBXTextBookmark */;
+ 3832AD4F0DA51F140040DA7A /* PBXTextBookmark */ = 3832AD4F0DA51F140040DA7A /* PBXTextBookmark */;
+ 3832AD520DA51F450040DA7A /* PBXTextBookmark */ = 3832AD520DA51F450040DA7A /* PBXTextBookmark */;
+ 3832AD530DA51F450040DA7A /* PBXTextBookmark */ = 3832AD530DA51F450040DA7A /* PBXTextBookmark */;
+ 3832AD540DA51F450040DA7A /* PBXTextBookmark */ = 3832AD540DA51F450040DA7A /* PBXTextBookmark */;
+ 3832AD5B0DA51F890040DA7A /* PBXTextBookmark */ = 3832AD5B0DA51F890040DA7A /* PBXTextBookmark */;
+ 3832AD5D0DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD5D0DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD5E0DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD5E0DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD5F0DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD5F0DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD600DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD600DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD610DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD610DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD620DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD620DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD630DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD630DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD640DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD640DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD650DA5200B0040DA7A /* PBXTextBookmark */ = 3832AD650DA5200B0040DA7A /* PBXTextBookmark */;
+ 3832AD6E0DA523580040DA7A /* PBXTextBookmark */ = 3832AD6E0DA523580040DA7A /* PBXTextBookmark */;
+ 3832AD700DA523830040DA7A /* PBXTextBookmark */ = 3832AD700DA523830040DA7A /* PBXTextBookmark */;
+ 3832AD720DA523A20040DA7A /* PBXTextBookmark */ = 3832AD720DA523A20040DA7A /* PBXTextBookmark */;
+ 3832AD740DA523CA0040DA7A /* PBXTextBookmark */ = 3832AD740DA523CA0040DA7A /* PBXTextBookmark */;
+ 3832AD760DA523DE0040DA7A /* PBXTextBookmark */ = 3832AD760DA523DE0040DA7A /* PBXTextBookmark */;
+ 3832AD780DA5240A0040DA7A /* PBXTextBookmark */ = 3832AD780DA5240A0040DA7A /* PBXTextBookmark */;
+ 3832AD790DA524250040DA7A /* PBXTextBookmark */ = 3832AD790DA524250040DA7A /* PBXTextBookmark */;
+ 3832AD7C0DA524900040DA7A /* PBXTextBookmark */ = 3832AD7C0DA524900040DA7A /* PBXTextBookmark */;
+ 3832AD7D0DA524A00040DA7A /* PBXTextBookmark */ = 3832AD7D0DA524A00040DA7A /* PBXTextBookmark */;
+ 3832AD7F0DA524D40040DA7A /* PBXTextBookmark */ = 3832AD7F0DA524D40040DA7A /* PBXTextBookmark */;
+ 38B874FE0DA3B178009FC6AE = 38B874FE0DA3B178009FC6AE /* PBXBookmark */;
+ 38B874FF0DA3B178009FC6AE = 38B874FF0DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B875010DA3B178009FC6AE = 38B875010DA3B178009FC6AE /* PBXBookmark */;
+ 38B875020DA3B178009FC6AE = 38B875020DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B875030DA3B178009FC6AE = 38B875030DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B875040DA3B178009FC6AE = 38B875040DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B875060DA3B178009FC6AE = 38B875060DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B875070DA3B178009FC6AE = 38B875070DA3B178009FC6AE /* PBXBookmark */;
+ 38B875080DA3B178009FC6AE = 38B875080DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B8750A0DA3B178009FC6AE = 38B8750A0DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B8750B0DA3B178009FC6AE = 38B8750B0DA3B178009FC6AE /* PBXBookmark */;
+ 38B8750C0DA3B178009FC6AE = 38B8750C0DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B8750D0DA3B178009FC6AE = 38B8750D0DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B8750E0DA3B178009FC6AE = 38B8750E0DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B8750F0DA3B178009FC6AE = 38B8750F0DA3B178009FC6AE /* PBXTextBookmark */;
+ 38B875110DA3B178009FC6AE = 38B875110DA3B178009FC6AE /* PBXTextBookmark */;
+ };
+ sourceControlManager = 38B8740D0DA3AC0A009FC6AE /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1063, 18029}}";
+ sepNavSelRange = "{1772, 0}";
+ sepNavVisRange = "{0, 2299}";
+ };
+ };
+ 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1063, 2156}}";
+ sepNavSelRange = "{1757, 17}";
+ sepNavVisRange = "{503, 2186}";
+ };
+ };
+ 3832ACFE0DA515020040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 529";
+ rLen = 9;
+ rLoc = 20749;
+ rType = 0;
+ vrLen = 2882;
+ vrLoc = 18414;
+ };
+ 3832ACFF0DA515020040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 299";
+ rLen = 20;
+ rLoc = 12999;
+ rType = 0;
+ vrLen = 2570;
+ vrLoc = 13078;
+ };
+ 3832AD000DA515020040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 48";
+ rLen = 0;
+ rLoc = 2193;
+ rType = 0;
+ vrLen = 1913;
+ vrLoc = 570;
+ };
+ 3832AD010DA515020040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 529";
+ rLen = 9;
+ rLoc = 20749;
+ rType = 0;
+ vrLen = 2882;
+ vrLoc = 18414;
+ };
+ 3832AD020DA515020040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 304";
+ rLen = 0;
+ rLoc = 13018;
+ rType = 0;
+ vrLen = 2720;
+ vrLoc = 12092;
+ };
+ 3832AD100DA5154C0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 301";
+ rLen = 0;
+ rLoc = 12975;
+ rType = 0;
+ vrLen = 3394;
+ vrLoc = 10296;
+ };
+ 3832AD110DA515DE0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 309";
+ rLen = 0;
+ rLoc = 13190;
+ rType = 0;
+ vrLen = 2671;
+ vrLoc = 11940;
+ };
+ 3832AD120DA516410040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD130DA516410040DA7A /* NSKeyValueObserving.h */;
+ name = "NSKeyValueObserving.h: 97";
+ rLen = 21;
+ rLoc = 7634;
+ rType = 0;
+ vrLen = 5754;
+ vrLoc = 4282;
+ };
+ 3832AD130DA516410040DA7A /* NSKeyValueObserving.h */ = {
+ isa = PBXFileReference;
+ name = NSKeyValueObserving.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSKeyValueObserving.h;
+ sourceTree = "<absolute>";
+ };
+ 3832AD140DA516410040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 309";
+ rLen = 0;
+ rLoc = 13144;
+ rType = 0;
+ vrLen = 2655;
+ vrLoc = 11996;
+ };
+ 3832AD150DA516410040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD160DA516410040DA7A /* NSKeyValueObserving.h */;
+ name = "NSKeyValueObserving.h: 97";
+ rLen = 21;
+ rLoc = 7634;
+ rType = 0;
+ vrLen = 5754;
+ vrLoc = 4282;
+ };
+ 3832AD160DA516410040DA7A /* NSKeyValueObserving.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSKeyValueObserving.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSKeyValueObserving.h;
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1063, 1903}}";
+ sepNavSelRange = "{442, 25}";
+ sepNavVisRange = "{0, 4341}";
+ };
+ };
+ 3832AD170DA516410040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 310";
+ rLen = 0;
+ rLoc = 13190;
+ rType = 0;
+ vrLen = 2663;
+ vrLoc = 11996;
+ };
+ 3832AD1A0DA519140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 52";
+ rLen = 15;
+ rLoc = 1727;
+ rType = 0;
+ vrLen = 2403;
+ vrLoc = 3;
+ };
+ 3832AD1B0DA519140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 316";
+ rLen = 0;
+ rLoc = 13270;
+ rType = 0;
+ vrLen = 2460;
+ vrLoc = 12938;
+ };
+ 3832AD1C0DA519140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 316";
+ rLen = 0;
+ rLoc = 13270;
+ rType = 0;
+ vrLen = 2460;
+ vrLoc = 12938;
+ };
+ 3832AD1D0DA519140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 52";
+ rLen = 15;
+ rLoc = 1727;
+ rType = 0;
+ vrLen = 2403;
+ vrLoc = 3;
+ };
+ 3832AD1E0DA519140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 218";
+ rLen = 0;
+ rLoc = 9730;
+ rType = 0;
+ vrLen = 3196;
+ vrLoc = 7929;
+ };
+ 3832AD1F0DA519560040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 296";
+ rLen = 0;
+ rLoc = 12947;
+ rType = 0;
+ vrLen = 3549;
+ vrLoc = 9973;
+ };
+ 3832AD240DA51AEA0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "warning: assignment from distinct Objective-C type";
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ rLen = 1;
+ rLoc = 463;
+ rType = 1;
+ };
+ 3832AD250DA51AEA0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 454";
+ rLen = 45;
+ rLoc = 19612;
+ rType = 0;
+ vrLen = 593;
+ vrLoc = 19627;
+ };
+ 3832AD270DA51B210040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 57";
+ rLen = 0;
+ rLoc = 1907;
+ rType = 0;
+ vrLen = 2333;
+ vrLoc = 1256;
+ };
+ 3832AD280DA51B210040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 434";
+ rLen = 0;
+ rLoc = 18901;
+ rType = 0;
+ vrLen = 3212;
+ vrLoc = 18361;
+ };
+ 3832AD290DA51B210040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 242";
+ rLen = 0;
+ rLoc = 10871;
+ rType = 0;
+ vrLen = 3649;
+ vrLoc = 8238;
+ };
+ 3832AD2A0DA51B210040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 57";
+ rLen = 0;
+ rLoc = 1907;
+ rType = 0;
+ vrLen = 2333;
+ vrLoc = 1256;
+ };
+ 3832AD2B0DA51B210040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 241";
+ rLen = 0;
+ rLoc = 10850;
+ rType = 0;
+ vrLen = 4032;
+ vrLoc = 8726;
+ };
+ 3832AD2C0DA51B320040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 454";
+ rLen = 45;
+ rLoc = 19612;
+ rType = 0;
+ vrLen = 529;
+ vrLoc = 19622;
+ };
+ 3832AD2E0DA51B3C0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 241";
+ rLen = 0;
+ rLoc = 10850;
+ rType = 0;
+ vrLen = 4032;
+ vrLoc = 8726;
+ };
+ 3832AD2F0DA51B4C0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 454";
+ rLen = 45;
+ rLoc = 19612;
+ rType = 0;
+ vrLen = 529;
+ vrLoc = 19622;
+ };
+ 3832AD310DA51BA40040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 251";
+ rLen = 0;
+ rLoc = 11375;
+ rType = 0;
+ vrLen = 4123;
+ vrLoc = 8726;
+ };
+ 3832AD340DA51C0C0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 243";
+ rLen = 0;
+ rLoc = 10850;
+ rType = 0;
+ vrLen = 3387;
+ vrLoc = 8726;
+ };
+ 3832AD350DA51C260040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 446";
+ rLen = 45;
+ rLoc = 19612;
+ rType = 0;
+ vrLen = 600;
+ vrLoc = 19433;
+ };
+ 3832AD370DA51C340040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 243";
+ rLen = 0;
+ rLoc = 10850;
+ rType = 0;
+ vrLen = 3412;
+ vrLoc = 8726;
+ };
+ 3832AD380DA51C440040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 446";
+ rLen = 45;
+ rLoc = 19612;
+ rType = 0;
+ vrLen = 596;
+ vrLoc = 19390;
+ };
+ 3832AD3A0DA51C880040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 53";
+ rLen = 19;
+ rLoc = 1776;
+ rType = 0;
+ vrLen = 2339;
+ vrLoc = 1256;
+ };
+ 3832AD3B0DA51C880040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 242";
+ rLen = 0;
+ rLoc = 10850;
+ rType = 0;
+ vrLen = 3478;
+ vrLoc = 8726;
+ };
+ 3832AD3C0DA51C880040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 242";
+ rLen = 0;
+ rLoc = 10850;
+ rType = 0;
+ vrLen = 3478;
+ vrLoc = 8726;
+ };
+ 3832AD3D0DA51C880040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 53";
+ rLen = 19;
+ rLoc = 1776;
+ rType = 0;
+ vrLen = 2339;
+ vrLoc = 1256;
+ };
+ 3832AD3E0DA51C880040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 239";
+ rLen = 0;
+ rLoc = 10652;
+ rType = 0;
+ vrLen = 3418;
+ vrLoc = 8726;
+ };
+ 3832AD400DA51D700040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 38";
+ rLen = 0;
+ rLoc = 1340;
+ rType = 0;
+ vrLen = 1872;
+ vrLoc = 0;
+ };
+ 3832AD430DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 53";
+ rLen = 19;
+ rLoc = 1776;
+ rType = 0;
+ vrLen = 2339;
+ vrLoc = 1256;
+ };
+ 3832AD440DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD450DA51EFC0040DA7A /* NSArrayController.h */;
+ name = "NSArrayController.h: 80";
+ rLen = 32;
+ rLoc = 4003;
+ rType = 0;
+ vrLen = 4258;
+ vrLoc = 1457;
+ };
+ 3832AD450DA51EFC0040DA7A /* NSArrayController.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSArrayController.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSArrayController.h;
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1063, 1287}}";
+ sepNavSelRange = "{4025, 0}";
+ sepNavVisRange = "{1356, 4345}";
+ };
+ };
+ 3832AD460DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD470DA51EFC0040DA7A /* NSTextStorage.h */;
+ name = "NSTextStorage.h: 92";
+ rLen = 54;
+ rLoc = 4353;
+ rType = 0;
+ vrLen = 3366;
+ vrLoc = 1110;
+ };
+ 3832AD470DA51EFC0040DA7A /* NSTextStorage.h */ = {
+ isa = PBXFileReference;
+ name = NSTextStorage.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextStorage.h;
+ sourceTree = "<absolute>";
+ };
+ 3832AD480DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 40";
+ rLen = 13;
+ rLoc = 1536;
+ rType = 0;
+ vrLen = 2134;
+ vrLoc = 0;
+ };
+ 3832AD490DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 53";
+ rLen = 19;
+ rLoc = 1776;
+ rType = 0;
+ vrLen = 2339;
+ vrLoc = 1256;
+ };
+ 3832AD4A0DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD4B0DA51EFC0040DA7A /* NSTextStorage.h */;
+ name = "NSTextStorage.h: 92";
+ rLen = 54;
+ rLoc = 4353;
+ rType = 0;
+ vrLen = 3366;
+ vrLoc = 1110;
+ };
+ 3832AD4B0DA51EFC0040DA7A /* NSTextStorage.h */ = {
+ isa = PBXFileReference;
+ name = NSTextStorage.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSTextStorage.h;
+ sourceTree = "<absolute>";
+ };
+ 3832AD4C0DA51EFC0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 46";
+ rLen = 0;
+ rLoc = 1772;
+ rType = 0;
+ vrLen = 2271;
+ vrLoc = 0;
+ };
+ 3832AD4D0DA51F140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 34";
+ rLen = 55;
+ rLoc = 1192;
+ rType = 0;
+ vrLen = 2269;
+ vrLoc = 0;
+ };
+ 3832AD4E0DA51F140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 34";
+ rLen = 55;
+ rLoc = 1192;
+ rType = 0;
+ vrLen = 2269;
+ vrLoc = 0;
+ };
+ 3832AD4F0DA51F140040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 190";
+ rLen = 0;
+ rLoc = 6252;
+ rType = 0;
+ vrLen = 2490;
+ vrLoc = 3762;
+ };
+ 3832AD520DA51F450040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 190";
+ rLen = 0;
+ rLoc = 6252;
+ rType = 0;
+ vrLen = 2490;
+ vrLoc = 3762;
+ };
+ 3832AD530DA51F450040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 190";
+ rLen = 0;
+ rLoc = 6252;
+ rType = 0;
+ vrLen = 2490;
+ vrLoc = 3762;
+ };
+ 3832AD540DA51F450040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 45";
+ rLen = 0;
+ rLoc = 1667;
+ rType = 0;
+ vrLen = 2275;
+ vrLoc = 0;
+ };
+ 3832AD5B0DA51F890040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 34";
+ rLen = 0;
+ rLoc = 1192;
+ rType = 0;
+ vrLen = 2335;
+ vrLoc = 0;
+ };
+ 3832AD5D0DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320C029E966601566C24 /* MainController.h */;
+ name = "MainController.h: 46";
+ rLen = 27;
+ rLoc = 1585;
+ rType = 0;
+ vrLen = 2351;
+ vrLoc = 0;
+ };
+ 3832AD5E0DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD450DA51EFC0040DA7A /* NSArrayController.h */;
+ name = "NSArrayController.h: 80";
+ rLen = 0;
+ rLoc = 4025;
+ rType = 0;
+ vrLen = 4345;
+ vrLoc = 1356;
+ };
+ 3832AD5F0DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 53";
+ rLen = 17;
+ rLoc = 1757;
+ rType = 0;
+ vrLen = 2186;
+ vrLoc = 503;
+ };
+ 3832AD600DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD160DA516410040DA7A /* NSKeyValueObserving.h */;
+ name = "NSKeyValueObserving.h: 22";
+ rLen = 25;
+ rLoc = 442;
+ rType = 0;
+ vrLen = 4341;
+ vrLoc = 0;
+ };
+ 3832AD610DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 529";
+ rLen = 9;
+ rLoc = 20749;
+ rType = 0;
+ vrLen = 2992;
+ vrLoc = 18365;
+ };
+ 3832AD620DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 40";
+ rLen = 0;
+ rLoc = 1340;
+ rType = 0;
+ vrLen = 2338;
+ vrLoc = 0;
+ };
+ 3832AD630DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 529";
+ rLen = 9;
+ rLoc = 20749;
+ rType = 0;
+ vrLen = 2992;
+ vrLoc = 18365;
+ };
+ 3832AD640DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 3832AD160DA516410040DA7A /* NSKeyValueObserving.h */;
+ name = "NSKeyValueObserving.h: 22";
+ rLen = 25;
+ rLoc = 442;
+ rType = 0;
+ vrLen = 4341;
+ vrLoc = 0;
+ };
+ 3832AD650DA5200B0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 40";
+ rLen = 0;
+ rLoc = 1340;
+ rType = 0;
+ vrLen = 2359;
+ vrLoc = 0;
+ };
+ 3832AD6E0DA523580040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 40";
+ rLen = 0;
+ rLoc = 1340;
+ rType = 0;
+ vrLen = 2361;
+ vrLoc = 0;
+ };
+ 3832AD700DA523830040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 40";
+ rLen = 0;
+ rLoc = 1340;
+ rType = 0;
+ vrLen = 2395;
+ vrLoc = 0;
+ };
+ 3832AD720DA523A20040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 81";
+ rLen = 0;
+ rLoc = 2474;
+ rType = 0;
+ vrLen = 2122;
+ vrLoc = 1543;
+ };
+ 3832AD740DA523CA0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 81";
+ rLen = 0;
+ rLoc = 2474;
+ rType = 0;
+ vrLen = 2121;
+ vrLoc = 1543;
+ };
+ 3832AD760DA523DE0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 81";
+ rLen = 0;
+ rLoc = 2474;
+ rType = 0;
+ vrLen = 2108;
+ vrLoc = 1543;
+ };
+ 3832AD780DA5240A0040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 87";
+ rLen = 0;
+ rLoc = 2643;
+ rType = 0;
+ vrLen = 2299;
+ vrLoc = 1644;
+ };
+ 3832AD790DA524250040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 41";
+ rLen = 0;
+ rLoc = 1533;
+ rType = 0;
+ vrLen = 2399;
+ vrLoc = 0;
+ };
+ 3832AD7C0DA524900040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 40";
+ rLen = 0;
+ rLoc = 1432;
+ rType = 0;
+ vrLen = 2359;
+ vrLoc = 0;
+ };
+ 3832AD7D0DA524A00040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 45";
+ rLen = 0;
+ rLoc = 1667;
+ rType = 0;
+ vrLen = 2324;
+ vrLoc = 0;
+ };
+ 3832AD7F0DA524D40040DA7A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 46";
+ rLen = 0;
+ rLoc = 1772;
+ rType = 0;
+ vrLen = 2299;
+ vrLoc = 0;
+ };
+ 38B873E00DA3ABFE009FC6AE /* CocoaMySQL */ = {
+ isa = PBXExecutable;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ breakpointsEnabled = 0;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ dylibVariantSuffix = "";
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = CocoaMySQL;
+ sourceDirectories = (
+ );
+ };
+ 38B8740D0DA3AC0A009FC6AE /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ };
+ };
+ 38B8740E0DA3AC0A009FC6AE /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ 38B874FE0DA3B178009FC6AE /* PBXBookmark */ = {
+ isa = PBXBookmark;
+ fRef = F52FA4AE0509F05101000103 /* columndelete.tiff */;
+ };
+ 38B874FF0DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 38B875000DA3B178009FC6AE /* MCPKit_bundled.h */;
+ name = "MCPKit_bundled.h: 10";
+ rLen = 0;
+ rLoc = 377;
+ rType = 0;
+ vrLen = 1321;
+ vrLoc = 0;
+ };
+ 38B875000DA3B178009FC6AE /* MCPKit_bundled.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = MCPKit_bundled.h;
+ path = /Users/abhi/Desktop/CocoaMySQL/MCPKit_bundled.framework/Headers/MCPKit_bundled.h;
+ sourceTree = "<absolute>";
+ };
+ 38B875010DA3B178009FC6AE /* PBXBookmark */ = {
+ isa = PBXBookmark;
+ fRef = F503C88F02B387CB01C66673 /* appicon.icns */;
+ };
+ 38B875020DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 361";
+ rLen = 7;
+ rLoc = 13264;
+ rType = 0;
+ vrLen = 3353;
+ vrLoc = 12296;
+ };
+ 38B875030DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 52";
+ rLen = 15;
+ rLoc = 1727;
+ rType = 0;
+ vrLen = 2382;
+ vrLoc = 23;
+ };
+ 38B875040DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 38B875050DA3B178009FC6AE /* NSPopUpButton.h */;
+ name = "NSPopUpButton.h: 65";
+ rLen = 0;
+ rLoc = 1905;
+ rType = 0;
+ vrLen = 2147;
+ vrLoc = 341;
+ };
+ 38B875050DA3B178009FC6AE /* NSPopUpButton.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSPopUpButton.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSPopUpButton.h;
+ sourceTree = "<absolute>";
+ };
+ 38B875060DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 71";
+ rLen = 0;
+ rLoc = 2643;
+ rType = 0;
+ vrLen = 1903;
+ vrLoc = 903;
+ };
+ 38B875070DA3B178009FC6AE /* PBXBookmark */ = {
+ isa = PBXBookmark;
+ fRef = F52FA4AE0509F05101000103 /* columndelete.tiff */;
+ };
+ 38B875080DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 38B875090DA3B178009FC6AE /* MCPKit_bundled.h */;
+ name = "MCPKit_bundled.h: 10";
+ rLen = 0;
+ rLoc = 377;
+ rType = 0;
+ vrLen = 1321;
+ vrLoc = 0;
+ };
+ 38B875090DA3B178009FC6AE /* MCPKit_bundled.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = MCPKit_bundled.h;
+ path = /Users/abhi/Desktop/CocoaMySQL/MCPKit_bundled.framework/Headers/MCPKit_bundled.h;
+ sourceTree = "<absolute>";
+ };
+ 38B8750A0DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 2507;
+ vrLoc = 0;
+ };
+ 38B8750B0DA3B178009FC6AE /* PBXBookmark */ = {
+ isa = PBXBookmark;
+ fRef = F503C88F02B387CB01C66673 /* appicon.icns */;
+ };
+ 38B8750C0DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = F5FB320D029E966601566C24 /* MainController.m */;
+ name = "MainController.m: 361";
+ rLen = 7;
+ rLoc = 13264;
+ rType = 0;
+ vrLen = 3353;
+ vrLoc = 12296;
+ };
+ 38B8750D0DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 52";
+ rLen = 15;
+ rLoc = 1727;
+ rType = 0;
+ vrLen = 2421;
+ vrLoc = 23;
+ };
+ 38B8750E0DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */;
+ name = "TableDocument.h: 52";
+ rLen = 15;
+ rLoc = 1727;
+ rType = 0;
+ vrLen = 2382;
+ vrLoc = 23;
+ };
+ 38B8750F0DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 38B875100DA3B178009FC6AE /* NSPopUpButton.h */;
+ name = "NSPopUpButton.h: 65";
+ rLen = 0;
+ rLoc = 1905;
+ rType = 0;
+ vrLen = 2147;
+ vrLoc = 341;
+ };
+ 38B875100DA3B178009FC6AE /* NSPopUpButton.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSPopUpButton.h;
+ path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/AppKit.framework/Versions/C/Headers/NSPopUpButton.h;
+ sourceTree = "<absolute>";
+ };
+ 38B875110DA3B178009FC6AE /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */;
+ name = "TableDocument.m: 70";
+ rLen = 0;
+ rLoc = 2643;
+ rType = 0;
+ vrLen = 2598;
+ vrLoc = 1213;
+ };
+ 9B9ACE9008DEBE70009E313E /* CocoaMySQL */ = {
+ activeExec = 0;
+ executables = (
+ 38B873E00DA3ABFE009FC6AE /* CocoaMySQL */,
+ );
+ };
+ F5FB320C029E966601566C24 /* MainController.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1063, 1265}}";
+ sepNavSelRange = "{1585, 27}";
+ sepNavVisRange = "{0, 2351}";
+ };
+ };
+ F5FB320D029E966601566C24 /* MainController.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1063, 9086}}";
+ sepNavSelRange = "{20749, 9}";
+ sepNavVisRange = "{18365, 2992}";
+ };
+ };
+}
diff --git a/CocoaMySQL.xcodeproj/ide.pbxuser b/CocoaMySQL.xcodeproj/ide.pbxuser
new file mode 100644
index 00000000..560e22ae
--- /dev/null
+++ b/CocoaMySQL.xcodeproj/ide.pbxuser
@@ -0,0 +1,222 @@
+// !$*UTF8*$!
+{
+ 2A37F4A9FDCFA73011CA2CEA = {
+ activeBuildStyle = 4A9504D1FFE6A4CB11CA0CBA;
+ activeExecutable = F548086C027F826801DDA526;
+ activeTarget = 2A37F4C6FDCFA73011CA2CEA;
+ addToTargets = (
+ 2A37F4C6FDCFA73011CA2CEA,
+ );
+ breakpoints = (
+ );
+ executables = (
+ F548086C027F826801DDA526,
+ );
+ perUserDictionary = {
+ PBXPerProjectTemplateStateSaveDate = 93297208;
+ PBXWorkspaceContents = (
+ {
+ LeftSlideOut = {
+ Split0 = {
+ Split0 = {
+ NavCount = 1;
+ NavGeometry0 = {
+ Frame = "{{0, 0}, {761, 595}}";
+ NavBarVisible = YES;
+ };
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Debugger = {
+ Split0 = {
+ SplitCount = 2;
+ };
+ SplitCount = 1;
+ TabCount = 2;
+ };
+ LauncherConfigVersion = 7;
+ };
+ Tab1 = {
+ LauncherConfigVersion = 3;
+ Runner = {
+ };
+ };
+ TabCount = 4;
+ };
+ SplitCount = 1;
+ Tab1 = {
+ OptionsSetName = "Hierarchy, all classes";
+ };
+ TabCount = 5;
+ };
+ },
+ );
+ PBXWorkspaceGeometries = (
+ {
+ ContentSize = "{1045, 618}";
+ LeftSlideOut = {
+ ActiveTab = 0;
+ Collapsed = NO;
+ Frame = "{{0, 23}, {1045, 595}}";
+ Split0 = {
+ Collapsed = NO;
+ Frame = "{{284, 0}, {761, 595}}";
+ Split0 = {
+ Frame = "{{0, 0}, {761, 595}}";
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Debugger = {
+ Collapsed = NO;
+ Frame = "{{0, 0}, {681, 289}}";
+ Split0 = {
+ Frame = "{{0, 24}, {681, 265}}";
+ Split0 = {
+ Frame = "{{0, 0}, {333, 265}}";
+ };
+ Split1 = {
+ DebugVariablesTableConfiguration = (
+ Name,
+ 123,
+ Value,
+ 85,
+ Summary,
+ 105.123,
+ );
+ Frame = "{{342, 0}, {339, 265}}";
+ };
+ SplitCount = 2;
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Frame = "{{0, 0}, {100, 50}}";
+ };
+ Tab1 = {
+ Frame = "{{0, 0}, {100, 50}}";
+ };
+ TabCount = 2;
+ TabsVisible = YES;
+ };
+ Frame = "{{0, 0}, {681, 289}}";
+ LauncherConfigVersion = 7;
+ };
+ Tab1 = {
+ Frame = "{{0, 0}, {681, 120}}";
+ LauncherConfigVersion = 3;
+ Runner = {
+ Frame = "{{0, 0}, {681, 120}}";
+ };
+ };
+ Tab2 = {
+ BuildMessageFrame = "{{0, 0}, {683, 127}}";
+ BuildTranscriptFrame = "{{0, 136}, {683, 100}}";
+ Frame = "{{0, 0}, {681, 234}}";
+ };
+ Tab3 = {
+ Frame = "{{0, 0}, {681, 238}}";
+ };
+ TabCount = 4;
+ TabsVisible = NO;
+ };
+ SplitCount = 1;
+ Tab0 = {
+ Frame = "{{0, 0}, {260, 595}}";
+ GroupTreeTableConfiguration = (
+ TargetStatusColumn,
+ 18,
+ MainColumn,
+ 227,
+ );
+ };
+ Tab1 = {
+ ClassesFrame = "{{0, 0}, {250, 326}}";
+ ClassesTreeTableConfiguration = (
+ PBXBookColumnIdentifier,
+ 20,
+ PBXClassColumnIdentifier,
+ 207,
+ );
+ Frame = "{{0, 0}, {248, 544}}";
+ MembersFrame = "{{0, 335}, {250, 209}}";
+ MembersTreeTableConfiguration = (
+ PBXBookColumnIdentifier,
+ 20,
+ PBXMethodColumnIdentifier,
+ 206,
+ );
+ };
+ Tab2 = {
+ Frame = "{{0, 0}, {217, 544}}";
+ };
+ Tab3 = {
+ Frame = "{{0, 0}, {239, 595}}";
+ TargetTableConfiguration = (
+ ActiveObject,
+ 16,
+ ObjectNames,
+ 206.296,
+ );
+ };
+ Tab4 = {
+ BreakpointsTreeTableConfiguration = (
+ breakpointColumn,
+ 197,
+ enabledColumn,
+ 31,
+ );
+ Frame = "{{0, 0}, {250, 544}}";
+ };
+ TabCount = 5;
+ TabsVisible = YES;
+ };
+ StatusViewVisible = YES;
+ Template = 64ABBB4501FA494900185B06;
+ ToolbarVisible = YES;
+ WindowLocation = "{53, 61}";
+ },
+ );
+ PBXWorkspaceStateSaveDate = 93297208;
+ };
+ projectwideBuildSettings = {
+ };
+ wantsIndex = 1;
+ wantsSCM = -1;
+ };
+ 2A37F4C6FDCFA73011CA2CEA = {
+ activeExec = 0;
+ executables = (
+ F548086C027F826801DDA526,
+ );
+ };
+ F548086C027F826801DDA526 = {
+ activeArgIndex = 2147483647;
+ argumentStrings = (
+ );
+ debuggerPlugin = GDBDebugging;
+ dylibVariantSuffix = "";
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ isa = PBXExecutable;
+ name = CocoaMySQL;
+ shlibInfoDictList = (
+ );
+ sourceDirectories = (
+ );
+ };
+ F548087B027F870A01DDA526 = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{3, 239}, {750, 502}}";
+ };
+ };
+ F570FC9502A05DFD0127F14A = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{38, 218}, {750, 502}}";
+ };
+ };
+ F5A1A33B02A16816018594E7 = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{15, 239}, {750, 502}}";
+ };
+ };
+}
diff --git a/CocoaMySQL.xcodeproj/ltextor.mode1 b/CocoaMySQL.xcodeproj/ltextor.mode1
new file mode 100644
index 00000000..0149ac77
--- /dev/null
+++ b/CocoaMySQL.xcodeproj/ltextor.mode1
@@ -0,0 +1,1332 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActivePerspectiveName</key>
+ <string>Project</string>
+ <key>AllowedModules</key>
+ <array>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Name</key>
+ <string>Groups and Files Outline View</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Name</key>
+ <string>Editor</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCTaskListModule</string>
+ <key>Name</key>
+ <string>Task List</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Name</key>
+ <string>File and Smart Group Detail Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Name</key>
+ <string>Detailed Build Results Viewer</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Name</key>
+ <string>Project Batch Find Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXRunSessionModule</string>
+ <key>Name</key>
+ <string>Run Log</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Name</key>
+ <string>Bookmarks Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Name</key>
+ <string>Class Browser</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Name</key>
+ <string>Source Code Control Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXDebugBreakpointsModule</string>
+ <key>Name</key>
+ <string>Debug Breakpoints Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>XCDockableInspector</string>
+ <key>Name</key>
+ <string>Inspector</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>n</string>
+ <key>Module</key>
+ <string>PBXOpenQuicklyModule</string>
+ <key>Name</key>
+ <string>Open Quickly Tool</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Name</key>
+ <string>Debugger</string>
+ </dict>
+ <dict>
+ <key>BundleLoadPath</key>
+ <string></string>
+ <key>MaxInstances</key>
+ <string>1</string>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Name</key>
+ <string>Debug Console</string>
+ </dict>
+ </array>
+ <key>Description</key>
+ <string>DefaultDescriptionKey</string>
+ <key>DockingSystemVisible</key>
+ <false/>
+ <key>Extension</key>
+ <string>mode1</string>
+ <key>FavBarConfig</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>9B85DF5108918B5100229178</string>
+ <key>XCBarModuleItemNames</key>
+ <dict/>
+ <key>XCBarModuleItems</key>
+ <array/>
+ </dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>com.apple.perspectives.project.mode1</string>
+ <key>MajorVersion</key>
+ <integer>31</integer>
+ <key>MinorVersion</key>
+ <integer>1</integer>
+ <key>Name</key>
+ <string>Default</string>
+ <key>Notifications</key>
+ <array/>
+ <key>OpenEditors</key>
+ <array/>
+ <key>PerspectiveWidths</key>
+ <array>
+ <integer>-1</integer>
+ <integer>-1</integer>
+ </array>
+ <key>Perspectives</key>
+ <array>
+ <dict>
+ <key>ChosenToolbarItems</key>
+ <array>
+ <string>active-target-popup</string>
+ <string>action</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>buildOrClean</string>
+ <string>build-and-runOrDebug</string>
+ <string>com.apple.ide.PBXToolbarStopButton</string>
+ <string>get-info</string>
+ <string>toggle-editor</string>
+ <string>NSToolbarFlexibleSpaceItem</string>
+ <string>com.apple.pbx.toolbar.searchfield</string>
+ </array>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProjectWithEditor</string>
+ <key>Identifier</key>
+ <string>perspective.project</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>2A37F4AAFDCFA73011CA2CEA</string>
+ <string>2A37F4ABFDCFA73011CA2CEA</string>
+ <string>F52BA07F03BA15DA0100012B</string>
+ <string>1C37FBAC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>21</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 2}, {186, 408}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <true/>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 426}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>56 268 998 467 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>203pt</string>
+ </dict>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20306471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ <key>PBXSplitModuleInNavigatorKey</key>
+ <dict>
+ <key>Split0</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20406471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ </dict>
+ <key>SplitCount</key>
+ <string>1</string>
+ </dict>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {790, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>56 268 998 467 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B20506471E060097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 5}, {790, 421}}</string>
+ <key>RubberWindowFrame</key>
+ <string>56 268 998 467 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>421pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>790pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCModuleDock</string>
+ <string>PBXNavigatorGroup</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>9BA6E2B60A8602AD00A75118</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>9BA6E2B70A8602AD00A75118</string>
+ <string>1CE0B20306471E060097A5F4</string>
+ <string>1CE0B20506471E060097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default</string>
+ </dict>
+ <dict>
+ <key>ControllerClassBaseName</key>
+ <string></string>
+ <key>IconName</key>
+ <string>WindowOfProject</string>
+ <key>Identifier</key>
+ <string>perspective.morph</string>
+ <key>IsVertical</key>
+ <integer>0</integer>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <integer>1</integer>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C37FBAC04509CD000000102</string>
+ <string>1C37FAAC04509CD000000102</string>
+ <string>1C08E77C0454961000C914BD</string>
+ <string>1C37FABC05509CD000000102</string>
+ <string>1C37FABC05539CD112110102</string>
+ <string>E2644B35053B69B200211256</string>
+ <string>1C37FABC04509CD000100104</string>
+ <string>1CC0EA4004350EF90044410B</string>
+ <string>1CC0EA4004350EF90041110B</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>yes</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>186</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>29B97314FDCFA39411CA2CEA</string>
+ <string>1C37FABC05509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {186, 337}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <integer>1</integer>
+ <key>XCSharingToken</key>
+ <string>com.apple.Xcode.GFSharingToken</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {203, 355}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>186</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>373 269 690 397 0 0 1440 878 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Morph</string>
+ <key>PreferredWidth</key>
+ <integer>300</integer>
+ <key>ServiceClasses</key>
+ <array>
+ <string>XCModuleDock</string>
+ <string>PBXSmartGroupTreeModule</string>
+ </array>
+ <key>TableOfContents</key>
+ <array>
+ <string>11E0B1FE06471DED0097A5F4</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.default.short</string>
+ </dict>
+ </array>
+ <key>PerspectivesBarVisible</key>
+ <false/>
+ <key>PinnedNavigatorIdentifier</key>
+ <string>9BA6E2D40A861B0000A75118</string>
+ <key>ShelfIsVisible</key>
+ <false/>
+ <key>SourceDescription</key>
+ <string>file at '/System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TimeStamp</key>
+ <real>0.0</real>
+ <key>ToolbarDisplayMode</key>
+ <integer>1</integer>
+ <key>ToolbarIsVisible</key>
+ <true/>
+ <key>ToolbarSizeMode</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Perspectives</string>
+ <key>UpdateMessage</key>
+ <string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'?</string>
+ <key>WindowJustification</key>
+ <integer>5</integer>
+ <key>WindowOrderList</key>
+ <array>
+ <string>1C0AD2B3069F1EA900FABCE6</string>
+ <string>9BB3828108C1B62A006B0957</string>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>/Users/ltextor/Documents/30_Developer/CocoaMySQL/CocoaMySQL/CocoaMySQL.xcodeproj</string>
+ </array>
+ <key>WindowString</key>
+ <string>56 268 998 467 0 0 1152 746 </string>
+ <key>WindowTools</key>
+ <array>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.build</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528F0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {1045, 259}}</string>
+ <key>RubberWindowFrame</key>
+ <string>76 149 1045 541 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>259pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBuildLogShowsTranscriptDefaultKey</key>
+ <string>{{0, 5}, {1045, 231}}</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Build</string>
+ <key>XCBuildResultsTrigger_Collapse</key>
+ <integer>1021</integer>
+ <key>XCBuildResultsTrigger_Open</key>
+ <integer>1011</integer>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 264}, {1045, 236}}</string>
+ <key>RubberWindowFrame</key>
+ <string>76 149 1045 541 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXBuildResultsModule</string>
+ <key>Proportion</key>
+ <string>236pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>500pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Build Results</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBuildResultsModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>9BB3828108C1B62A006B0957</string>
+ <string>9BA6E2C70A8618B600A75118</string>
+ <string>1CD0528F0623707200166675</string>
+ <string>XCMainBuildResultsModuleGUID</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.build</string>
+ <key>WindowString</key>
+ <string>76 149 1045 541 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>9BB3828108C1B62A006B0957</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.debugger</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>Debugger</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {138, 132}}</string>
+ <string>{{138, 0}, {556, 132}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {694, 132}}</string>
+ <string>{{0, 132}, {694, 249}}</string>
+ </array>
+ </dict>
+ </dict>
+ <key>LauncherConfigVersion</key>
+ <string>8</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C162984064C10D400B95A72</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debug - GLUTExamples (Underwater)</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>DebugConsoleDrawerSize</key>
+ <string>{100, 120}</string>
+ <key>DebugConsoleVisible</key>
+ <string>None</string>
+ <key>DebugConsoleWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>DebugSTDIOWindowFrame</key>
+ <string>{{200, 200}, {500, 300}}</string>
+ <key>Frame</key>
+ <string>{{0, 0}, {694, 381}}</string>
+ <key>RubberWindowFrame</key>
+ <string>76 268 694 422 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugSessionModule</string>
+ <key>Proportion</key>
+ <string>381pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>381pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <string>9B4A7BB409B0EBFE0066EA39</string>
+ <string>1C162984064C10D400B95A72</string>
+ <string>9B4A7BB509B0EBFE0066EA39</string>
+ <string>9B4A7BB609B0EBFE0066EA39</string>
+ <string>9B4A7BB709B0EBFE0066EA39</string>
+ <string>9B4A7BB809B0EBFE0066EA39</string>
+ <string>9B4A7BB909B0EBFE0066EA39</string>
+ <string>9B4A7BBA09B0EBFE0066EA39</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debug</string>
+ <key>WindowString</key>
+ <string>76 268 694 422 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>1CD10A99069EF8BA00B06720</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.find</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CDD528C0622207200134675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>TableContent.m</string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {840, 317}}</string>
+ <key>RubberWindowFrame</key>
+ <string>228 17 840 575 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>840pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>317pt</string>
+ </dict>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528E0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Project Find</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 322}, {840, 212}}</string>
+ <key>RubberWindowFrame</key>
+ <string>228 17 840 575 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXProjectFindModule</string>
+ <key>Proportion</key>
+ <string>212pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>534pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Project Find</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXProjectFindModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <string>9BA6E2C10A8615A000A75118</string>
+ <string>9BA6E2C20A8615A000A75118</string>
+ <string>1CDD528C0622207200134675</string>
+ <string>1CD0528E0623707200166675</string>
+ </array>
+ <key>WindowString</key>
+ <string>228 17 840 575 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>1C530D57069F1CE1000CFCEE</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>MENUSEPARATOR</string>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.debuggerConsole</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAAC065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Debugger Console</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {440, 358}}</string>
+ <key>RubberWindowFrame</key>
+ <string>76 290 440 400 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXDebugCLIModule</string>
+ <key>Proportion</key>
+ <string>358pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>359pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debugger Console</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXDebugCLIModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>9BB382AC08C1C73F006B0957</string>
+ <string>9B4A7BBB09B0EBFE0066EA39</string>
+ <string>1C78EAAC065D492600B07095</string>
+ </array>
+ <key>WindowString</key>
+ <string>76 290 440 400 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>9BB382AC08C1C73F006B0957</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.run</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>LauncherConfigVersion</key>
+ <string>3</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD0528B0623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Run</string>
+ <key>Runner</key>
+ <dict>
+ <key>HorizontalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {366, 168}}</string>
+ <string>{{0, 173}, {366, 270}}</string>
+ </array>
+ </dict>
+ <key>VerticalSplitView</key>
+ <dict>
+ <key>_collapsingFrameDimension</key>
+ <real>0.0</real>
+ <key>_indexOfCollapsedView</key>
+ <integer>0</integer>
+ <key>_percentageOfCollapsedView</key>
+ <real>0.0</real>
+ <key>isCollapsed</key>
+ <string>yes</string>
+ <key>sizes</key>
+ <array>
+ <string>{{0, 0}, {406, 443}}</string>
+ <string>{{411, 0}, {517, 443}}</string>
+ </array>
+ </dict>
+ </dict>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {699, 244}}</string>
+ <key>RubberWindowFrame</key>
+ <string>16 72 699 285 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXRunSessionModule</string>
+ <key>Proportion</key>
+ <string>244pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>244pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Run Log</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXRunSessionModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2B3069F1EA900FABCE6</string>
+ <string>9BA6E2C90A8618B600A75118</string>
+ <string>1CD0528B0623707200166675</string>
+ <string>9BA6E2CA0A8618B600A75118</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.run</string>
+ <key>WindowString</key>
+ <string>16 72 699 285 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2B3069F1EA900FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.scm</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1C78EAB2065D492600B07095</string>
+ <key>PBXProjectModuleLabel</key>
+ <string></string>
+ <key>StatusBarVisibility</key>
+ <true/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {452, 0}}</string>
+ <key>RubberWindowFrame</key>
+ <string>55 406 452 308 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>0pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CD052920623707200166675</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>SCM Results</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 5}, {452, 262}}</string>
+ <key>RubberWindowFrame</key>
+ <string>55 406 452 308 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXCVSModule</string>
+ <key>Proportion</key>
+ <string>262pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>267pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>SCM</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXCVSModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>9B85DF4D08918B3C00229178</string>
+ <string>9B85DF4E08918B3C00229178</string>
+ <string>1C78EAB2065D492600B07095</string>
+ <string>1CD052920623707200166675</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.scm</string>
+ <key>WindowString</key>
+ <string>55 406 452 308 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>9B85DF4D08918B3C00229178</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.breakpoints</string>
+ <key>IsVertical</key>
+ <false/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXBottomSmartGroupGIDs</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Files</string>
+ <key>PBXProjectStructureProvided</key>
+ <string>no</string>
+ <key>PBXSmartGroupTreeModuleColumnData</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+ <array>
+ <real>168</real>
+ </array>
+ <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+ <array>
+ <string>MainColumn</string>
+ </array>
+ </dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+ <dict>
+ <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+ <array>
+ <string>1C77FABC04509CD000000102</string>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+ <array>
+ <array>
+ <integer>0</integer>
+ </array>
+ </array>
+ <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+ <string>{{0, 0}, {168, 350}}</string>
+ </dict>
+ <key>PBXTopSmartGroupGIDs</key>
+ <array/>
+ <key>XCIncludePerspectivesSwitch</key>
+ <false/>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{0, 0}, {185, 368}}</string>
+ <key>GroupTreeTableConfiguration</key>
+ <array>
+ <string>MainColumn</string>
+ <real>168</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>26 314 744 409 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXSmartGroupTreeModule</string>
+ <key>Proportion</key>
+ <string>185pt</string>
+ </dict>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA1AED706398EBD00589147</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Detail</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>Frame</key>
+ <string>{{190, 0}, {554, 368}}</string>
+ <key>RubberWindowFrame</key>
+ <string>26 314 744 409 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>XCDetailModule</string>
+ <key>Proportion</key>
+ <string>554pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>368pt</string>
+ </dict>
+ </array>
+ <key>MajorVersion</key>
+ <integer>2</integer>
+ <key>MinorVersion</key>
+ <integer>0</integer>
+ <key>Name</key>
+ <string>Breakpoints</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXSmartGroupTreeModule</string>
+ <string>XCDetailModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>TableOfContents</key>
+ <array>
+ <string>9B7C9D3108E6C32400C5BB18</string>
+ <string>9B7C9D3208E6C32400C5BB18</string>
+ <string>1CE0B1FE06471DED0097A5F4</string>
+ <string>1CA1AED706398EBD00589147</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.breakpoints</string>
+ <key>WindowString</key>
+ <string>26 314 744 409 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>9B7C9D3108E6C32400C5BB18</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.debugAnimator</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXNavigatorGroup</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Debug Visualizer</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXNavigatorGroup</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <true/>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.debugAnimator</string>
+ <key>WindowString</key>
+ <string>100 100 700 500 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>Identifier</key>
+ <string>windowTool.bookmarks</string>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>Module</key>
+ <string>PBXBookmarksModule</string>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>100%</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Bookmarks</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXBookmarksModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <integer>0</integer>
+ <key>WindowString</key>
+ <string>538 42 401 187 0 0 1280 1002 </string>
+ </dict>
+ <dict>
+ <key>FirstTimeWindowDisplayed</key>
+ <false/>
+ <key>Identifier</key>
+ <string>windowTool.classBrowser</string>
+ <key>IsVertical</key>
+ <true/>
+ <key>Layout</key>
+ <array>
+ <dict>
+ <key>Dock</key>
+ <array>
+ <dict>
+ <key>BecomeActive</key>
+ <true/>
+ <key>ContentConfiguration</key>
+ <dict>
+ <key>OptionsSetName</key>
+ <string>Hierarchy, all classes</string>
+ <key>PBXProjectModuleGUID</key>
+ <string>1CA6456E063B45B4001379D8</string>
+ <key>PBXProjectModuleLabel</key>
+ <string>Class Browser - CIImage</string>
+ </dict>
+ <key>GeometryConfiguration</key>
+ <dict>
+ <key>ClassesFrame</key>
+ <string>{{0, 0}, {378, 96}}</string>
+ <key>ClassesTreeTableConfiguration</key>
+ <array>
+ <string>PBXClassNameColumnIdentifier</string>
+ <real>208</real>
+ <string>PBXClassBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>Frame</key>
+ <string>{{0, 0}, {630, 332}}</string>
+ <key>MembersFrame</key>
+ <string>{{0, 101}, {378, 231}}</string>
+ <key>MembersTreeTableConfiguration</key>
+ <array>
+ <string>PBXMemberTypeIconColumnIdentifier</string>
+ <real>22</real>
+ <string>PBXMemberNameColumnIdentifier</string>
+ <real>216</real>
+ <string>PBXMemberTypeColumnIdentifier</string>
+ <real>101</real>
+ <string>PBXMemberBookColumnIdentifier</string>
+ <real>22</real>
+ </array>
+ <key>RubberWindowFrame</key>
+ <string>55 361 630 352 0 0 1152 746 </string>
+ </dict>
+ <key>Module</key>
+ <string>PBXClassBrowserModule</string>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Proportion</key>
+ <string>332pt</string>
+ </dict>
+ </array>
+ <key>Name</key>
+ <string>Class Browser</string>
+ <key>ServiceClasses</key>
+ <array>
+ <string>PBXClassBrowserModule</string>
+ </array>
+ <key>StatusbarIsVisible</key>
+ <false/>
+ <key>TableOfContents</key>
+ <array>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <string>9B3582DA089245D100A9DAEF</string>
+ <string>1CA6456E063B45B4001379D8</string>
+ </array>
+ <key>ToolbarConfiguration</key>
+ <string>xcode.toolbar.config.classbrowser</string>
+ <key>WindowString</key>
+ <string>55 361 630 352 0 0 1152 746 </string>
+ <key>WindowToolGUID</key>
+ <string>1C0AD2AF069F1E9B00FABCE6</string>
+ <key>WindowToolIsVisible</key>
+ <false/>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/CocoaMySQL.xcodeproj/ltextor.pbxuser b/CocoaMySQL.xcodeproj/ltextor.pbxuser
new file mode 100644
index 00000000..e9c9bd79
--- /dev/null
+++ b/CocoaMySQL.xcodeproj/ltextor.pbxuser
@@ -0,0 +1,1005 @@
+// !$*UTF8*$!
+{
+ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
+ activeBuildConfigurationName = Deployment;
+ activeExecutable = 9B9ACEEB08DEBE70009E313E /* CocoaMySQL */;
+ activeTarget = 9B9ACE9008DEBE70009E313E /* CocoaMySQL */;
+ addToTargets = (
+ 9B9ACE9008DEBE70009E313E /* CocoaMySQL */,
+ );
+ breakpoints = (
+ );
+ breakpointsGroup = 9B7C9D3508E6C32B00C5BB18 /* XCBreakpointsBucket */;
+ codeSenseManager = 9BDB824C05F289B800EDF8CE /* Code sense */;
+ executables = (
+ 9B9ACEEB08DEBE70009E313E /* CocoaMySQL */,
+ );
+ perUserDictionary = {
+ "PBXConfiguration.PBXBreakpointsDataSource.v1:1CA1AED706398EBD00589147" = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXBreakpointsDataSource_BreakpointID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 20,
+ 210,
+ 20,
+ 110,
+ 109,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXBreakpointsDataSource_ActionID,
+ PBXBreakpointsDataSource_TypeID,
+ PBXBreakpointsDataSource_BreakpointID,
+ PBXBreakpointsDataSource_UseID,
+ PBXBreakpointsDataSource_LocationID,
+ PBXBreakpointsDataSource_ConditionID,
+ PBXBreakpointsDataSource_ContinueID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 200,
+ 200,
+ 57.5835,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXBookmarksDataSource_LocationID,
+ PBXBookmarksDataSource_NameID,
+ PBXBookmarksDataSource_CommentsID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 498,
+ 243,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXErrorsWarningsDataSource_TypeID,
+ PBXErrorsWarningsDataSource_MessageID,
+ PBXErrorsWarningsDataSource_LocationID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 22,
+ 617,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXExecutablesDataSource_ActiveFlagID,
+ PBXExecutablesDataSource_NameID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 506,
+ 20,
+ 93,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 384,
+ 381,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFindDataSource_MessageID,
+ PBXFindDataSource_LocationID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.PBXSymbolsDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXSymbolsDataSource_SymbolNameID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 16,
+ 200,
+ 50,
+ 183,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXSymbolsDataSource_SymbolTypeIconID,
+ PBXSymbolsDataSource_SymbolNameID,
+ PBXSymbolsDataSource_SymbolTypeID,
+ PBXSymbolsDataSource_ReferenceNameID,
+ );
+ };
+ PBXConfiguration.PBXFileTableDataSource3.XCSCMDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 20,
+ 314,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_SCM_ColumnID,
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 436,
+ 88,
+ 20,
+ 95,
+ 43,
+ 43,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXTargetDataSource_PrimaryAttribute,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 176554662;
+ PBXPrepackagedSmartGroups_v2 = (
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ activationKey = OldTargetSmartGroup;
+ clz = PBXTargetSmartGroup;
+ description = "Displays all targets of the project.";
+ globalID = 1C37FABC04509CD000000102;
+ name = Targets;
+ preferences = {
+ image = Targets;
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXTargetSmartGroup2;
+ description = "Displays all targets of the project as well as nested build phases.";
+ globalID = 1C37FBAC04509CD000000102;
+ name = Targets;
+ preferences = {
+ image = Targets;
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXExecutablesSmartGroup;
+ description = "Displays all executables of the project.";
+ globalID = 1C37FAAC04509CD000000102;
+ name = Executables;
+ preferences = {
+ image = Executable;
+ };
+ },
+ {
+ " PBXTransientLocationAtTop " = bottom;
+ absolutePathToBundle = "";
+ clz = PBXErrorsWarningsSmartGroup;
+ description = "Displays files with errors or warnings.";
+ globalID = 1C08E77C0454961000C914BD;
+ name = "Errors and Warnings";
+ preferences = {
+ fnmatch = "";
+ image = WarningsErrors;
+ recursive = 1;
+ regex = "";
+ root = "<PROJECT>";
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXFilenameSmartGroup;
+ description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+ globalID = 1CC0EA4004350EF90044410B;
+ name = "Implementation Files";
+ preferences = {
+ canSave = 1;
+ fnmatch = "";
+ image = SmartFolder;
+ isLeaf = 0;
+ recursive = 1;
+ regex = "?*\\.[mcMC]";
+ root = "<PROJECT>";
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXFilenameSmartGroup;
+ description = "This group displays Interface Builder NIB Files.";
+ globalID = 1CC0EA4004350EF90041110B;
+ name = "NIB Files";
+ preferences = {
+ canSave = 1;
+ fnmatch = "*.nib";
+ image = SmartFolder;
+ isLeaf = 0;
+ recursive = 1;
+ regex = "";
+ root = "<PROJECT>";
+ };
+ },
+ {
+ PBXTransientLocationAtTop = no;
+ absolutePathToBundle = "";
+ clz = PBXFindSmartGroup;
+ description = "Displays Find Results.";
+ globalID = 1C37FABC05509CD000000102;
+ name = "Find Results";
+ preferences = {
+ image = spyglass;
+ };
+ },
+ {
+ PBXTransientLocationAtTop = no;
+ absolutePathToBundle = "";
+ clz = PBXBookmarksSmartGroup;
+ description = "Displays Project Bookmarks.";
+ globalID = 1C37FABC05539CD112110102;
+ name = Bookmarks;
+ preferences = {
+ image = Bookmarks;
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = XCSCMSmartGroup;
+ description = "Displays files with interesting SCM status.";
+ globalID = E2644B35053B69B200211256;
+ name = SCM;
+ preferences = {
+ image = PBXRepository;
+ isLeaf = 0;
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXSymbolsSmartGroup;
+ description = "Displays all symbols for the project.";
+ globalID = 1C37FABC04509CD000100104;
+ name = "Project Symbols";
+ preferences = {
+ image = ProjectSymbols;
+ isLeaf = 1;
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXFilenameSmartGroup;
+ description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+ globalID = PBXTemplateMarker;
+ name = "Simple Filter SmartGroup";
+ preferences = {
+ canSave = 1;
+ fnmatch = "*.nib";
+ image = SmartFolder;
+ isLeaf = 0;
+ recursive = 1;
+ regex = "";
+ root = "<PROJECT>";
+ };
+ },
+ {
+ PBXTransientLocationAtTop = bottom;
+ absolutePathToBundle = "";
+ clz = PBXFilenameSmartGroup;
+ description = "Filters items in a given group (potentially recursively) based on matching the name with the regular expression of the filter.";
+ globalID = PBXTemplateMarker;
+ name = "Simple Regular Expression SmartGroup";
+ preferences = {
+ canSave = 1;
+ fnmatch = "";
+ image = SmartFolder;
+ isLeaf = 0;
+ recursive = 1;
+ regex = "?*\\.[mcMC]";
+ root = "<PROJECT>";
+ };
+ },
+ );
+ PBXWorkspaceContents = (
+ {
+ PBXProjectWorkspaceModule_StateKey_Rev39 = {
+ PBXProjectWorkspaceModule_DEGV_Geometry = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ isCollapsed = yes;
+ sizes = (
+ "{{0, 0}, {795, 320}}",
+ "{{0, 320}, {795, 251}}",
+ );
+ };
+ PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {
+ BoundsStr = "{{0, 0}, {780, 1110}}";
+ Rows = (
+ 0,
+ );
+ VisibleRectStr = "{{0, 0}, {780, 303}}";
+ };
+ PBXProjectWorkspaceModule_EditorOpen = true;
+ PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {
+ PBXSplitModuleInNavigatorKey = {
+ Split0 = {
+ bookmark = 9B877747079A939500FFD349;
+ history = (
+ 9BF4839C0754A4D90094F73F,
+ 9BA4C7BF0747771D00B654FC,
+ );
+ };
+ SplitCount = 1;
+ };
+ };
+ PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+ PBXProjectWorkspaceModule_SGTM_Geometry = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ sizes = (
+ "{{0, 0}, {182, 571}}",
+ "{{182, 0}, {795, 571}}",
+ );
+ };
+ };
+ PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {795, 320}}";
+ PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 320}, {795, 251}}";
+ PBXProjectWorkspaceModule_OldSuperviewFrame = "{{182, 0}, {795, 571}}";
+ PBXProjectWorkspaceModule_SGTM = {
+ PBXBottomSmartGroupGIDs = (
+ 1C37FBAC04509CD000000102,
+ 1C37FAAC04509CD000000102,
+ 1C08E77C0454961000C914BD,
+ 1CC0EA4004350EF90044410B,
+ 1CC0EA4004350EF90041110B,
+ 1C37FABC05509CD000000102,
+ 1C37FABC05539CD112110102,
+ E2644B35053B69B200211256,
+ 1C37FABC04509CD000100104,
+ 9B40F63D0746177400D81DFB,
+ );
+ PBXSmartGroupTreeModuleColumnData = {
+ PBXSmartGroupTreeModuleColumnWidthsKey = (
+ 165,
+ );
+ PBXSmartGroupTreeModuleColumnsKey_v4 = (
+ MainColumn,
+ );
+ };
+ PBXSmartGroupTreeModuleOutlineStateKey_v7 = {
+ PBXSmartGroupTreeModuleOutlineStateExpansionKey = (
+ 2A37F4AAFDCFA73011CA2CEA,
+ 2A37F4ABFDCFA73011CA2CEA,
+ F548086D027F831E01DDA526,
+ 1C37FBAC04509CD000000102,
+ 1C37FAAC04509CD000000102,
+ 1C08E77C0454961000C914BD,
+ 1CC0EA4004350EF90041110B,
+ 1C37FABC05509CD000000102,
+ );
+ PBXSmartGroupTreeModuleOutlineStateSelectionKey = (
+ (
+ 26,
+ 25,
+ ),
+ );
+ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 110}, {165, 553}}";
+ };
+ PBXTopSmartGroupGIDs = (
+ );
+ };
+ };
+ },
+ );
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXBuildResultsModule" = {
+ };
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugCLIModule" = {
+ };
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXDebugSessionModule" = {
+ Debugger = {
+ HorizontalSplitView = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ isCollapsed = yes;
+ sizes = (
+ "{{0, 0}, {327, 209}}",
+ "{{327, 0}, {544, 209}}",
+ );
+ };
+ VerticalSplitView = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ isCollapsed = yes;
+ sizes = (
+ "{{0, 0}, {871, 209}}",
+ "{{0, 209}, {871, 216}}",
+ );
+ };
+ };
+ LauncherConfigVersion = 8;
+ };
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXNavigatorGroup" = {
+ PBXSplitModuleInNavigatorKey = {
+ SplitCount = 1;
+ };
+ };
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectFindModule" = {
+ };
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = {
+ PBXProjectWorkspaceModule_StateKey_Rev39 = {
+ PBXProjectWorkspaceModule_DEGV_Geometry = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ isCollapsed = yes;
+ sizes = (
+ "{{0, 0}, {795, 320}}",
+ "{{0, 320}, {795, 251}}",
+ );
+ };
+ PBXProjectWorkspaceModule_DataSourceSelectionKey_Rev6 = {
+ BoundsStr = "{{0, 0}, {780, 303}}";
+ Rows = (
+ );
+ VisibleRectStr = "{{0, 0}, {780, 303}}";
+ };
+ PBXProjectWorkspaceModule_EditorOpen = true;
+ PBXProjectWorkspaceModule_EmbeddedNavigatorGroup = {
+ PBXSplitModuleInNavigatorKey = {
+ Split0 = {
+ history = (
+ 9BA4C7BF0747771D00B654FC,
+ 9BF4839C0754A4D90094F73F,
+ );
+ };
+ SplitCount = 1;
+ };
+ };
+ PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+ PBXProjectWorkspaceModule_SGTM_Geometry = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ sizes = (
+ "{{0, 0}, {182, 571}}",
+ "{{182, 0}, {795, 571}}",
+ );
+ };
+ };
+ PBXProjectWorkspaceModule_OldDetailFrame = "{{0, 0}, {795, 320}}";
+ PBXProjectWorkspaceModule_OldEditorFrame = "{{0, 320}, {795, 251}}";
+ PBXProjectWorkspaceModule_OldSuperviewFrame = "{{182, 0}, {795, 571}}";
+ PBXProjectWorkspaceModule_SGTM = {
+ PBXBottomSmartGroupGIDs = (
+ 1C37FBAC04509CD000000102,
+ 1C37FAAC04509CD000000102,
+ 1C08E77C0454961000C914BD,
+ 1CC0EA4004350EF90044410B,
+ 1CC0EA4004350EF90041110B,
+ 1C37FABC05509CD000000102,
+ 1C37FABC05539CD112110102,
+ E2644B35053B69B200211256,
+ 1C37FABC04509CD000100104,
+ 9B40F63D0746177400D81DFB,
+ );
+ PBXSmartGroupTreeModuleColumnData = {
+ PBXSmartGroupTreeModuleColumnWidthsKey = (
+ 165,
+ );
+ PBXSmartGroupTreeModuleColumnsKey_v4 = (
+ MainColumn,
+ );
+ };
+ PBXSmartGroupTreeModuleOutlineStateKey_v7 = {
+ PBXSmartGroupTreeModuleOutlineStateExpansionKey = (
+ 2A37F4AAFDCFA73011CA2CEA,
+ 2A37F4ABFDCFA73011CA2CEA,
+ F548086D027F831E01DDA526,
+ 1C37FBAC04509CD000000102,
+ 1C37FAAC04509CD000000102,
+ 1C08E77C0454961000C914BD,
+ 1CC0EA4004350EF90041110B,
+ 1C37FABC05509CD000000102,
+ );
+ PBXSmartGroupTreeModuleOutlineStateSelectionKey = (
+ (
+ 29,
+ ),
+ );
+ PBXSmartGroupTreeModuleOutlineStateVisibleRectKey = "{{0, 89}, {165, 553}}";
+ };
+ PBXTopSmartGroupGIDs = (
+ );
+ };
+ };
+ };
+ "PBXWorkspaceContents:PBXConfiguration.PBXModule.PBXRunSessionModule" = {
+ LauncherConfigVersion = 3;
+ Runner = {
+ HorizontalSplitView = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ isCollapsed = yes;
+ sizes = (
+ "{{0, 0}, {491, 167}}",
+ "{{0, 176}, {491, 267}}",
+ );
+ };
+ VerticalSplitView = {
+ _collapsingFrameDimension = 0;
+ _indexOfCollapsedView = 0;
+ _percentageOfCollapsedView = 0;
+ isCollapsed = yes;
+ sizes = (
+ "{{0, 0}, {405, 443}}",
+ "{{414, 0}, {514, 443}}",
+ );
+ };
+ };
+ };
+ PBXWorkspaceGeometries = (
+ {
+ Frame = "{{0, 0}, {977, 571}}";
+ PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+ };
+ RubberWindowFrame = "18 117 977 613 0 0 1152 746 ";
+ },
+ );
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXBuildResultsModule" = {
+ Frame = "{{0, 0}, {480, 217}}";
+ PBXModuleWindowStatusBarHidden = YES;
+ RubberWindowFrame = "336 417 480 238 0 0 1152 746 ";
+ };
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugCLIModule" = {
+ Frame = "{{0, 0}, {400, 201}}";
+ PBXModuleWindowStatusBarHidden = YES;
+ RubberWindowFrame = "50 718 400 222 0 0 1152 746 ";
+ };
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXDebugSessionModule" = {
+ DebugConsoleDrawerSize = "{100, 120}";
+ DebugConsoleVisible = None;
+ DebugConsoleWindowFrame = "{{200, 200}, {500, 300}}";
+ DebugSTDIOWindowFrame = "{{200, 200}, {500, 300}}";
+ Frame = "{{0, 0}, {871, 425}}";
+ RubberWindowFrame = "163 217 871 467 0 0 1152 746 ";
+ };
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXNavigatorGroup" = {
+ Frame = "{{0, 0}, {892, 516}}";
+ PBXModuleWindowStatusBarHidden = YES;
+ RubberWindowFrame = "44 180 892 537 0 0 1152 746 ";
+ };
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectFindModule" = {
+ Frame = "{{0, 0}, {614, 121}}";
+ PBXModuleWindowStatusBarHidden = YES;
+ RubberWindowFrame = "269 582 614 142 0 0 1152 746 ";
+ };
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXProjectWorkspaceModule" = {
+ Frame = "{{0, 0}, {977, 571}}";
+ PBXProjectWorkspaceModule_GeometryKey_Rev15 = {
+ };
+ RubberWindowFrame = "18 117 977 613 0 0 1152 746 ";
+ };
+ "PBXWorkspaceGeometries:PBXConfiguration.PBXModule.PBXRunSessionModule" = {
+ Frame = "{{0, 0}, {745, 443}}";
+ PBXModuleWindowStatusBarHidden = YES;
+ RubberWindowFrame = "373 192 745 464 0 0 1152 746 ";
+ };
+ PBXWorkspaceStateSaveDate = 176554662;
+ };
+ sourceControlManager = 9BDB824B05F289B800EDF8CE /* Source Control */;
+ userBuildSettings = {
+ SYMROOT = /Users/ltextor/Documents/30_Developer/CocoaMySQL/current_build;
+ };
+ };
+ 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {2156, 22498}}";
+ sepNavSelRange = "{42097, 0}";
+ sepNavVisRect = "{{0, 13412}, {749, 94}}";
+ sepNavWindowFrame = "{{5, 39}, {1062, 707}}";
+ };
+ };
+ 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {878, 2632}}";
+ sepNavSelRange = "{2490, 0}";
+ sepNavVisRect = "{{0, 2104}, {878, 528}}";
+ sepNavWindowFrame = "{{188, 89}, {917, 657}}";
+ };
+ };
+ 2A37F4BAFDCFA73011CA2CEA /* English */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {711, 444}}";
+ sepNavSelRange = "{267, 0}";
+ sepNavVisRect = "{{0, 0}, {711, 444}}";
+ sepNavWindowFrame = "{{176, 36}, {750, 558}}";
+ };
+ };
+ 9B220E640751EE2700DA3E19 /* TableStatus.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {779, 896}}";
+ sepNavSelRange = "{1074, 0}";
+ sepNavVisRect = "{{0, 229}, {779, 191}}";
+ sepNavWindowFrame = "{{84, 120}, {750, 558}}";
+ };
+ };
+ 9B220E650751EE2700DA3E19 /* TableStatus.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {830, 1596}}";
+ sepNavSelRange = "{899, 0}";
+ sepNavVisRect = "{{0, 593}, {764, 490}}";
+ sepNavWindowFrame = "{{120, 70}, {926, 676}}";
+ };
+ };
+ 9B40F86207461DC500D81DFB /* CMCopyTable.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {711, 1302}}";
+ sepNavSelRange = "{1526, 0}";
+ sepNavVisRect = "{{0, 435}, {711, 429}}";
+ sepNavWindowFrame = "{{246, 55}, {750, 558}}";
+ };
+ };
+ 9B40F86307461DC500D81DFB /* CMCopyTable.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {799, 2576}}";
+ sepNavSelRange = "{2389, 4}";
+ sepNavVisRect = "{{0, 849}, {799, 285}}";
+ sepNavWindowFrame = "{{61, 141}, {750, 558}}";
+ };
+ };
+ 9B7C9D3508E6C32B00C5BB18 /* XCBreakpointsBucket */ = {
+ isa = XCBreakpointsBucket;
+ name = "Project Breakpoints";
+ objects = (
+ );
+ };
+ 9B9ACE9008DEBE70009E313E /* CocoaMySQL */ = {
+ activeExec = 0;
+ executables = (
+ 9B9ACEEB08DEBE70009E313E /* CocoaMySQL */,
+ );
+ };
+ 9B9ACEE908DEBE70009E313E /* Info.plist */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1044, 1162}}";
+ sepNavSelRange = "{1340, 0}";
+ sepNavVisRect = "{{0, 0}, {1044, 580}}";
+ sepNavWindowFrame = "{{15, 32}, {1083, 709}}";
+ };
+ };
+ 9B9ACEEB08DEBE70009E313E /* CocoaMySQL */ = {
+ isa = PBXExecutable;
+ activeArgIndex = 2147483647;
+ activeArgIndices = (
+ );
+ argumentStrings = (
+ );
+ autoAttachOnCrash = 1;
+ configStateDict = {
+ };
+ customDataFormattersEnabled = 1;
+ debuggerPlugin = GDBDebugging;
+ disassemblyDisplayState = 0;
+ dylibVariantSuffix = "";
+ enableDebugStr = 1;
+ environmentEntries = (
+ );
+ executableSystemSymbolLevel = 0;
+ executableUserSymbolLevel = 0;
+ libgmallocEnabled = 0;
+ name = CocoaMySQL;
+ savedGlobals = {
+ };
+ sourceDirectories = (
+ );
+ };
+ 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {985, 572}}";
+ sepNavSelRange = "{932, 0}";
+ sepNavVisRect = "{{0, 0}, {985, 572}}";
+ sepNavWindowFrame = "{{15, 40}, {1024, 701}}";
+ };
+ };
+ 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {985, 4158}}";
+ sepNavSelRange = "{1551, 0}";
+ sepNavVisRect = "{{0, 246}, {985, 572}}";
+ sepNavWindowFrame = "{{75, 37}, {1024, 701}}";
+ };
+ };
+ 9BDB824B05F289B800EDF8CE /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ };
+ scmType = scm.subversion;
+ };
+ 9BDB824C05F289B800EDF8CE /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1023, 578}}";
+ sepNavSelRange = "{1261, 0}";
+ sepNavVisRect = "{{0, 0}, {1023, 578}}";
+ sepNavWindowFrame = "{{5, 39}, {1062, 707}}";
+ };
+ };
+ 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1256, 3108}}";
+ sepNavSelRange = "{4946, 193}";
+ sepNavVisRect = "{{0, 2156}, {1023, 578}}";
+ sepNavWindowFrame = "{{5, 39}, {1062, 707}}";
+ };
+ };
+ 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1044, 580}}";
+ sepNavSelRange = "{20, 0}";
+ sepNavVisRect = "{{0, 0}, {1044, 580}}";
+ sepNavWindowFrame = "{{15, 32}, {1083, 709}}";
+ };
+ };
+ 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {902, 2156}}";
+ sepNavSelRange = "{5328, 0}";
+ sepNavVisRect = "{{0, 385}, {822, 383}}";
+ sepNavWindowFrame = "{{-5, 234}, {861, 512}}";
+ };
+ };
+ 9BE828B50908269400A18070 /* SSHTunnel.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {878, 812}}";
+ sepNavSelRange = "{389, 0}";
+ sepNavVisRect = "{{0, 0}, {878, 528}}";
+ sepNavWindowFrame = "{{15, 84}, {917, 657}}";
+ };
+ };
+ 9BE828B60908269400A18070 /* SSHTunnel.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {878, 7448}}";
+ sepNavSelRange = "{2096, 0}";
+ sepNavVisRect = "{{0, 698}, {878, 528}}";
+ sepNavWindowFrame = "{{144, 89}, {917, 657}}";
+ };
+ };
+ 9BFF536B08F43B9D004D6BCB /* SSHTunnel_old.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1061, 588}}";
+ sepNavSelRange = "{669, 0}";
+ sepNavVisRect = "{{0, 41}, {1061, 533}}";
+ sepNavWindowFrame = "{{15, 79}, {1100, 662}}";
+ };
+ };
+ 9BFF536C08F43B9E004D6BCB /* SSHTunnel_old.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1022, 3164}}";
+ sepNavSelRange = "{1204, 50}";
+ sepNavVisRect = "{{0, 764}, {862, 223}}";
+ sepNavWindowFrame = "{{38, 63}, {917, 657}}";
+ };
+ };
+ 9BFF53AF08F44B40004D6BCB /* askForPass.sh */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {818, 439}}";
+ sepNavSelRange = "{335, 0}";
+ sepNavVisRect = "{{0, 0}, {818, 439}}";
+ sepNavWindowFrame = "{{287, 178}, {857, 568}}";
+ };
+ };
+ 9BFF53B008F44B40004D6BCB /* CocoaMySQL.scriptSuite */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {830, 518}}";
+ sepNavSelRange = "{379, 0}";
+ sepNavVisRect = "{{0, 0}, {830, 498}}";
+ sepNavWindowFrame = "{{279, 119}, {869, 627}}";
+ };
+ };
+ 9BFF53B108F44B40004D6BCB /* CocoaMySQL.scriptTerminology */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {818, 439}}";
+ sepNavSelRange = "{484, 0}";
+ sepNavVisRect = "{{0, 0}, {818, 439}}";
+ sepNavWindowFrame = "{{233, 71}, {857, 568}}";
+ };
+ };
+ F51B8773050A8A1701000103 /* CMImageView.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {711, 518}}";
+ sepNavSelRange = "{0, 988}";
+ sepNavVisRect = "{{0, 0}, {711, 429}}";
+ sepNavWindowFrame = "{{84, 120}, {750, 558}}";
+ };
+ };
+ F51B8774050A8A1701000103 /* CMImageView.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {932, 686}}";
+ sepNavSelRange = "{415, 0}";
+ sepNavVisRect = "{{0, 0}, {711, 429}}";
+ sepNavWindowFrame = "{{338, 97}, {750, 558}}";
+ };
+ };
+ F52BA08003BA16430100012B /* KeyChain.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1044, 580}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {1044, 580}}";
+ sepNavWindowFrame = "{{15, 32}, {1083, 709}}";
+ };
+ };
+ F52BA45F03BA3D0B0100012B /* KeyChain.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1044, 910}}";
+ sepNavSelRange = "{426, 0}";
+ sepNavVisRect = "{{0, 330}, {1044, 580}}";
+ sepNavWindowFrame = "{{15, 32}, {1083, 709}}";
+ };
+ };
+ F548087A027F870A01DDA526 /* TableContent.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {711, 1890}}";
+ sepNavSelRange = "{3501, 0}";
+ sepNavVisRect = "{{0, 1291}, {711, 429}}";
+ sepNavWindowFrame = "{{338, 74}, {750, 558}}";
+ };
+ };
+ F548087B027F870A01DDA526 /* TableContent.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {3428, 26614}}";
+ sepNavSelRange = "{7997, 12}";
+ sepNavVisRect = "{{0, 2763}, {799, 285}}";
+ sepNavWindowFrame = "{{107, 31}, {933, 626}}";
+ };
+ };
+ F548087C027F870A01DDA526 /* TableSource.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {830, 1764}}";
+ sepNavSelRange = "{2944, 4}";
+ sepNavVisRect = "{{0, 634}, {764, 490}}";
+ sepNavWindowFrame = "{{175, 81}, {962, 621}}";
+ };
+ };
+ F548087D027F870A01DDA526 /* TableSource.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1574, 16212}}";
+ sepNavSelRange = "{2823, 0}";
+ sepNavVisRect = "{{0, 986}, {799, 285}}";
+ sepNavWindowFrame = "{{5, 127}, {803, 619}}";
+ };
+ };
+ F548087E027F870A01DDA526 /* TablesList.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1023, 1344}}";
+ sepNavSelRange = "{2130, 0}";
+ sepNavVisRect = "{{0, 600}, {1023, 578}}";
+ sepNavWindowFrame = "{{53, 185}, {750, 558}}";
+ };
+ };
+ F548087F027F870A01DDA526 /* TablesList.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1514, 9184}}";
+ sepNavSelRange = "{5337, 12}";
+ sepNavVisRect = "{{0, 1719}, {894, 497}}";
+ sepNavWindowFrame = "{{61, 73}, {933, 626}}";
+ };
+ };
+ F55ECCBE02C6156601738522 /* gpl.txt */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {711, 4774}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRect = "{{0, 0}, {711, 429}}";
+ sepNavWindowFrame = "{{15, 183}, {750, 558}}";
+ };
+ };
+ F58CAF14052C84EB01B3ED40 /* English */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {3032, 5110}}";
+ sepNavSelRange = "{13248, 0}";
+ sepNavVisRect = "{{0, 0}, {1044, 580}}";
+ sepNavWindowFrame = "{{5, 37}, {1083, 709}}";
+ };
+ };
+ F5A1A33A02A16816018594E7 /* TableDump.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {740, 1918}}";
+ sepNavSelRange = "{1106, 0}";
+ sepNavVisRect = "{{0, 256}, {711, 429}}";
+ sepNavWindowFrame = "{{176, 36}, {750, 558}}";
+ };
+ };
+ F5A1A33B02A16816018594E7 /* TableDump.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1748, 20328}}";
+ sepNavSelRange = "{10334, 0}";
+ sepNavVisRect = "{{28, 3567}, {894, 497}}";
+ sepNavWindowFrame = "{{38, 94}, {933, 626}}";
+ };
+ };
+ F5C810CE0281C5A20139D141 /* CustomQuery.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {878, 1484}}";
+ sepNavSelRange = "{1132, 0}";
+ sepNavVisRect = "{{0, 255}, {711, 429}}";
+ sepNavWindowFrame = "{{15, 183}, {750, 558}}";
+ };
+ };
+ F5C810CF0281C5A20139D141 /* CustomQuery.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1064, 10584}}";
+ sepNavSelRange = "{5838, 15}";
+ sepNavVisRect = "{{0, 2036}, {799, 285}}";
+ sepNavWindowFrame = "{{107, 145}, {861, 512}}";
+ };
+ };
+ F5E57A3702B2B518018C3E81 /* reload.tiff */ = {
+ uiCtxt = {
+ sepNavWindowFrame = "{{38, 94}, {933, 626}}";
+ };
+ };
+ F5FB320C029E966601566C24 /* MainController.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {894, 1540}}";
+ sepNavSelRange = "{1432, 0}";
+ sepNavVisRect = "{{0, 407}, {894, 497}}";
+ sepNavWindowFrame = "{{372, 84}, {750, 558}}";
+ };
+ };
+ F5FB320D029E966601566C24 /* MainController.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {2756, 11578}}";
+ sepNavSelRange = "{27602, 0}";
+ sepNavVisRect = "{{0, 9552}, {894, 497}}";
+ sepNavWindowFrame = "{{5, 120}, {933, 626}}";
+ };
+ };
+}
diff --git a/CocoaMySQL.xcodeproj/project.pbxproj b/CocoaMySQL.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..670ee0de
--- /dev/null
+++ b/CocoaMySQL.xcodeproj/project.pbxproj
@@ -0,0 +1,764 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 9B0646E409AF165700428D0B /* MCPKit_bundled.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B0646E309AF165700428D0B /* MCPKit_bundled.framework */; };
+ 9B0646E809AF167C00428D0B /* MCPKit_bundled.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9B0646E309AF165700428D0B /* MCPKit_bundled.framework */; };
+ 9B9ACE9208DEBE70009E313E /* TableDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */; };
+ 9B9ACE9308DEBE70009E313E /* TableContent.h in Headers */ = {isa = PBXBuildFile; fileRef = F548087A027F870A01DDA526 /* TableContent.h */; };
+ 9B9ACE9408DEBE70009E313E /* TableSource.h in Headers */ = {isa = PBXBuildFile; fileRef = F548087C027F870A01DDA526 /* TableSource.h */; };
+ 9B9ACE9508DEBE70009E313E /* CustomQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C810CE0281C5A20139D141 /* CustomQuery.h */; };
+ 9B9ACE9608DEBE70009E313E /* TablesList.h in Headers */ = {isa = PBXBuildFile; fileRef = F548087E027F870A01DDA526 /* TablesList.h */; };
+ 9B9ACE9708DEBE70009E313E /* MainController.h in Headers */ = {isa = PBXBuildFile; fileRef = F5FB320C029E966601566C24 /* MainController.h */; };
+ 9B9ACE9808DEBE70009E313E /* TableDump.h in Headers */ = {isa = PBXBuildFile; fileRef = F5A1A33A02A16816018594E7 /* TableDump.h */; };
+ 9B9ACE9908DEBE70009E313E /* KeyChain.h in Headers */ = {isa = PBXBuildFile; fileRef = F52BA08003BA16430100012B /* KeyChain.h */; };
+ 9B9ACE9A08DEBE70009E313E /* CMImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = F51B8773050A8A1701000103 /* CMImageView.h */; };
+ 9B9ACE9B08DEBE70009E313E /* CMCopyTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B40F86207461DC500D81DFB /* CMCopyTable.h */; };
+ 9B9ACE9C08DEBE70009E313E /* TableStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B220E640751EE2700DA3E19 /* TableStatus.h */; };
+ 9B9ACE9D08DEBE70009E313E /* CMMCPConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */; };
+ 9B9ACE9E08DEBE70009E313E /* CMMCPResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */; };
+ 9B9ACEA008DEBE70009E313E /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */; };
+ 9B9ACEA108DEBE70009E313E /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */; };
+ 9B9ACEA308DEBE70009E313E /* DBView.nib in Resources */ = {isa = PBXBuildFile; fileRef = F5FE5E7A0280319101613535 /* DBView.nib */; };
+ 9B9ACEA408DEBE70009E313E /* sort-down.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F570FC9502A05DFD0127F14A /* sort-down.tiff */; };
+ 9B9ACEA508DEBE70009E313E /* sort-up.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F570FC9602A05DFD0127F14A /* sort-up.tiff */; };
+ 9B9ACEA608DEBE70009E313E /* selectall.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5E57A3902B2B518018C3E81 /* selectall.tiff */; };
+ 9B9ACEA708DEBE70009E313E /* appicon.icns in Resources */ = {isa = PBXBuildFile; fileRef = F503C88F02B387CB01C66673 /* appicon.icns */; };
+ 9B9ACEA808DEBE70009E313E /* gpl.txt in Resources */ = {isa = PBXBuildFile; fileRef = F55ECCBE02C6156601738522 /* gpl.txt */; };
+ 9B9ACEA908DEBE70009E313E /* selectnone.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F51547F604E8E9B901000103 /* selectnone.tiff */; };
+ 9B9ACEAA08DEBE70009E313E /* rowcopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC12FC04EE385401FE0D2B /* rowcopy.tiff */; };
+ 9B9ACEAB08DEBE70009E313E /* columncopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC12FD04EE385401FE0D2B /* columncopy.tiff */; };
+ 9B9ACEAC08DEBE70009E313E /* tablecopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130004EE444801FE0D2B /* tablecopy.tiff */; };
+ 9B9ACEAD08DEBE70009E313E /* databases.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130104EE444801FE0D2B /* databases.tiff */; };
+ 9B9ACEAE08DEBE70009E313E /* dbadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130204EE444801FE0D2B /* dbadd.tiff */; };
+ 9B9ACEAF08DEBE70009E313E /* dbdelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130304EE444801FE0D2B /* dbdelete.tiff */; };
+ 9B9ACEB008DEBE70009E313E /* dbrefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130404EE444801FE0D2B /* dbrefresh.tiff */; };
+ 9B9ACEB108DEBE70009E313E /* indexadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130704EE444801FE0D2B /* indexadd.tiff */; };
+ 9B9ACEB208DEBE70009E313E /* indexdelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130804EE444801FE0D2B /* indexdelete.tiff */; };
+ 9B9ACEB308DEBE70009E313E /* tableadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130B04EE444801FE0D2B /* tableadd.tiff */; };
+ 9B9ACEB408DEBE70009E313E /* tabledelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130C04EE444801FE0D2B /* tabledelete.tiff */; };
+ 9B9ACEB508DEBE70009E313E /* tablerefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130D04EE444801FE0D2B /* tablerefresh.tiff */; };
+ 9B9ACEB608DEBE70009E313E /* tables.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5EC130E04EE444801FE0D2B /* tables.tiff */; };
+ 9B9ACEB708DEBE70009E313E /* clearconsole.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DB04EE666101FE0D2B /* clearconsole.tiff */; };
+ 9B9ACEB808DEBE70009E313E /* createtablesyntax.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DC04EE666101FE0D2B /* createtablesyntax.tiff */; };
+ 9B9ACEB908DEBE70009E313E /* flushprivileges.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DD04EE666101FE0D2B /* flushprivileges.tiff */; };
+ 9B9ACEBA08DEBE70009E313E /* optimizetable.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6DE04EE666101FE0D2B /* optimizetable.tiff */; };
+ 9B9ACEBB08DEBE70009E313E /* showvariables.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F5A1F6E004EE666101FE0D2B /* showvariables.tiff */; };
+ 9B9ACEBC08DEBE70009E313E /* columnadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4AC0509EF6201000103 /* columnadd.tiff */; };
+ 9B9ACEBD08DEBE70009E313E /* columndelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4AE0509F05101000103 /* columndelete.tiff */; };
+ 9B9ACEBE08DEBE70009E313E /* columnrefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4B00509F0CA01000103 /* columnrefresh.tiff */; };
+ 9B9ACEBF08DEBE70009E313E /* connectionadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4B40509F1B801000103 /* connectionadd.tiff */; };
+ 9B9ACEC008DEBE70009E313E /* connectiondelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4B50509F1B801000103 /* connectiondelete.tiff */; };
+ 9B9ACEC108DEBE70009E313E /* hideconsole.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4BA0509F6C601000103 /* hideconsole.tiff */; };
+ 9B9ACEC208DEBE70009E313E /* showconsole.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4BB0509F6C601000103 /* showconsole.tiff */; };
+ 9B9ACEC308DEBE70009E313E /* queryadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4BF0509FB3E01000103 /* queryadd.tiff */; };
+ 9B9ACEC408DEBE70009E313E /* querydelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4C00509FB3E01000103 /* querydelete.tiff */; };
+ 9B9ACEC508DEBE70009E313E /* rowadd.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4C90509FDDF01000103 /* rowadd.tiff */; };
+ 9B9ACEC608DEBE70009E313E /* rowdelete.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4CA0509FDDF01000103 /* rowdelete.tiff */; };
+ 9B9ACEC708DEBE70009E313E /* rowrefresh.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4CB0509FDDF01000103 /* rowrefresh.tiff */; };
+ 9B9ACEC808DEBE70009E313E /* sheettotable.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4CF0509FF6401000103 /* sheettotable.tiff */; };
+ 9B9ACEC908DEBE70009E313E /* tabletosheet.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4D00509FF6401000103 /* tabletosheet.tiff */; };
+ 9B9ACECA08DEBE70009E313E /* textencode.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F52FA4D10509FF6401000103 /* textencode.tiff */; };
+ 9B9ACECB08DEBE70009E313E /* connectioncopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F51B86B3050A4E4F01000103 /* connectioncopy.tiff */; };
+ 9B9ACECC08DEBE70009E313E /* querycopy.tiff in Resources */ = {isa = PBXBuildFile; fileRef = F51B86B4050A4E4F01000103 /* querycopy.tiff */; };
+ 9B9ACECD08DEBE70009E313E /* english_help in Resources */ = {isa = PBXBuildFile; fileRef = F5DB91380510F4B60186457F /* english_help */; };
+ 9B9ACECE08DEBE70009E313E /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F58CAF13052C84EB01B3ED40 /* Localizable.strings */; };
+ 9B9ACED008DEBE70009E313E /* TableDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */; settings = {ATTRIBUTES = (); }; };
+ 9B9ACED108DEBE70009E313E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A37F4B0FDCFA73011CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 9B9ACED208DEBE70009E313E /* TableContent.m in Sources */ = {isa = PBXBuildFile; fileRef = F548087B027F870A01DDA526 /* TableContent.m */; };
+ 9B9ACED308DEBE70009E313E /* TableSource.m in Sources */ = {isa = PBXBuildFile; fileRef = F548087D027F870A01DDA526 /* TableSource.m */; };
+ 9B9ACED408DEBE70009E313E /* TablesList.m in Sources */ = {isa = PBXBuildFile; fileRef = F548087F027F870A01DDA526 /* TablesList.m */; };
+ 9B9ACED508DEBE70009E313E /* CustomQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = F5C810CF0281C5A20139D141 /* CustomQuery.m */; };
+ 9B9ACED608DEBE70009E313E /* MainController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5FB320D029E966601566C24 /* MainController.m */; };
+ 9B9ACED708DEBE70009E313E /* TableDump.m in Sources */ = {isa = PBXBuildFile; fileRef = F5A1A33B02A16816018594E7 /* TableDump.m */; };
+ 9B9ACED808DEBE70009E313E /* KeyChain.m in Sources */ = {isa = PBXBuildFile; fileRef = F52BA45F03BA3D0B0100012B /* KeyChain.m */; };
+ 9B9ACED908DEBE70009E313E /* CMImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = F51B8774050A8A1701000103 /* CMImageView.m */; };
+ 9B9ACEDA08DEBE70009E313E /* CMCopyTable.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B40F86307461DC500D81DFB /* CMCopyTable.m */; };
+ 9B9ACEDB08DEBE70009E313E /* TableStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B220E650751EE2700DA3E19 /* TableStatus.m */; };
+ 9B9ACEDC08DEBE70009E313E /* CMMCPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */; };
+ 9B9ACEDD08DEBE70009E313E /* CMMCPResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */; };
+ 9B9ACEE108DEBE70009E313E /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */; };
+ 9B9ACEE208DEBE70009E313E /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5981AA203BA574A0100012B /* Carbon.framework */; };
+ 9B9ACEE308DEBE70009E313E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */; };
+ 9BC3EEBA09AC6EE100F6B295 /* CMTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */; };
+ 9BC3EEBB09AC6EE100F6B295 /* CMTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */; };
+ 9BE828B70908269400A18070 /* SSHTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BE828B50908269400A18070 /* SSHTunnel.h */; };
+ 9BE828B80908269400A18070 /* SSHTunnel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BE828B60908269400A18070 /* SSHTunnel.m */; };
+ 9BFF53B208F44B40004D6BCB /* askForPass.sh in Resources */ = {isa = PBXBuildFile; fileRef = 9BFF53AF08F44B40004D6BCB /* askForPass.sh */; };
+ 9BFF53B308F44B40004D6BCB /* CocoaMySQL.scriptSuite in Resources */ = {isa = PBXBuildFile; fileRef = 9BFF53B008F44B40004D6BCB /* CocoaMySQL.scriptSuite */; };
+ 9BFF53B408F44B40004D6BCB /* CocoaMySQL.scriptTerminology in Resources */ = {isa = PBXBuildFile; fileRef = 9BFF53B108F44B40004D6BCB /* CocoaMySQL.scriptTerminology */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9B9ACEDE08DEBE70009E313E /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 12;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 9B0646E809AF167C00428D0B /* MCPKit_bundled.framework in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableDocument.m; sourceTree = "<group>"; };
+ 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableDocument.h; sourceTree = "<group>"; };
+ 2A37F4B0FDCFA73011CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 2A37F4B7FDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
+ 2A37F4BAFDCFA73011CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = English; path = English.lproj/Credits.rtf; sourceTree = "<group>"; };
+ 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 9B0646E309AF165700428D0B /* MCPKit_bundled.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MCPKit_bundled.framework; sourceTree = "<group>"; };
+ 9B220E640751EE2700DA3E19 /* TableStatus.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableStatus.h; sourceTree = "<group>"; };
+ 9B220E650751EE2700DA3E19 /* TableStatus.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableStatus.m; sourceTree = "<group>"; };
+ 9B40F86207461DC500D81DFB /* CMCopyTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMCopyTable.h; sourceTree = "<group>"; };
+ 9B40F86307461DC500D81DFB /* CMCopyTable.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CMCopyTable.m; sourceTree = "<group>"; };
+ 9B9ACEE908DEBE70009E313E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; };
+ 9B9ACEEA08DEBE70009E313E /* CocoaMySQL.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocoaMySQL.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMTextView.h; sourceTree = "<group>"; };
+ 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CMTextView.m; sourceTree = "<group>"; };
+ 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMMCPConnection.h; sourceTree = "<group>"; };
+ 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMMCPConnection.m; sourceTree = "<group>"; };
+ 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CMMCPResult.h; sourceTree = "<group>"; };
+ 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CMMCPResult.m; sourceTree = "<group>"; };
+ 9BE828B50908269400A18070 /* SSHTunnel.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSHTunnel.h; sourceTree = "<group>"; };
+ 9BE828B60908269400A18070 /* SSHTunnel.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SSHTunnel.m; sourceTree = "<group>"; };
+ 9BFF536B08F43B9D004D6BCB /* SSHTunnel_old.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSHTunnel_old.h; sourceTree = "<group>"; };
+ 9BFF536C08F43B9E004D6BCB /* SSHTunnel_old.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SSHTunnel_old.m; sourceTree = "<group>"; };
+ 9BFF53AF08F44B40004D6BCB /* askForPass.sh */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = askForPass.sh; sourceTree = "<group>"; };
+ 9BFF53B008F44B40004D6BCB /* CocoaMySQL.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.scriptSuite; path = CocoaMySQL.scriptSuite; sourceTree = "<group>"; };
+ 9BFF53B108F44B40004D6BCB /* CocoaMySQL.scriptTerminology */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.scriptTerminology; path = CocoaMySQL.scriptTerminology; sourceTree = "<group>"; };
+ F503C88F02B387CB01C66673 /* appicon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = appicon.icns; path = images/appicon.icns; sourceTree = "<group>"; };
+ F51547F604E8E9B901000103 /* selectnone.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = selectnone.tiff; path = images/selectnone.tiff; sourceTree = "<group>"; };
+ F51B86B3050A4E4F01000103 /* connectioncopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectioncopy.tiff; path = images/connectioncopy.tiff; sourceTree = "<group>"; };
+ F51B86B4050A4E4F01000103 /* querycopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = querycopy.tiff; path = images/querycopy.tiff; sourceTree = "<group>"; };
+ F51B8773050A8A1701000103 /* CMImageView.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CMImageView.h; sourceTree = "<group>"; };
+ F51B8774050A8A1701000103 /* CMImageView.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CMImageView.m; sourceTree = "<group>"; };
+ F52BA08003BA16430100012B /* KeyChain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KeyChain.h; sourceTree = "<group>"; };
+ F52BA45F03BA3D0B0100012B /* KeyChain.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = KeyChain.m; sourceTree = "<group>"; };
+ F52FA4AC0509EF6201000103 /* columnadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columnadd.tiff; path = images/columnadd.tiff; sourceTree = "<group>"; };
+ F52FA4AE0509F05101000103 /* columndelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columndelete.tiff; path = images/columndelete.tiff; sourceTree = "<group>"; };
+ F52FA4B00509F0CA01000103 /* columnrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columnrefresh.tiff; path = images/columnrefresh.tiff; sourceTree = "<group>"; };
+ F52FA4B40509F1B801000103 /* connectionadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectionadd.tiff; path = images/connectionadd.tiff; sourceTree = "<group>"; };
+ F52FA4B50509F1B801000103 /* connectiondelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectiondelete.tiff; path = images/connectiondelete.tiff; sourceTree = "<group>"; };
+ F52FA4B60509F1B801000103 /* connectionrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = connectionrefresh.tiff; path = images/connectionrefresh.tiff; sourceTree = "<group>"; };
+ F52FA4BA0509F6C601000103 /* hideconsole.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = hideconsole.tiff; path = images/hideconsole.tiff; sourceTree = "<group>"; };
+ F52FA4BB0509F6C601000103 /* showconsole.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = showconsole.tiff; path = images/showconsole.tiff; sourceTree = "<group>"; };
+ F52FA4BE0509FB3E01000103 /* query.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = query.tiff; path = images/query.tiff; sourceTree = "<group>"; };
+ F52FA4BF0509FB3E01000103 /* queryadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = queryadd.tiff; path = images/queryadd.tiff; sourceTree = "<group>"; };
+ F52FA4C00509FB3E01000103 /* querydelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = querydelete.tiff; path = images/querydelete.tiff; sourceTree = "<group>"; };
+ F52FA4C10509FB3E01000103 /* queryrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = queryrefresh.tiff; path = images/queryrefresh.tiff; sourceTree = "<group>"; };
+ F52FA4C90509FDDF01000103 /* rowadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowadd.tiff; path = images/rowadd.tiff; sourceTree = "<group>"; };
+ F52FA4CA0509FDDF01000103 /* rowdelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowdelete.tiff; path = images/rowdelete.tiff; sourceTree = "<group>"; };
+ F52FA4CB0509FDDF01000103 /* rowrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowrefresh.tiff; path = images/rowrefresh.tiff; sourceTree = "<group>"; };
+ F52FA4CF0509FF6401000103 /* sheettotable.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = sheettotable.tiff; path = images/sheettotable.tiff; sourceTree = "<group>"; };
+ F52FA4D00509FF6401000103 /* tabletosheet.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tabletosheet.tiff; path = images/tabletosheet.tiff; sourceTree = "<group>"; };
+ F52FA4D10509FF6401000103 /* textencode.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = textencode.tiff; path = images/textencode.tiff; sourceTree = "<group>"; };
+ F548087A027F870A01DDA526 /* TableContent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableContent.h; sourceTree = "<group>"; };
+ F548087B027F870A01DDA526 /* TableContent.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableContent.m; sourceTree = "<group>"; };
+ F548087C027F870A01DDA526 /* TableSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableSource.h; sourceTree = "<group>"; };
+ F548087D027F870A01DDA526 /* TableSource.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableSource.m; sourceTree = "<group>"; };
+ F548087E027F870A01DDA526 /* TablesList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TablesList.h; sourceTree = "<group>"; };
+ F548087F027F870A01DDA526 /* TablesList.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TablesList.m; sourceTree = "<group>"; };
+ F55ECCBE02C6156601738522 /* gpl.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = gpl.txt; sourceTree = "<group>"; };
+ F570FC9502A05DFD0127F14A /* sort-down.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "sort-down.tiff"; path = "images/sort-down.tiff"; sourceTree = "<group>"; };
+ F570FC9602A05DFD0127F14A /* sort-up.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = "sort-up.tiff"; path = "images/sort-up.tiff"; sourceTree = "<group>"; };
+ F58CAF14052C84EB01B3ED40 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; };
+ F5981AA203BA574A0100012B /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ F5A1A33A02A16816018594E7 /* TableDump.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TableDump.h; sourceTree = "<group>"; };
+ F5A1A33B02A16816018594E7 /* TableDump.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TableDump.m; sourceTree = "<group>"; };
+ F5A1F6DB04EE666101FE0D2B /* clearconsole.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = clearconsole.tiff; path = images/clearconsole.tiff; sourceTree = "<group>"; };
+ F5A1F6DC04EE666101FE0D2B /* createtablesyntax.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = createtablesyntax.tiff; path = images/createtablesyntax.tiff; sourceTree = "<group>"; };
+ F5A1F6DD04EE666101FE0D2B /* flushprivileges.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = flushprivileges.tiff; path = images/flushprivileges.tiff; sourceTree = "<group>"; };
+ F5A1F6DE04EE666101FE0D2B /* optimizetable.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = optimizetable.tiff; path = images/optimizetable.tiff; sourceTree = "<group>"; };
+ F5A1F6E004EE666101FE0D2B /* showvariables.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = showvariables.tiff; path = images/showvariables.tiff; sourceTree = "<group>"; };
+ F5C810CE0281C5A20139D141 /* CustomQuery.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CustomQuery.h; sourceTree = "<group>"; };
+ F5C810CF0281C5A20139D141 /* CustomQuery.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CustomQuery.m; sourceTree = "<group>"; };
+ F5DB91390510F4B60186457F /* English */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = folder; name = English; path = English.lproj/english_help; sourceTree = "<group>"; };
+ F5E57A3702B2B518018C3E81 /* reload.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = reload.tiff; path = images/reload.tiff; sourceTree = "<group>"; };
+ F5E57A3902B2B518018C3E81 /* selectall.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = selectall.tiff; path = images/selectall.tiff; sourceTree = "<group>"; };
+ F5EC12FC04EE385401FE0D2B /* rowcopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = rowcopy.tiff; path = images/rowcopy.tiff; sourceTree = "<group>"; };
+ F5EC12FD04EE385401FE0D2B /* columncopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = columncopy.tiff; path = images/columncopy.tiff; sourceTree = "<group>"; };
+ F5EC130004EE444801FE0D2B /* tablecopy.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tablecopy.tiff; path = images/tablecopy.tiff; sourceTree = "<group>"; };
+ F5EC130104EE444801FE0D2B /* databases.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = databases.tiff; path = images/databases.tiff; sourceTree = "<group>"; };
+ F5EC130204EE444801FE0D2B /* dbadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = dbadd.tiff; path = images/dbadd.tiff; sourceTree = "<group>"; };
+ F5EC130304EE444801FE0D2B /* dbdelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = dbdelete.tiff; path = images/dbdelete.tiff; sourceTree = "<group>"; };
+ F5EC130404EE444801FE0D2B /* dbrefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = dbrefresh.tiff; path = images/dbrefresh.tiff; sourceTree = "<group>"; };
+ F5EC130704EE444801FE0D2B /* indexadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = indexadd.tiff; path = images/indexadd.tiff; sourceTree = "<group>"; };
+ F5EC130804EE444801FE0D2B /* indexdelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = indexdelete.tiff; path = images/indexdelete.tiff; sourceTree = "<group>"; };
+ F5EC130B04EE444801FE0D2B /* tableadd.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tableadd.tiff; path = images/tableadd.tiff; sourceTree = "<group>"; };
+ F5EC130C04EE444801FE0D2B /* tabledelete.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tabledelete.tiff; path = images/tabledelete.tiff; sourceTree = "<group>"; };
+ F5EC130D04EE444801FE0D2B /* tablerefresh.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tablerefresh.tiff; path = images/tablerefresh.tiff; sourceTree = "<group>"; };
+ F5EC130E04EE444801FE0D2B /* tables.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = tables.tiff; path = images/tables.tiff; sourceTree = "<group>"; };
+ F5FB320C029E966601566C24 /* MainController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MainController.h; sourceTree = "<group>"; };
+ F5FB320D029E966601566C24 /* MainController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MainController.m; sourceTree = "<group>"; };
+ F5FE5E7B0280319101613535 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/DBView.nib; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 9B9ACEE008DEBE70009E313E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 9B9ACEE108DEBE70009E313E /* AppKit.framework in Frameworks */,
+ 9B9ACEE208DEBE70009E313E /* Carbon.framework in Frameworks */,
+ 9B9ACEE308DEBE70009E313E /* Foundation.framework in Frameworks */,
+ 9B0646E409AF165700428D0B /* MCPKit_bundled.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4C5FDCFA73011CA2CEA /* Foundation.framework */,
+ 2A37F4C4FDCFA73011CA2CEA /* AppKit.framework */,
+ F5981AA203BA574A0100012B /* Carbon.framework */,
+ 9B0646E309AF165700428D0B /* MCPKit_bundled.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FB0FE9D524F11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 9B9ACEEA08DEBE70009E313E /* CocoaMySQL.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2A37F4AAFDCFA73011CA2CEA /* cocoaMySQL */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4ABFDCFA73011CA2CEA /* Classes */,
+ 2A37F4AFFDCFA73011CA2CEA /* Other Sources */,
+ 2A37F4B8FDCFA73011CA2CEA /* Resources */,
+ 2A37F4C3FDCFA73011CA2CEA /* Frameworks */,
+ 19C28FB0FE9D524F11CA2CBB /* Products */,
+ F55ECCBE02C6156601738522 /* gpl.txt */,
+ );
+ name = cocoaMySQL;
+ sourceTree = "<group>";
+ };
+ 2A37F4ABFDCFA73011CA2CEA /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ F548086D027F831E01DDA526 /* tabView classes */,
+ F52BA07F03BA15DA0100012B /* other classes */,
+ 2A37F4AEFDCFA73011CA2CEA /* TableDocument.h */,
+ 2A37F4ACFDCFA73011CA2CEA /* TableDocument.m */,
+ F5FB320C029E966601566C24 /* MainController.h */,
+ F5FB320D029E966601566C24 /* MainController.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 2A37F4AFFDCFA73011CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4B0FDCFA73011CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ F503C88F02B387CB01C66673 /* appicon.icns */,
+ 9B9ACEE908DEBE70009E313E /* Info.plist */,
+ F5E4F1AC03C8B2CB01000125 /* images */,
+ F5C0859D04A82C0E01B3137E /* English */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 2A37F4C3FDCFA73011CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A6FEA54F5311CA2CBB /* Linked Frameworks */,
+ 1058C7A8FEA54F5311CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 9BC3EEB409AC6EAB00F6B295 /* MCPKit */ = {
+ isa = PBXGroup;
+ children = (
+ 9BDFCCE408D4285100891F07 /* CMMCPConnection.h */,
+ 9BDFCCE508D4285100891F07 /* CMMCPConnection.m */,
+ 9BDFCD1208D42B1900891F07 /* CMMCPResult.h */,
+ 9BDFCD1308D42B1900891F07 /* CMMCPResult.m */,
+ );
+ name = MCPKit;
+ sourceTree = "<group>";
+ };
+ 9BC3EEB509AC6EBB00F6B295 /* GUI */ = {
+ isa = PBXGroup;
+ children = (
+ 9B40F86207461DC500D81DFB /* CMCopyTable.h */,
+ 9B40F86307461DC500D81DFB /* CMCopyTable.m */,
+ F51B8773050A8A1701000103 /* CMImageView.h */,
+ F51B8774050A8A1701000103 /* CMImageView.m */,
+ 9BC3EEB809AC6EE100F6B295 /* CMTextView.h */,
+ 9BC3EEB909AC6EE100F6B295 /* CMTextView.m */,
+ );
+ name = GUI;
+ sourceTree = "<group>";
+ };
+ 9BFF53AE08F44AFF004D6BCB /* SSHTunnel */ = {
+ isa = PBXGroup;
+ children = (
+ 9BE828B50908269400A18070 /* SSHTunnel.h */,
+ 9BE828B60908269400A18070 /* SSHTunnel.m */,
+ 9BFF53AF08F44B40004D6BCB /* askForPass.sh */,
+ 9BFF53B008F44B40004D6BCB /* CocoaMySQL.scriptSuite */,
+ 9BFF53B108F44B40004D6BCB /* CocoaMySQL.scriptTerminology */,
+ 9BFF536B08F43B9D004D6BCB /* SSHTunnel_old.h */,
+ 9BFF536C08F43B9E004D6BCB /* SSHTunnel_old.m */,
+ );
+ name = SSHTunnel;
+ sourceTree = "<group>";
+ };
+ F52BA07F03BA15DA0100012B /* other classes */ = {
+ isa = PBXGroup;
+ children = (
+ 9BFF53AE08F44AFF004D6BCB /* SSHTunnel */,
+ 9BC3EEB409AC6EAB00F6B295 /* MCPKit */,
+ 9BC3EEB509AC6EBB00F6B295 /* GUI */,
+ F52BA08003BA16430100012B /* KeyChain.h */,
+ F52BA45F03BA3D0B0100012B /* KeyChain.m */,
+ );
+ name = "other classes";
+ sourceTree = "<group>";
+ };
+ F548086D027F831E01DDA526 /* tabView classes */ = {
+ isa = PBXGroup;
+ children = (
+ 9B220E640751EE2700DA3E19 /* TableStatus.h */,
+ 9B220E650751EE2700DA3E19 /* TableStatus.m */,
+ F548087E027F870A01DDA526 /* TablesList.h */,
+ F548087F027F870A01DDA526 /* TablesList.m */,
+ F548087C027F870A01DDA526 /* TableSource.h */,
+ F548087D027F870A01DDA526 /* TableSource.m */,
+ F548087A027F870A01DDA526 /* TableContent.h */,
+ F548087B027F870A01DDA526 /* TableContent.m */,
+ F5C810CE0281C5A20139D141 /* CustomQuery.h */,
+ F5C810CF0281C5A20139D141 /* CustomQuery.m */,
+ F5A1A33A02A16816018594E7 /* TableDump.h */,
+ F5A1A33B02A16816018594E7 /* TableDump.m */,
+ );
+ name = "tabView classes";
+ sourceTree = "<group>";
+ };
+ F5C0859D04A82C0E01B3137E /* English */ = {
+ isa = PBXGroup;
+ children = (
+ 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */,
+ F5FE5E7A0280319101613535 /* DBView.nib */,
+ F58CAF13052C84EB01B3ED40 /* Localizable.strings */,
+ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */,
+ F5DB91380510F4B60186457F /* english_help */,
+ );
+ name = English;
+ sourceTree = "<group>";
+ };
+ F5E4F1AC03C8B2CB01000125 /* images */ = {
+ isa = PBXGroup;
+ children = (
+ F52FA4B40509F1B801000103 /* connectionadd.tiff */,
+ F52FA4B50509F1B801000103 /* connectiondelete.tiff */,
+ F51B86B3050A4E4F01000103 /* connectioncopy.tiff */,
+ F52FA4B60509F1B801000103 /* connectionrefresh.tiff */,
+ F5EC130104EE444801FE0D2B /* databases.tiff */,
+ F5EC130204EE444801FE0D2B /* dbadd.tiff */,
+ F5EC130304EE444801FE0D2B /* dbdelete.tiff */,
+ F5EC130404EE444801FE0D2B /* dbrefresh.tiff */,
+ F5EC130E04EE444801FE0D2B /* tables.tiff */,
+ F5EC130B04EE444801FE0D2B /* tableadd.tiff */,
+ F5EC130C04EE444801FE0D2B /* tabledelete.tiff */,
+ F5EC130004EE444801FE0D2B /* tablecopy.tiff */,
+ F5EC130D04EE444801FE0D2B /* tablerefresh.tiff */,
+ F52FA4D10509FF6401000103 /* textencode.tiff */,
+ F52FA4AC0509EF6201000103 /* columnadd.tiff */,
+ F52FA4AE0509F05101000103 /* columndelete.tiff */,
+ F52FA4B00509F0CA01000103 /* columnrefresh.tiff */,
+ F5EC12FD04EE385401FE0D2B /* columncopy.tiff */,
+ F5EC130704EE444801FE0D2B /* indexadd.tiff */,
+ F5EC130804EE444801FE0D2B /* indexdelete.tiff */,
+ F52FA4C90509FDDF01000103 /* rowadd.tiff */,
+ F5EC12FC04EE385401FE0D2B /* rowcopy.tiff */,
+ F52FA4CA0509FDDF01000103 /* rowdelete.tiff */,
+ F52FA4CB0509FDDF01000103 /* rowrefresh.tiff */,
+ F52FA4BE0509FB3E01000103 /* query.tiff */,
+ F52FA4BF0509FB3E01000103 /* queryadd.tiff */,
+ F52FA4C00509FB3E01000103 /* querydelete.tiff */,
+ F51B86B4050A4E4F01000103 /* querycopy.tiff */,
+ F52FA4C10509FB3E01000103 /* queryrefresh.tiff */,
+ F5E57A3902B2B518018C3E81 /* selectall.tiff */,
+ F51547F604E8E9B901000103 /* selectnone.tiff */,
+ F570FC9502A05DFD0127F14A /* sort-down.tiff */,
+ F570FC9602A05DFD0127F14A /* sort-up.tiff */,
+ F5E57A3702B2B518018C3E81 /* reload.tiff */,
+ F52FA4CF0509FF6401000103 /* sheettotable.tiff */,
+ F52FA4D00509FF6401000103 /* tabletosheet.tiff */,
+ F52FA4BB0509F6C601000103 /* showconsole.tiff */,
+ F52FA4BA0509F6C601000103 /* hideconsole.tiff */,
+ F5A1F6DB04EE666101FE0D2B /* clearconsole.tiff */,
+ F5A1F6E004EE666101FE0D2B /* showvariables.tiff */,
+ F5A1F6DD04EE666101FE0D2B /* flushprivileges.tiff */,
+ F5A1F6DE04EE666101FE0D2B /* optimizetable.tiff */,
+ F5A1F6DC04EE666101FE0D2B /* createtablesyntax.tiff */,
+ );
+ name = images;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 9B9ACE9108DEBE70009E313E /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 9B9ACE9208DEBE70009E313E /* TableDocument.h in Headers */,
+ 9B9ACE9308DEBE70009E313E /* TableContent.h in Headers */,
+ 9B9ACE9408DEBE70009E313E /* TableSource.h in Headers */,
+ 9B9ACE9508DEBE70009E313E /* CustomQuery.h in Headers */,
+ 9B9ACE9608DEBE70009E313E /* TablesList.h in Headers */,
+ 9B9ACE9708DEBE70009E313E /* MainController.h in Headers */,
+ 9B9ACE9808DEBE70009E313E /* TableDump.h in Headers */,
+ 9B9ACE9908DEBE70009E313E /* KeyChain.h in Headers */,
+ 9B9ACE9A08DEBE70009E313E /* CMImageView.h in Headers */,
+ 9B9ACE9B08DEBE70009E313E /* CMCopyTable.h in Headers */,
+ 9B9ACE9C08DEBE70009E313E /* TableStatus.h in Headers */,
+ 9B9ACE9D08DEBE70009E313E /* CMMCPConnection.h in Headers */,
+ 9B9ACE9E08DEBE70009E313E /* CMMCPResult.h in Headers */,
+ 9BE828B70908269400A18070 /* SSHTunnel.h in Headers */,
+ 9BC3EEBA09AC6EE100F6B295 /* CMTextView.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 9B9ACE9008DEBE70009E313E /* CocoaMySQL */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 9B9ACEE508DEBE70009E313E /* Build configuration list for PBXNativeTarget "CocoaMySQL" */;
+ buildPhases = (
+ 9B9ACE9108DEBE70009E313E /* Headers */,
+ 9B9ACE9F08DEBE70009E313E /* Resources */,
+ 9B9ACECF08DEBE70009E313E /* Sources */,
+ 9B9ACEDE08DEBE70009E313E /* CopyFiles */,
+ 9B9ACEE008DEBE70009E313E /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = CocoaMySQL;
+ productName = cocoaMySQL;
+ productReference = 9B9ACEEA08DEBE70009E313E /* CocoaMySQL.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 2A37F4A9FDCFA73011CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 9BED648908C0E73200C18B6E /* Build configuration list for PBXProject "CocoaMySQL" */;
+ compatibilityVersion = "Xcode 2.4";
+ hasScannedForEncodings = 1;
+ mainGroup = 2A37F4AAFDCFA73011CA2CEA /* cocoaMySQL */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 9B9ACE9008DEBE70009E313E /* CocoaMySQL */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 9B9ACE9F08DEBE70009E313E /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 9B9ACEA008DEBE70009E313E /* Credits.rtf in Resources */,
+ 9B9ACEA108DEBE70009E313E /* MainMenu.nib in Resources */,
+ 9B9ACEA308DEBE70009E313E /* DBView.nib in Resources */,
+ 9B9ACEA408DEBE70009E313E /* sort-down.tiff in Resources */,
+ 9B9ACEA508DEBE70009E313E /* sort-up.tiff in Resources */,
+ 9B9ACEA608DEBE70009E313E /* selectall.tiff in Resources */,
+ 9B9ACEA708DEBE70009E313E /* appicon.icns in Resources */,
+ 9B9ACEA808DEBE70009E313E /* gpl.txt in Resources */,
+ 9B9ACEA908DEBE70009E313E /* selectnone.tiff in Resources */,
+ 9B9ACEAA08DEBE70009E313E /* rowcopy.tiff in Resources */,
+ 9B9ACEAB08DEBE70009E313E /* columncopy.tiff in Resources */,
+ 9B9ACEAC08DEBE70009E313E /* tablecopy.tiff in Resources */,
+ 9B9ACEAD08DEBE70009E313E /* databases.tiff in Resources */,
+ 9B9ACEAE08DEBE70009E313E /* dbadd.tiff in Resources */,
+ 9B9ACEAF08DEBE70009E313E /* dbdelete.tiff in Resources */,
+ 9B9ACEB008DEBE70009E313E /* dbrefresh.tiff in Resources */,
+ 9B9ACEB108DEBE70009E313E /* indexadd.tiff in Resources */,
+ 9B9ACEB208DEBE70009E313E /* indexdelete.tiff in Resources */,
+ 9B9ACEB308DEBE70009E313E /* tableadd.tiff in Resources */,
+ 9B9ACEB408DEBE70009E313E /* tabledelete.tiff in Resources */,
+ 9B9ACEB508DEBE70009E313E /* tablerefresh.tiff in Resources */,
+ 9B9ACEB608DEBE70009E313E /* tables.tiff in Resources */,
+ 9B9ACEB708DEBE70009E313E /* clearconsole.tiff in Resources */,
+ 9B9ACEB808DEBE70009E313E /* createtablesyntax.tiff in Resources */,
+ 9B9ACEB908DEBE70009E313E /* flushprivileges.tiff in Resources */,
+ 9B9ACEBA08DEBE70009E313E /* optimizetable.tiff in Resources */,
+ 9B9ACEBB08DEBE70009E313E /* showvariables.tiff in Resources */,
+ 9B9ACEBC08DEBE70009E313E /* columnadd.tiff in Resources */,
+ 9B9ACEBD08DEBE70009E313E /* columndelete.tiff in Resources */,
+ 9B9ACEBE08DEBE70009E313E /* columnrefresh.tiff in Resources */,
+ 9B9ACEBF08DEBE70009E313E /* connectionadd.tiff in Resources */,
+ 9B9ACEC008DEBE70009E313E /* connectiondelete.tiff in Resources */,
+ 9B9ACEC108DEBE70009E313E /* hideconsole.tiff in Resources */,
+ 9B9ACEC208DEBE70009E313E /* showconsole.tiff in Resources */,
+ 9B9ACEC308DEBE70009E313E /* queryadd.tiff in Resources */,
+ 9B9ACEC408DEBE70009E313E /* querydelete.tiff in Resources */,
+ 9B9ACEC508DEBE70009E313E /* rowadd.tiff in Resources */,
+ 9B9ACEC608DEBE70009E313E /* rowdelete.tiff in Resources */,
+ 9B9ACEC708DEBE70009E313E /* rowrefresh.tiff in Resources */,
+ 9B9ACEC808DEBE70009E313E /* sheettotable.tiff in Resources */,
+ 9B9ACEC908DEBE70009E313E /* tabletosheet.tiff in Resources */,
+ 9B9ACECA08DEBE70009E313E /* textencode.tiff in Resources */,
+ 9B9ACECB08DEBE70009E313E /* connectioncopy.tiff in Resources */,
+ 9B9ACECC08DEBE70009E313E /* querycopy.tiff in Resources */,
+ 9B9ACECD08DEBE70009E313E /* english_help in Resources */,
+ 9B9ACECE08DEBE70009E313E /* Localizable.strings in Resources */,
+ 9BFF53B208F44B40004D6BCB /* askForPass.sh in Resources */,
+ 9BFF53B308F44B40004D6BCB /* CocoaMySQL.scriptSuite in Resources */,
+ 9BFF53B408F44B40004D6BCB /* CocoaMySQL.scriptTerminology in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 9B9ACECF08DEBE70009E313E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 9B9ACED008DEBE70009E313E /* TableDocument.m in Sources */,
+ 9B9ACED108DEBE70009E313E /* main.m in Sources */,
+ 9B9ACED208DEBE70009E313E /* TableContent.m in Sources */,
+ 9B9ACED308DEBE70009E313E /* TableSource.m in Sources */,
+ 9B9ACED408DEBE70009E313E /* TablesList.m in Sources */,
+ 9B9ACED508DEBE70009E313E /* CustomQuery.m in Sources */,
+ 9B9ACED608DEBE70009E313E /* MainController.m in Sources */,
+ 9B9ACED708DEBE70009E313E /* TableDump.m in Sources */,
+ 9B9ACED808DEBE70009E313E /* KeyChain.m in Sources */,
+ 9B9ACED908DEBE70009E313E /* CMImageView.m in Sources */,
+ 9B9ACEDA08DEBE70009E313E /* CMCopyTable.m in Sources */,
+ 9B9ACEDB08DEBE70009E313E /* TableStatus.m in Sources */,
+ 9B9ACEDC08DEBE70009E313E /* CMMCPConnection.m in Sources */,
+ 9B9ACEDD08DEBE70009E313E /* CMMCPResult.m in Sources */,
+ 9BE828B80908269400A18070 /* SSHTunnel.m in Sources */,
+ 9BC3EEBB09AC6EE100F6B295 /* CMTextView.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 2A37F4B6FDCFA73011CA2CEA /* MainMenu.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2A37F4B7FDCFA73011CA2CEA /* English */,
+ );
+ name = MainMenu.nib;
+ sourceTree = "<group>";
+ };
+ 2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 2A37F4BAFDCFA73011CA2CEA /* English */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+ F58CAF13052C84EB01B3ED40 /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F58CAF14052C84EB01B3ED40 /* English */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
+ F5DB91380510F4B60186457F /* english_help */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F5DB91390510F4B60186457F /* English */,
+ );
+ name = english_help;
+ sourceTree = "<group>";
+ };
+ F5FE5E7A0280319101613535 /* DBView.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F5FE5E7B0280319101613535 /* English */,
+ );
+ name = DBView.nib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 9B9ACEE608DEBE70009E313E /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH)";
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ .,
+ "$(SRCROOT)",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ HEADER_SEARCH_PATHS = "";
+ INFOPLIST_FILE = Info.plist;
+ LIBRARY_SEARCH_PATHS = "";
+ MACOSX_DEPLOYMENT_TARGET = 10.4;
+ PRODUCT_NAME = CocoaMySQL;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ name = Development;
+ };
+ 9B9ACEE708DEBE70009E313E /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ .,
+ "$(SRCROOT)",
+ );
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ HEADER_SEARCH_PATHS = "";
+ INFOPLIST_FILE = Info.plist;
+ LIBRARY_SEARCH_PATHS = "";
+ MACOSX_DEPLOYMENT_TARGET = 10.4;
+ MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
+ MACOSX_DEPLOYMENT_TARGET_ppc = 10.3;
+ PRODUCT_NAME = CocoaMySQL;
+ SECTORDER_FLAGS = "";
+ VERSIONING_SYSTEM = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = NO;
+ };
+ name = Deployment;
+ };
+ 9B9ACEE808DEBE70009E313E /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ FRAMEWORK_SEARCH_PATHS = (
+ .,
+ "$(SRCROOT)",
+ );
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ HEADER_SEARCH_PATHS = "";
+ INFOPLIST_FILE = Info.plist;
+ LIBRARY_SEARCH_PATHS = "";
+ MACOSX_DEPLOYMENT_TARGET = 10.4;
+ PRODUCT_NAME = CocoaMySQL;
+ SECTORDER_FLAGS = "";
+ WARNING_CFLAGS = (
+ "-Wmost",
+ "-Wno-four-char-constants",
+ "-Wno-unknown-pragmas",
+ );
+ WRAPPER_EXTENSION = app;
+ };
+ name = Default;
+ };
+ 9BED648A08C0E73200C18B6E /* Development */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Development;
+ };
+ 9BED648B08C0E73200C18B6E /* Deployment */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Deployment;
+ };
+ 9BED648C08C0E73200C18B6E /* Default */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Default;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 9B9ACEE508DEBE70009E313E /* Build configuration list for PBXNativeTarget "CocoaMySQL" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 9B9ACEE608DEBE70009E313E /* Development */,
+ 9B9ACEE708DEBE70009E313E /* Deployment */,
+ 9B9ACEE808DEBE70009E313E /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+ 9BED648908C0E73200C18B6E /* Build configuration list for PBXProject "CocoaMySQL" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 9BED648A08C0E73200C18B6E /* Development */,
+ 9BED648B08C0E73200C18B6E /* Deployment */,
+ 9BED648C08C0E73200C18B6E /* Default */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Default;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 2A37F4A9FDCFA73011CA2CEA /* Project object */;
+}
diff --git a/CustomQuery.h b/CustomQuery.h
new file mode 100644
index 00000000..c58ca973
--- /dev/null
+++ b/CustomQuery.h
@@ -0,0 +1,105 @@
+//
+// CustomQuery.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMCopyTable.h"
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+
+
+@interface CustomQuery : NSObject {
+
+ IBOutlet id tableDumpInstance;
+
+ IBOutlet id tableWindow;
+ IBOutlet id queryFavoritesButton;
+ IBOutlet id queryHistoryButton;
+ IBOutlet id textView;
+ IBOutlet CMCopyTable *customQueryView;
+ IBOutlet id errorText;
+ IBOutlet id affectedRowsText;
+ IBOutlet id valueSheet;
+ IBOutlet id valueTextField;
+ IBOutlet id queryFavoritesSheet;
+ IBOutlet id queryFavoritesView;
+
+ CMMCPConnection *mySQLConnection;
+ NSArray *queryResult;
+ NSUserDefaults *prefs;
+ NSMutableArray *queryFavorites;
+}
+
+//IBAction methods
+- (IBAction)performQuery:(id)sender;
+- (IBAction)chooseQueryFavorite:(id)sender;
+- (IBAction)chooseQueryHistory:(id)sender;
+- (IBAction)closeSheet:(id)sender;
+
+//queryFavoritesSheet methods
+- (IBAction)addQueryFavorite:(id)sender;
+- (IBAction)removeQueryFavorite:(id)sender;
+- (IBAction)copyQueryFavorite:(id)sender;
+- (IBAction)closeQueryFavoritesSheet:(id)sender;
+
+//getter methods
+- (NSArray *)currentResult;
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection;
+- (void)setFavorites;
+- (void)doPerformQueryService:(NSString *)query;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//tableView drag&drop datasource methods
+- (BOOL)tableView:(NSTableView *)aTableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard;
+- (NSDragOperation)tableView:(NSTableView*)aTableView validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+ proposedDropOperation:(NSTableViewDropOperation)operation;
+- (BOOL)tableView:(NSTableView*)aTableView acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation;
+
+//tableView delegate methods
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
+
+//splitView delegate methods
+- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview;
+- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset;
+- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset;
+
+//textView delegate methods
+- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector;
+
+//last but not least
+- (id)init;
+- (void)dealloc;
+
+@end
diff --git a/CustomQuery.m b/CustomQuery.m
new file mode 100644
index 00000000..c8a3efd9
--- /dev/null
+++ b/CustomQuery.m
@@ -0,0 +1,755 @@
+//
+// CustomQuery.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "CustomQuery.h"
+#import "TableDump.h"
+
+
+@implementation CustomQuery
+
+//IBAction methods
+- (IBAction)performQuery:(id)sender;
+/*
+performs the mysql-query given by the user
+sets the tableView columns corresponding to the mysql-result
+*/
+{
+ NSArray *theColumns;
+ NSTableColumn *theCol;
+ CMMCPResult *theResult = nil;
+ NSArray *queries;
+// NSArray *theTypes;
+ NSMutableArray *menuItems = [NSMutableArray array];
+ NSMutableArray *tempResult = [NSMutableArray array];
+ NSMutableString *errors = [NSMutableString string];
+ int i;
+
+ //query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ //split queries by ;'s
+ queries = [tableDumpInstance splitQueries:[textView string]];
+
+//perform queries
+ for ( i = 0 ; i < [queries count] ; i++ ) {
+ theResult = [mySQLConnection queryString:[queries objectAtIndex:i]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ //query gave error
+ if ( [queries count] > 1 ) {
+ [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in query %d] %@\n", @"error text when multiple custom query failed"),
+ i+1,
+ [mySQLConnection getLastErrorMessage]]];
+ } else {
+ [errors setString:[mySQLConnection getLastErrorMessage]];
+ }
+ }
+// theTypes = [queryResult fetchTypesAsArray];
+ }
+
+ //perform empty query if no query is given
+ if ( [queries count] == 0 ) {
+ theResult = [mySQLConnection queryString:@""];
+ [errors setString:[mySQLConnection getLastErrorMessage]];
+ }
+
+//put result in array
+ [queryResult release];
+ queryResult = nil;
+ if ( nil != theResult )
+ {
+ int r = [theResult numOfRows];
+ for ( i = 0 ; i < r ; i++ ) {
+ [theResult dataSeek:i];
+ [tempResult addObject:[theResult fetchRowAsArray]];
+ }
+ queryResult = [[NSArray arrayWithArray:tempResult] retain];
+ }
+
+//add query to history
+ [queryHistoryButton insertItemWithTitle:[textView string] atIndex:1];
+ while ( [queryHistoryButton numberOfItems] > 21 ) {
+ [queryHistoryButton removeItemAtIndex:[queryHistoryButton numberOfItems]-1];
+ }
+ for ( i = 1 ; i < [queryHistoryButton numberOfItems] ; i++ )
+ {
+ [menuItems addObject:[queryHistoryButton itemTitleAtIndex:i]];
+ }
+ [prefs setObject:menuItems forKey:@"queryHistory"];
+
+//select the text of the query textView and set standard font
+ [textView selectAll:self];
+ if ( [errors length] ) {
+ [errorText setStringValue:errors];
+ } else {
+ [errorText setStringValue:NSLocalizedString(@"There were no errors.", @"text shown when query was successfull")];
+ }
+ if ( [mySQLConnection affectedRows] != -1 ) {
+ [affectedRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%@ row(s) affected", @"text showing how many rows have been affected"),
+ [[NSNumber numberWithLongLong:[mySQLConnection affectedRows]] stringValue]]];
+ } else {
+ [affectedRowsText setStringValue:@""];
+ }
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [textView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ } else {
+ [textView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+
+ if ( !theResult || ![theResult numOfRows] ) {
+//no rows in result
+ //free tableView
+ theColumns = [customQueryView tableColumns];
+ while ([theColumns count]) {
+ [customQueryView removeTableColumn:[theColumns objectAtIndex:0]];
+ }
+// theCol = [[NSTableColumn alloc] initWithIdentifier:@""];
+// [[theCol headerCell] setStringValue:@""];
+// [customQueryView addTableColumn:theCol];
+// [customQueryView sizeLastColumnToFit];
+ [customQueryView reloadData];
+// [theCol release];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ return;
+ }
+
+//set columns
+//remove all columns
+ theColumns = [customQueryView tableColumns];
+// i=0;
+ while ([theColumns count]) {
+ [customQueryView removeTableColumn:[theColumns objectAtIndex:0]];
+// i++;
+ }
+
+//add columns, corresponding to the query result
+ theColumns = [theResult fetchFieldNames];
+ for ( i = 0 ; i < [theResult numOfFields] ; i++) {
+ theCol = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithInt:i]];
+// theCol = [[NSTableColumn alloc] initWithIdentifier:[theColumns objectAtIndex:i]];
+// [theCol setEditable:NO];
+ if ( [theCol respondsToSelector:@selector(setResizingMask:)] ) {
+ // os 10.4
+ [theCol setResizingMask:NSTableColumnUserResizingMask];
+ } else {
+ // os pre-10.4
+ [theCol setResizable:YES];
+ }
+ NSTextFieldCell *dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease];
+ [dataCell setEditable:NO];
+ // [[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [dataCell setFont:[NSFont fontWithName:@"Monaco" size:10]];
+ } else {
+ [dataCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+ if ( [dataCell respondsToSelector:@selector(setLineBreakMode:)] ) {
+ // os 10.4
+ [dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
+ }
+ [theCol setDataCell:dataCell];
+/*
+ if ([[theTypes objectAtIndex:i] isEqualToString:@"timestamp"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc]
+ initWithDateFormat:@"%d/%m/%Y at %H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([[theTypes objectAtIndex:i] isEqualToString:@"datetime"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%d/%m/%Y at %H:%M:%S" allowNaturalLanguage:YES]];
+ }
+*/
+ [[theCol headerCell] setStringValue:[theColumns objectAtIndex:i]];
+
+ [customQueryView addTableColumn:theCol];
+ [theCol release];
+ }
+
+ [customQueryView sizeLastColumnToFit];
+ //tries to fix problem with last row (otherwise to small)
+ //sets last column to width of the first if smaller than 30
+ //problem not fixed for resizing window
+/*
+ if ( [[customQueryView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]] width] < 30 )
+ [[customQueryView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]]
+ setWidth:[[customQueryView tableColumnWithIdentifier:[theColumns objectAtIndex:0]] width]];
+*/
+ if ( [[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:[theColumns count]-1]] width] < 30 )
+ [[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:[theColumns count]-1]]
+ setWidth:[[customQueryView tableColumnWithIdentifier:[NSNumber numberWithInt:0]] width]];
+ [customQueryView reloadData];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+}
+
+- (IBAction)chooseQueryFavorite:(id)sender
+/*
+insert the choosen favorite query in the query textView or save query to favorites or opens window to edit favorites
+*/
+{
+ if ( [queryFavoritesButton indexOfSelectedItem] == 1) {
+//save query to favorites
+ //check if favorite doesn't exist
+ NSEnumerator *enumerator = [queryFavorites objectEnumerator];
+ id favorite;
+ while ( (favorite = [enumerator nextObject]) ) {
+ if ( [favorite isEqualToString:[textView string]] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"Query already exists in favorites.", @"message of panel when trying to save query which already exists in favorites"));
+ return;
+ }
+ }
+ if ( [[textView string] isEqualToString:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"Query can't be empty.", @"message of panel when trying to save empty query"));
+ return;
+ }
+ [queryFavorites addObject:[NSString stringWithString:[textView string]]];
+ [prefs setObject:queryFavorites forKey:@"queryFavorites"];
+ [self setFavorites];
+ } else if ( [queryFavoritesButton indexOfSelectedItem] == 2) {
+//edit favorites
+ [NSApp beginSheet:queryFavoritesSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:queryFavoritesSheet];
+
+ [NSApp endSheet:queryFavoritesSheet];
+ [queryFavoritesSheet orderOut:nil];
+ } else if ( [queryFavoritesButton indexOfSelectedItem] != 3) {
+//choose favorite
+ [textView replaceCharactersInRange:[textView selectedRange] withString:[queryFavoritesButton titleOfSelectedItem]];
+ }
+}
+
+- (IBAction)chooseQueryHistory:(id)sender
+/*
+insert the choosen history query in the query textView
+*/
+{
+ [textView setString:[queryHistoryButton titleOfSelectedItem]];
+ [textView selectAll:self];
+}
+
+- (IBAction)closeSheet:(id)sender
+/*
+closes the sheet
+*/
+{
+ [NSApp stopModal];
+}
+
+
+//queryFavoritesSheet methods
+- (IBAction)addQueryFavorite:(id)sender
+/*
+adds a query favorite
+*/
+{
+ int row = [queryFavoritesView editedRow];
+ int column = [queryFavoritesView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+//end editing
+ if ( row != -1 ) {
+ tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[queryFavoritesView currentEditor]];
+ }
+
+ [queryFavorites addObject:[NSString string]];
+ [queryFavoritesView reloadData];
+ [queryFavoritesView selectRow:[queryFavoritesView numberOfRows]-1 byExtendingSelection:NO];
+ [queryFavoritesView editColumn:0 row:[queryFavoritesView numberOfRows]-1 withEvent:nil select:YES];
+}
+
+- (IBAction)removeQueryFavorite:(id)sender
+/*
+removes a query favorite
+*/
+{
+ int row = [queryFavoritesView editedRow];
+ int column = [queryFavoritesView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+//end editing
+ if ( row != -1 ) {
+ tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[queryFavoritesView currentEditor]];
+ }
+
+ if ( [queryFavoritesView numberOfSelectedRows] > 0 ) {
+ [queryFavorites removeObjectAtIndex:[queryFavoritesView selectedRow]];
+ [queryFavoritesView reloadData];
+ }
+}
+
+- (IBAction)copyQueryFavorite:(id)sender
+/*
+copies a query favorite
+*/
+{
+ int row = [queryFavoritesView editedRow];
+ int column = [queryFavoritesView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+//end editing
+ if ( row != -1 ) {
+ tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[queryFavoritesView currentEditor]];
+ }
+
+ if ( [queryFavoritesView numberOfSelectedRows] > 0 ) {
+ [queryFavorites insertObject:
+ [NSString stringWithString:[queryFavorites objectAtIndex:[queryFavoritesView selectedRow]]]
+ atIndex:[queryFavoritesView selectedRow]+1];
+ [queryFavoritesView reloadData];
+ [queryFavoritesView selectRow:[queryFavoritesView selectedRow]+1 byExtendingSelection:NO];
+ [queryFavoritesView editColumn:0 row:[queryFavoritesView selectedRow] withEvent:nil select:YES];
+ }
+}
+
+- (IBAction)closeQueryFavoritesSheet:(id)sender
+/*
+closes queryFavoritesSheet and saves favorites to preferences
+*/
+{
+ int row = [queryFavoritesView editedRow];
+ int column = [queryFavoritesView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+//end editing
+ if ( row != -1 ) {
+ tableColumn = [[queryFavoritesView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[queryFavoritesView currentEditor]];
+ }
+
+ [NSApp stopModal];
+ [prefs setObject:queryFavorites forKey:@"queryFavorites"];
+ [self setFavorites];
+}
+
+
+//getter methods
+- (NSArray *)currentResult
+/*
+returns the current result (as shown in custom result view) as array, the first object containing the field names as array, the following objects containing the rows as array
+*/
+{
+ NSArray *tableColumns = [customQueryView tableColumns];
+ NSEnumerator *enumerator = [tableColumns objectEnumerator];
+ id tableColumn;
+ NSMutableArray *currentResult = [NSMutableArray array];
+ NSMutableArray *tempRow = [NSMutableArray array];
+ int i;
+
+ //set field names as first line
+ while ( (tableColumn = [enumerator nextObject]) ) {
+ [tempRow addObject:[[tableColumn headerCell] stringValue]];
+ }
+ [currentResult addObject:[NSArray arrayWithArray:tempRow]];
+
+ //add rows
+ for ( i = 0 ; i < [self numberOfRowsInTableView:customQueryView] ; i++) {
+ [tempRow removeAllObjects];
+ enumerator = [tableColumns objectEnumerator];
+ while ( (tableColumn = [enumerator nextObject]) ) {
+ [tempRow addObject:[self tableView:customQueryView objectValueForTableColumn:tableColumn row:i]];
+ }
+ [currentResult addObject:[NSArray arrayWithArray:tempRow]];
+ }
+ return currentResult;
+}
+
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection
+/*
+sets the connection (received from TableDocument) and makes things that have to be done only once
+*/
+{
+ NSArray *tableColumns = [queryFavoritesView tableColumns];
+ NSEnumerator *enumerator = [tableColumns objectEnumerator];
+ id column;
+
+ mySQLConnection = theConnection;
+
+ prefs = [[NSUserDefaults standardUserDefaults] retain];
+ if ( [prefs objectForKey:@"queryFavorites"] ) {
+ queryFavorites = [[NSMutableArray alloc] initWithArray:[prefs objectForKey:@"queryFavorites"]];
+ } else {
+ queryFavorites = [[NSMutableArray array] retain];
+ }
+
+//set up interface
+ [customQueryView setVerticalMotionCanBeginDrag:NO];
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [textView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ } else {
+ [textView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+ [textView setContinuousSpellCheckingEnabled:NO];
+ [queryFavoritesView registerForDraggedTypes:[NSArray arrayWithObjects:@"CocoaMySQLPasteboard", nil]];
+ while ( (column = [enumerator nextObject]) )
+ {
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [[column dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]];
+ } else {
+ [[column dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+ }
+// [queryFavoritesView reloadData];
+ if ( [prefs objectForKey:@"queryHistory"] )
+ {
+ [queryHistoryButton addItemsWithTitles:[prefs objectForKey:@"queryHistory"]];
+ }
+ [self setFavorites];
+}
+
+- (void)setFavorites
+/*
+set up the favorites popUpButton
+*/
+{
+ int i;
+
+//remove all menuItems and add favorites from preferences
+ for ( i = 4 ; i < [queryFavoritesButton numberOfItems] ; i++ ) {
+ [queryFavoritesButton removeItemAtIndex:i];
+ }
+ [queryFavoritesButton addItemsWithTitles:queryFavorites];
+}
+
+- (void)doPerformQueryService:(NSString *)query
+/*
+inserts the query in the textView and performs query
+*/
+{
+ [textView setString:query];
+ [self performQuery:self];
+}
+
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ if ( aTableView == customQueryView ) {
+ if ( nil == queryResult ) {
+ return 0;
+ } else {
+ return [queryResult count];
+ }
+ } else if ( aTableView == queryFavoritesView ) {
+ return [queryFavorites count];
+ } else {
+ return 0;
+ }
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ NSArray *theRow;
+// NSString *theIdentifier = [aTableColumn identifier];
+ NSNumber *theIdentifier = [aTableColumn identifier];
+
+ if ( aTableView == customQueryView ) {
+ theRow = [queryResult objectAtIndex:rowIndex];
+
+ if ( [[theRow objectAtIndex:[theIdentifier intValue]] isKindOfClass:[NSData class]] ) {
+ NSString *tmp = [[NSString alloc] initWithData:[theRow objectAtIndex:[theIdentifier intValue]]
+ encoding:[mySQLConnection encoding]];
+ return [tmp autorelease];
+ }
+ if ( [[theRow objectAtIndex:[theIdentifier intValue]] isMemberOfClass:[NSNull class]] )
+ return [prefs objectForKey:@"nullValue"];
+
+ return [theRow objectAtIndex:[theIdentifier intValue]];
+ } else if ( aTableView == queryFavoritesView ) {
+ return [queryFavorites objectAtIndex:rowIndex];
+ } else {
+ return @"";
+ }
+}
+
+- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
+{
+ if ( aTableView == queryFavoritesView ) {
+ NSEnumerator *enumerator = [queryFavorites objectEnumerator];
+ id favorite;
+ int i = 0;
+
+ if ( [anObject isEqualToString:@""] ) {
+// NSRunAlertPanel(@"Error", @"Query can't be empty.", @"OK", nil, nil);
+ //remove row
+// if ( [[queryFavorites objectAtIndex:rowIndex] isEqualToString:@""] ) {
+ [queryFavoritesView deselectAll:self];
+ [queryFavorites removeObjectAtIndex:rowIndex];
+ [queryFavoritesView reloadData];
+ return;
+ }
+
+ while ( (favorite = [enumerator nextObject]) ) {
+ if ( [favorite isEqualToString:anObject] && i != rowIndex) {
+ NSRunAlertPanel(@"Error", @"Query already exists in favorites.", @"OK", nil, nil);
+ //remove row if it was a (blank) new row or a copied row
+ if ( [[queryFavorites objectAtIndex:rowIndex] isEqualToString:@""] ||
+ [[queryFavorites objectAtIndex:rowIndex] isEqualToString:anObject] ) {
+ [queryFavoritesView deselectAll:self];
+ [queryFavorites removeObjectAtIndex:rowIndex];
+ [queryFavoritesView reloadData];
+ }
+ return;
+ }
+ i++;
+ }
+ [queryFavorites replaceObjectAtIndex:rowIndex withObject:anObject];
+ }
+}
+
+
+//tableView drag&drop datasource methods
+- (BOOL)tableView:(NSTableView *)aTableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard
+{
+ int originalRow;
+ NSArray *pboardTypes;
+
+ if ( aTableView == queryFavoritesView )
+ {
+ if ( [rows count] == 1 )
+ {
+ pboardTypes = [NSArray arrayWithObjects:@"CocoaMySQLPasteboard", nil];
+ originalRow = [[rows objectAtIndex:0] intValue];
+
+ [pboard declareTypes:pboardTypes owner:nil];
+ [pboard setString:[[NSNumber numberWithInt:originalRow] stringValue] forType:@"CocoaMySQLPasteboard"];
+
+ return YES;
+ }
+ else
+ {
+ return NO;
+ }
+ } else if ( aTableView == customQueryView ) {
+ NSString *tmp = [customQueryView draggedRowsAsTabString:rows];
+ if ( nil != tmp )
+ {
+ [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType,
+ NSStringPboardType, nil]
+ owner:nil];
+ [pboard setString:tmp forType:NSStringPboardType];
+ [pboard setString:tmp forType:NSTabularTextPboardType];
+ return YES;
+ }
+ return NO;
+ } else {
+ return NO;
+ }
+}
+
+- (NSDragOperation)tableView:(NSTableView*)aTableView validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+ proposedDropOperation:(NSTableViewDropOperation)operation
+{
+ NSArray *pboardTypes = [[info draggingPasteboard] types];
+ int originalRow;
+
+ if ( aTableView == queryFavoritesView ) {
+ if ([pboardTypes count] == 1 && row != -1)
+ {
+ if ([[pboardTypes objectAtIndex:0] isEqualToString:@"CocoaMySQLPasteboard"]==YES && operation==NSTableViewDropAbove)
+ {
+ originalRow = [[[info draggingPasteboard] stringForType:@"CocoaMySQLPasteboard"] intValue];
+
+ if (row != originalRow && row != (originalRow+1))
+ {
+ return NSDragOperationMove;
+ }
+ }
+ }
+ return NSDragOperationNone;
+ } else {
+ return NSDragOperationNone;
+ }
+}
+
+- (BOOL)tableView:(NSTableView*)aTableView acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation
+{
+ int originalRow;
+ int destinationRow;
+ NSMutableDictionary *draggedRow;
+
+ if ( aTableView == queryFavoritesView ) {
+ originalRow = [[[info draggingPasteboard] stringForType:@"CocoaMySQLPasteboard"] intValue];
+ destinationRow = row;
+
+ if ( destinationRow > originalRow )
+ destinationRow--;
+
+ draggedRow = [queryFavorites objectAtIndex:originalRow];
+ [queryFavorites removeObjectAtIndex:originalRow];
+ [queryFavorites insertObject:draggedRow atIndex:destinationRow];
+
+ [queryFavoritesView reloadData];
+ [queryFavoritesView selectRow:destinationRow byExtendingSelection:NO];
+
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+
+//tableView delegate methods
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
+/*
+opens sheet with value when double clicking on a field
+*/
+{
+ if ( aTableView == customQueryView ) {
+ NSArray *theRow;
+ NSString *theValue;
+ NSNumber *theIdentifier = [aTableColumn identifier];
+
+ //get the value
+ theRow = [queryResult objectAtIndex:rowIndex];
+
+ if ( [[theRow objectAtIndex:[theIdentifier intValue]] isKindOfClass:[NSData class]] ) {
+ theValue = [[NSString alloc] initWithData:[theRow objectAtIndex:[theIdentifier intValue]]
+ encoding:[mySQLConnection encoding]];
+ [theValue autorelease];
+ } else if ( [[theRow objectAtIndex:[theIdentifier intValue]] isMemberOfClass:[NSNull class]] ) {
+ theValue = [prefs objectForKey:@"nullValue"];
+ } else {
+ theValue = [theRow objectAtIndex:[theIdentifier intValue]];
+ }
+
+ [valueTextField setString:[theValue description]];
+ [valueTextField selectAll:self];
+ [NSApp beginSheet:valueSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:valueSheet];
+
+ [NSApp endSheet:valueSheet];
+ [valueSheet orderOut:nil];
+
+ return NO;
+ } else {
+ return YES;
+ }
+}
+
+
+//splitView delegate methods
+- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview
+/*
+tells the splitView that it can collapse views
+*/
+{
+ return YES;
+}
+
+- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset
+/*
+defines max position of splitView
+*/
+{
+ if ( offset == 0 ) {
+ return proposedMax - 100;
+ } else {
+ return proposedMax - 73;
+ }
+}
+
+- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset
+/*
+defines min position of splitView
+*/
+{
+ if ( offset == 0 ) {
+ return proposedMin + 100;
+ } else {
+ return proposedMin + 100;
+ }
+}
+
+
+//textView delegate methods
+- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector
+/*
+traps enter key and
+ performs query instead of inserting a line break if aTextView == textView
+ closes valueSheet if aTextView == valueTextField
+*/
+{
+ if ( aTextView == textView ) {
+ if ( [aTextView methodForSelector:aSelector] == [aTextView methodForSelector:@selector(insertNewline:)] &&
+ [[[NSApp currentEvent] characters] isEqualToString:@"\003"] )
+ {
+ [self performQuery:self];
+ return YES;
+ } else {
+ return NO;
+ }
+ } else if ( aTextView == valueTextField ) {
+ if ( [aTextView methodForSelector:aSelector] == [aTextView methodForSelector:@selector(insertNewline:)] )
+ {
+ [self closeSheet:self];
+ return YES;
+ } else {
+ return NO;
+ }
+ }
+ return NO;
+}
+
+
+//last but not least
+- (id)init;
+{
+ self = [super init];
+ return self;
+}
+
+- (void)dealloc
+{
+ [queryResult release];
+ [prefs release];
+ [queryFavorites release];
+
+ [super dealloc];
+}
+
+
+@end
diff --git a/English.lproj/Credits.rtf b/English.lproj/Credits.rtf
new file mode 100644
index 00000000..e4c7158e
--- /dev/null
+++ b/English.lproj/Credits.rtf
@@ -0,0 +1,34 @@
+{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs24 \cf0 Developer
+\f1\b0 \
+ Lorenz Textor, lorenz@textor.ch\
+\
+
+\f0\b Co-Developer
+\f1\b0 \
+ Jeff Skrysak\
+\
+
+\f0\b Additional Code
+\f1\b0 \
+ Serge Cohen and\
+ Bertrand Mansion\
+ (SMySQL framework)\
+ Tristan O'Tierney\
+ Kotaro Funakoshi\
+ David Buxton\
+ Stuart B. Glenn\
+ Jason Hallford\
+ Carsten Bl\'9fm\
+ Andrea Salomoni\
+\
+
+\f0\b Artwork
+\f1\b0 \
+ Walter Lee Davis (icon)\
+ snowhouse (GUI design)\
+ (http://www.snowhouse.co.uk)} \ No newline at end of file
diff --git a/English.lproj/DBView.nib/classes.nib b/English.lproj/DBView.nib/classes.nib
new file mode 100644
index 00000000..f3a8fa90
--- /dev/null
+++ b/English.lproj/DBView.nib/classes.nib
@@ -0,0 +1,586 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBClasses</key>
+ <array>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>copy</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>CMCopyTable</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSTableView</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>KeyChain</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>addTable</key>
+ <string>id</string>
+ <key>closeCopyTableSheet</key>
+ <string>id</string>
+ <key>copyTable</key>
+ <string>id</string>
+ <key>removeTable</key>
+ <string>id</string>
+ <key>updateTables</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>TablesList</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>copyTableContentSwitch</key>
+ <string>id</string>
+ <key>copyTableNameField</key>
+ <string>id</string>
+ <key>copyTableSheet</key>
+ <string>id</string>
+ <key>customQueryInstance</key>
+ <string>id</string>
+ <key>tabView</key>
+ <string>id</string>
+ <key>tableContentInstance</key>
+ <string>id</string>
+ <key>tableDocumentInstance</key>
+ <string>id</string>
+ <key>tableDumpInstance</key>
+ <string>id</string>
+ <key>tableSourceInstance</key>
+ <string>id</string>
+ <key>tableStatusInstance</key>
+ <string>id</string>
+ <key>tableWindow</key>
+ <string>id</string>
+ <key>tablesListView</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>addRow</key>
+ <string>id</string>
+ <key>closeEditSheet</key>
+ <string>id</string>
+ <key>copyRow</key>
+ <string>id</string>
+ <key>dropImage</key>
+ <string>id</string>
+ <key>filterTable</key>
+ <string>id</string>
+ <key>openEditSheet</key>
+ <string>id</string>
+ <key>reloadTable</key>
+ <string>id</string>
+ <key>reloadTableValues</key>
+ <string>id</string>
+ <key>removeRow</key>
+ <string>id</string>
+ <key>saveEditSheet</key>
+ <string>id</string>
+ <key>setCompareTypes</key>
+ <string>id</string>
+ <key>showAll</key>
+ <string>id</string>
+ <key>stepLimitRows</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>TableContent</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>addButton</key>
+ <string>id</string>
+ <key>argumentField</key>
+ <string>id</string>
+ <key>compareField</key>
+ <string>id</string>
+ <key>copyButton</key>
+ <string>id</string>
+ <key>countText</key>
+ <string>id</string>
+ <key>editData</key>
+ <string>id</string>
+ <key>editImage</key>
+ <string>id</string>
+ <key>editSheet</key>
+ <string>id</string>
+ <key>editTextView</key>
+ <string>id</string>
+ <key>fieldField</key>
+ <string>id</string>
+ <key>filterButton</key>
+ <string>id</string>
+ <key>hexTextView</key>
+ <string>id</string>
+ <key>limitRowsButton</key>
+ <string>id</string>
+ <key>limitRowsField</key>
+ <string>id</string>
+ <key>limitRowsStepper</key>
+ <string>id</string>
+ <key>limitRowsText</key>
+ <string>id</string>
+ <key>multipleLineEditingButton</key>
+ <string>id</string>
+ <key>removeButton</key>
+ <string>id</string>
+ <key>showAllButton</key>
+ <string>id</string>
+ <key>tableContentView</key>
+ <string>CMCopyTable</string>
+ <key>tableDocumentInstance</key>
+ <string>id</string>
+ <key>tableSourceInstance</key>
+ <string>id</string>
+ <key>tableWindow</key>
+ <string>id</string>
+ <key>tablesListInstance</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>reloadTable</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>TableStatus</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>commentsBox</key>
+ <string>id</string>
+ <key>rowsAutoIncrement</key>
+ <string>id</string>
+ <key>rowsAvgLength</key>
+ <string>id</string>
+ <key>rowsFormat</key>
+ <string>id</string>
+ <key>rowsNumber</key>
+ <string>id</string>
+ <key>sizeData</key>
+ <string>id</string>
+ <key>sizeFree</key>
+ <string>id</string>
+ <key>sizeIndex</key>
+ <string>id</string>
+ <key>sizeMaxData</key>
+ <string>id</string>
+ <key>tableCreatedAt</key>
+ <string>id</string>
+ <key>tableName</key>
+ <string>id</string>
+ <key>tableType</key>
+ <string>id</string>
+ <key>tableUpdatedAt</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>FirstResponder</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>CMTextView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSTextView</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>addQueryFavorite</key>
+ <string>id</string>
+ <key>chooseQueryFavorite</key>
+ <string>id</string>
+ <key>chooseQueryHistory</key>
+ <string>id</string>
+ <key>closeQueryFavoritesSheet</key>
+ <string>id</string>
+ <key>closeSheet</key>
+ <string>id</string>
+ <key>copyQueryFavorite</key>
+ <string>id</string>
+ <key>performQuery</key>
+ <string>id</string>
+ <key>removeQueryFavorite</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>CustomQuery</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>affectedRowsText</key>
+ <string>id</string>
+ <key>customQueryView</key>
+ <string>CMCopyTable</string>
+ <key>errorText</key>
+ <string>id</string>
+ <key>queryFavoritesButton</key>
+ <string>id</string>
+ <key>queryFavoritesSheet</key>
+ <string>id</string>
+ <key>queryFavoritesView</key>
+ <string>id</string>
+ <key>queryHistoryButton</key>
+ <string>id</string>
+ <key>tableDumpInstance</key>
+ <string>id</string>
+ <key>tableWindow</key>
+ <string>id</string>
+ <key>textView</key>
+ <string>id</string>
+ <key>valueSheet</key>
+ <string>id</string>
+ <key>valueTextField</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>CLASS</key>
+ <string>CMImageView</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSImageView</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>closeSheet</key>
+ <string>id</string>
+ <key>reloadTables</key>
+ <string>id</string>
+ <key>selectTables</key>
+ <string>id</string>
+ <key>stepRow</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>TableDump</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>addCreateTableSwitch</key>
+ <string>id</string>
+ <key>addDropTableSwitch</key>
+ <string>id</string>
+ <key>addErrorsSwitch</key>
+ <string>id</string>
+ <key>addTableContentSwitch</key>
+ <string>id</string>
+ <key>customQueryInstance</key>
+ <string>id</string>
+ <key>errorsSheet</key>
+ <string>id</string>
+ <key>errorsView</key>
+ <string>id</string>
+ <key>exportCSVView</key>
+ <string>id</string>
+ <key>exportDumpTableView</key>
+ <string>id</string>
+ <key>exportDumpView</key>
+ <string>id</string>
+ <key>exportFieldNamesSwitch</key>
+ <string>id</string>
+ <key>exportFieldsEnclosedField</key>
+ <string>id</string>
+ <key>exportFieldsEscapedField</key>
+ <string>id</string>
+ <key>exportFieldsTerminatedField</key>
+ <string>id</string>
+ <key>exportLinesTerminatedField</key>
+ <string>id</string>
+ <key>exportMultipleCSVTableView</key>
+ <string>id</string>
+ <key>exportMultipleCSVView</key>
+ <string>id</string>
+ <key>exportMultipleFieldNamesSwitch</key>
+ <string>id</string>
+ <key>exportMultipleFieldsEnclosedField</key>
+ <string>id</string>
+ <key>exportMultipleFieldsEscapedField</key>
+ <string>id</string>
+ <key>exportMultipleFieldsTerminatedField</key>
+ <string>id</string>
+ <key>exportMultipleLinesTerminatedField</key>
+ <string>id</string>
+ <key>exportMultipleXMLTableView</key>
+ <string>id</string>
+ <key>exportMultipleXMLView</key>
+ <string>id</string>
+ <key>fieldMappingSheet</key>
+ <string>id</string>
+ <key>fieldMappingTableView</key>
+ <string>id</string>
+ <key>importCSVView</key>
+ <string>id</string>
+ <key>importFieldNamesSwitch</key>
+ <string>id</string>
+ <key>importFieldsEnclosedField</key>
+ <string>id</string>
+ <key>importFieldsEscapedField</key>
+ <string>id</string>
+ <key>importFieldsTerminatedField</key>
+ <string>id</string>
+ <key>importLinesTerminatedField</key>
+ <string>id</string>
+ <key>rowDownButton</key>
+ <string>id</string>
+ <key>rowUpButton</key>
+ <string>id</string>
+ <key>singleProgressBar</key>
+ <string>id</string>
+ <key>singleProgressSheet</key>
+ <string>id</string>
+ <key>singleProgressText</key>
+ <string>id</string>
+ <key>tableContentInstance</key>
+ <string>id</string>
+ <key>tableDocumentInstance</key>
+ <string>id</string>
+ <key>tableSourceInstance</key>
+ <string>id</string>
+ <key>tableWindow</key>
+ <string>id</string>
+ <key>tablesListInstance</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>addField</key>
+ <string>id</string>
+ <key>addIndex</key>
+ <string>id</string>
+ <key>chooseIndexType</key>
+ <string>id</string>
+ <key>closeIndexSheet</key>
+ <string>id</string>
+ <key>closeKeySheet</key>
+ <string>id</string>
+ <key>copyField</key>
+ <string>id</string>
+ <key>openIndexSheet</key>
+ <string>id</string>
+ <key>reloadTable</key>
+ <string>id</string>
+ <key>removeField</key>
+ <string>id</string>
+ <key>removeIndex</key>
+ <string>id</string>
+ <key>typeChanged</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>TableSource</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>addFieldButton</key>
+ <string>id</string>
+ <key>addIndexButton</key>
+ <string>id</string>
+ <key>chooseKeyButton</key>
+ <string>id</string>
+ <key>copyFieldButton</key>
+ <string>id</string>
+ <key>indexNameField</key>
+ <string>id</string>
+ <key>indexSheet</key>
+ <string>id</string>
+ <key>indexTypeField</key>
+ <string>id</string>
+ <key>indexView</key>
+ <string>id</string>
+ <key>indexedColumnsField</key>
+ <string>id</string>
+ <key>keySheet</key>
+ <string>id</string>
+ <key>removeFieldButton</key>
+ <string>id</string>
+ <key>removeIndexButton</key>
+ <string>id</string>
+ <key>tableSourceView</key>
+ <string>id</string>
+ <key>tableTypeButton</key>
+ <string>id</string>
+ <key>tableWindow</key>
+ <string>id</string>
+ <key>tablesListInstance</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>addDatabase</key>
+ <string>id</string>
+ <key>chooseDatabase</key>
+ <string>id</string>
+ <key>chooseEncoding</key>
+ <string>id</string>
+ <key>chooseFavorite</key>
+ <string>id</string>
+ <key>closeDatabaseSheet</key>
+ <string>id</string>
+ <key>closeSheet</key>
+ <string>id</string>
+ <key>connect</key>
+ <string>id</string>
+ <key>connectToDB</key>
+ <string>id</string>
+ <key>doTableOperation</key>
+ <string>id</string>
+ <key>export</key>
+ <string>id</string>
+ <key>import</key>
+ <string>id</string>
+ <key>removeDatabase</key>
+ <string>id</string>
+ <key>setDatabases</key>
+ <string>id</string>
+ <key>toggleUseSSH</key>
+ <string>id</string>
+ <key>viewContent</key>
+ <string>id</string>
+ <key>viewQuery</key>
+ <string>id</string>
+ <key>viewStatus</key>
+ <string>id</string>
+ <key>viewStructure</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>TableDocument</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>chooseDatabaseButton</key>
+ <string>id</string>
+ <key>chooseEncodingButton</key>
+ <string>id</string>
+ <key>chooseTableOperationButton</key>
+ <string>id</string>
+ <key>connectProgressBar</key>
+ <string>id</string>
+ <key>connectSheet</key>
+ <string>id</string>
+ <key>consoleDrawer</key>
+ <string>id</string>
+ <key>consoleTextView</key>
+ <string>id</string>
+ <key>createTableSyntaxSheet</key>
+ <string>id</string>
+ <key>createTableSyntaxView</key>
+ <string>id</string>
+ <key>customQueryInstance</key>
+ <string>id</string>
+ <key>databaseField</key>
+ <string>id</string>
+ <key>databaseNameField</key>
+ <string>id</string>
+ <key>databaseSheet</key>
+ <string>id</string>
+ <key>favoritesButton</key>
+ <string>id</string>
+ <key>favoritesController</key>
+ <string>NSArrayController</string>
+ <key>hostField</key>
+ <string>id</string>
+ <key>keyChainInstance</key>
+ <string>id</string>
+ <key>passwordField</key>
+ <string>id</string>
+ <key>portField</key>
+ <string>id</string>
+ <key>queryProgressBar</key>
+ <string>id</string>
+ <key>socketField</key>
+ <string>id</string>
+ <key>sshCheckbox</key>
+ <string>id</string>
+ <key>sshHostField</key>
+ <string>id</string>
+ <key>sshPasswordField</key>
+ <string>id</string>
+ <key>sshPortField</key>
+ <string>id</string>
+ <key>sshUserField</key>
+ <string>id</string>
+ <key>tableContentInstance</key>
+ <string>id</string>
+ <key>tableDumpInstance</key>
+ <string>id</string>
+ <key>tableOperationsSheet</key>
+ <string>id</string>
+ <key>tableSourceInstance</key>
+ <string>id</string>
+ <key>tableStatusInstance</key>
+ <string>id</string>
+ <key>tableTabView</key>
+ <string>NSTabView</string>
+ <key>tableWindow</key>
+ <string>id</string>
+ <key>tablesListInstance</key>
+ <string>id</string>
+ <key>userField</key>
+ <string>id</string>
+ <key>variablesSheet</key>
+ <string>id</string>
+ <key>variablesTableView</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSDocument</string>
+ </dict>
+ </array>
+ <key>IBVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/English.lproj/DBView.nib/info.nib b/English.lproj/DBView.nib/info.nib
new file mode 100644
index 00000000..1768354f
--- /dev/null
+++ b/English.lproj/DBView.nib/info.nib
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBFramework Version</key>
+ <string>629</string>
+ <key>IBLastKnownRelativeProjectPath</key>
+ <string>../../CocoaMySQL.xcodeproj</string>
+ <key>IBOldestOS</key>
+ <integer>5</integer>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>40</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>9C7010</string>
+ <key>targetFramework</key>
+ <string>IBCocoaFramework</string>
+</dict>
+</plist>
diff --git a/English.lproj/DBView.nib/keyedobjects.nib b/English.lproj/DBView.nib/keyedobjects.nib
new file mode 100644
index 00000000..cced002a
--- /dev/null
+++ b/English.lproj/DBView.nib/keyedobjects.nib
Binary files differ
diff --git a/English.lproj/DBView~.nib/classes.nib b/English.lproj/DBView~.nib/classes.nib
new file mode 100644
index 00000000..714a3013
--- /dev/null
+++ b/English.lproj/DBView~.nib/classes.nib
@@ -0,0 +1,288 @@
+{
+ IBClasses = (
+ {
+ ACTIONS = {copy = id; };
+ CLASS = CMCopyTable;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSTableView;
+ },
+ {CLASS = CMImageView; LANGUAGE = ObjC; SUPERCLASS = NSImageView; },
+ {CLASS = CMTextView; LANGUAGE = ObjC; SUPERCLASS = NSTextView; },
+ {
+ ACTIONS = {
+ addQueryFavorite = id;
+ chooseQueryFavorite = id;
+ chooseQueryHistory = id;
+ closeQueryFavoritesSheet = id;
+ closeSheet = id;
+ copyQueryFavorite = id;
+ performQuery = id;
+ removeQueryFavorite = id;
+ };
+ CLASS = CustomQuery;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ affectedRowsText = id;
+ customQueryView = id;
+ errorText = id;
+ queryFavoritesButton = id;
+ queryFavoritesSheet = id;
+ queryFavoritesView = id;
+ queryHistoryButton = id;
+ tableDumpInstance = id;
+ tableWindow = id;
+ textView = id;
+ valueSheet = id;
+ valueTextField = id;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {CLASS = KeyChain; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {CLASS = MySound; LANGUAGE = ObjC; SUPERCLASS = Sound; },
+ {CLASS = SSHAuthentication; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {CLASS = SSHTunnelApp; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {
+ addRow = id;
+ closeEditSheet = id;
+ copyRow = id;
+ dropImage = id;
+ filterTable = id;
+ openEditSheet = id;
+ reloadTable = id;
+ reloadTableValues = id;
+ removeRow = id;
+ saveEditSheet = id;
+ setCompareTypes = id;
+ showAll = id;
+ stepLimitRows = id;
+ };
+ CLASS = TableContent;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ addButton = id;
+ argumentField = id;
+ compareField = id;
+ copyButton = id;
+ countText = id;
+ editImage = id;
+ editSheet = id;
+ editTextView = id;
+ fieldField = id;
+ filterButton = id;
+ hexTextView = id;
+ limitRowsButton = id;
+ limitRowsField = id;
+ limitRowsStepper = id;
+ limitRowsText = id;
+ multipleLineEditingButton = id;
+ removeButton = id;
+ showAllButton = id;
+ tableContentView = id;
+ tableDocumentInstance = id;
+ tableSourceInstance = id;
+ tableWindow = id;
+ tablesListInstance = id;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {
+ addDatabase = id;
+ chooseDatabase = id;
+ chooseEncoding = id;
+ chooseFavorite = id;
+ closeDatabaseSheet = id;
+ closeSheet = id;
+ connect = id;
+ connectToDB = id;
+ doTableOperation = id;
+ export = id;
+ import = id;
+ removeDatabase = id;
+ setDatabases = id;
+ toggleUseSSH = id;
+ viewContent = id;
+ viewQuery = id;
+ viewStatus = id;
+ viewStructure = id;
+ };
+ CLASS = TableDocument;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ chooseDatabaseButton = id;
+ chooseEncodingButton = id;
+ chooseTableOperationButton = id;
+ connectProgressBar = id;
+ connectSheet = id;
+ consoleDrawer = id;
+ consoleTextView = id;
+ createTableSyntaxSheet = id;
+ createTableSyntaxView = id;
+ customQueryInstance = id;
+ databaseField = id;
+ databaseNameField = id;
+ databaseSheet = id;
+ favoritesButton = id;
+ hostField = id;
+ keyChainInstance = id;
+ passwordField = id;
+ portField = id;
+ queryProgressBar = id;
+ socketField = id;
+ sshCheckbox = id;
+ sshHostField = id;
+ sshPasswordField = id;
+ sshPortField = id;
+ sshUserField = id;
+ tableContentInstance = id;
+ tableDumpInstance = id;
+ tableOperationsSheet = id;
+ tableSourceInstance = id;
+ tableStatusInstance = id;
+ tableTabView = NSTabView;
+ tableWindow = id;
+ tablesListInstance = id;
+ userField = id;
+ variablesSheet = id;
+ variablesTableView = id;
+ };
+ SUPERCLASS = NSDocument;
+ },
+ {
+ ACTIONS = {closeSheet = id; reloadTables = id; selectTables = id; stepRow = id; };
+ CLASS = TableDump;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ addCreateTableSwitch = id;
+ addDropTableSwitch = id;
+ addErrorsSwitch = id;
+ addTableContentSwitch = id;
+ customQueryInstance = id;
+ errorsSheet = id;
+ errorsView = id;
+ exportCSVView = id;
+ exportDumpTableView = id;
+ exportDumpView = id;
+ exportFieldNamesSwitch = id;
+ exportFieldsEnclosedField = id;
+ exportFieldsEscapedField = id;
+ exportFieldsTerminatedField = id;
+ exportLinesTerminatedField = id;
+ exportMultipleCSVTableView = id;
+ exportMultipleCSVView = id;
+ exportMultipleFieldNamesSwitch = id;
+ exportMultipleFieldsEnclosedField = id;
+ exportMultipleFieldsEscapedField = id;
+ exportMultipleFieldsTerminatedField = id;
+ exportMultipleLinesTerminatedField = id;
+ exportMultipleXMLTableView = id;
+ exportMultipleXMLView = id;
+ fieldMappingSheet = id;
+ fieldMappingTableView = id;
+ importCSVView = id;
+ importFieldNamesSwitch = id;
+ importFieldsEnclosedField = id;
+ importFieldsEscapedField = id;
+ importFieldsTerminatedField = id;
+ importLinesTerminatedField = id;
+ rowDownButton = id;
+ rowUpButton = id;
+ singleProgressBar = id;
+ singleProgressSheet = id;
+ singleProgressText = id;
+ tableContentInstance = id;
+ tableDocumentInstance = id;
+ tableSourceInstance = id;
+ tableWindow = id;
+ tablesListInstance = id;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {
+ addField = id;
+ addIndex = id;
+ chooseIndexType = id;
+ closeIndexSheet = id;
+ closeKeySheet = id;
+ copyField = id;
+ openIndexSheet = id;
+ reloadTable = id;
+ removeField = id;
+ removeIndex = id;
+ typeChanged = id;
+ };
+ CLASS = TableSource;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ addFieldButton = id;
+ addIndexButton = id;
+ chooseKeyButton = id;
+ copyFieldButton = id;
+ indexNameField = id;
+ indexSheet = id;
+ indexTypeField = id;
+ indexView = id;
+ indexedColumnsField = id;
+ keySheet = id;
+ removeFieldButton = id;
+ removeIndexButton = id;
+ tableSourceView = id;
+ tableTypeButton = id;
+ tableWindow = id;
+ tablesListInstance = id;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {reloadTable = id; };
+ CLASS = TableStatus;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ commentsBox = id;
+ rowsAutoIncrement = id;
+ rowsAvgLength = id;
+ rowsFormat = id;
+ rowsNumber = id;
+ sizeData = id;
+ sizeFree = id;
+ sizeIndex = id;
+ sizeMaxData = id;
+ tableCreatedAt = id;
+ tableName = id;
+ tableType = id;
+ tableUpdatedAt = id;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {
+ addTable = id;
+ closeCopyTableSheet = id;
+ copyTable = id;
+ removeTable = id;
+ updateTables = id;
+ };
+ CLASS = TablesList;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ copyTableContentSwitch = id;
+ copyTableNameField = id;
+ copyTableSheet = id;
+ customQueryInstance = id;
+ tabView = id;
+ tableContentInstance = id;
+ tableDocumentInstance = id;
+ tableDumpInstance = id;
+ tableSourceInstance = id;
+ tableStatusInstance = id;
+ tableWindow = id;
+ tablesListView = id;
+ };
+ SUPERCLASS = NSObject;
+ }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/English.lproj/DBView~.nib/info.nib b/English.lproj/DBView~.nib/info.nib
new file mode 100644
index 00000000..648f6c1f
--- /dev/null
+++ b/English.lproj/DBView~.nib/info.nib
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>30 51 356 240 0 0 1152 746 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>1058</key>
+ <string>99 489 498 199 0 0 1152 746 </string>
+ <key>1113</key>
+ <string>425 406 301 199 0 0 1152 746 </string>
+ <key>815</key>
+ <string>354 427 444 158 0 0 1152 746 </string>
+ <key>824</key>
+ <string>166 438 820 138 0 0 1152 746 </string>
+ <key>910</key>
+ <string>337 412 477 191 0 0 1152 746 </string>
+ <key>978</key>
+ <string>360 256 444 158 0 0 1152 746 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>439.0</string>
+ <key>IBSystem Version</key>
+ <string>8H14</string>
+</dict>
+</plist>
diff --git a/English.lproj/DBView~.nib/keyedobjects.nib b/English.lproj/DBView~.nib/keyedobjects.nib
new file mode 100644
index 00000000..ea2486ea
--- /dev/null
+++ b/English.lproj/DBView~.nib/keyedobjects.nib
Binary files differ
diff --git a/English.lproj/DBView~.nib/objects.nib b/English.lproj/DBView~.nib/objects.nib
new file mode 100644
index 00000000..cdaf816a
--- /dev/null
+++ b/English.lproj/DBView~.nib/objects.nib
Binary files differ
diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings
new file mode 100644
index 00000000..75a6435f
--- /dev/null
+++ b/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/English.lproj/Localizable.strings b/English.lproj/Localizable.strings
new file mode 100644
index 00000000..850c72e8
--- /dev/null
+++ b/English.lproj/Localizable.strings
Binary files differ
diff --git a/English.lproj/MainMenu.nib/JavaCompiling.plist b/English.lproj/MainMenu.nib/JavaCompiling.plist
new file mode 100644
index 00000000..6e7346ac
--- /dev/null
+++ b/English.lproj/MainMenu.nib/JavaCompiling.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>JavaSourceSubpath</key>
+ <string>_MainMenu_EOArchive_English.java</string>
+</dict>
+</plist>
diff --git a/English.lproj/MainMenu.nib/_MainMenu_EOArchive_English.java b/English.lproj/MainMenu.nib/_MainMenu_EOArchive_English.java
new file mode 100644
index 00000000..c7a45669
--- /dev/null
+++ b/English.lproj/MainMenu.nib/_MainMenu_EOArchive_English.java
@@ -0,0 +1,736 @@
+// _MainMenu_EOArchive_English.java
+// Generated by EnterpriseObjects palette at Monday, February 27, 2006 1:29:17 PM Europe/Zurich
+
+import com.webobjects.eoapplication.*;
+import com.webobjects.eocontrol.*;
+import com.webobjects.eointerface.*;
+import com.webobjects.eointerface.swing.*;
+import com.webobjects.eointerface.swing.EOTable._EOTableColumn;
+import com.webobjects.foundation.*;
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import javax.swing.text.*;
+
+public class _MainMenu_EOArchive_English extends com.webobjects.eoapplication.EOArchive {
+ IBHelpConnector _iBHelpConnector0, _iBHelpConnector1, _iBHelpConnector10, _iBHelpConnector11, _iBHelpConnector12, _iBHelpConnector13, _iBHelpConnector2, _iBHelpConnector3, _iBHelpConnector4, _iBHelpConnector5, _iBHelpConnector6, _iBHelpConnector7, _iBHelpConnector8, _iBHelpConnector9;
+ KeyChain _keyChain0;
+ MainController _mainController0;
+ com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1;
+ com.webobjects.eointerface.swing.EOTable _nsTableView0;
+ com.webobjects.eointerface.swing.EOTable._EOTableColumn _eoTableColumn0, _eoTableColumn1, _eoTableColumn2, _eoTableColumn3, _eoTableColumn4, _eoTableColumn5;
+ com.webobjects.eointerface.swing.EOTextField _eoTextField0, _eoTextField1, _eoTextField2, _eoTextField3, _eoTextField4, _nsTextField0, _nsTextField1, _nsTextField10, _nsTextField11, _nsTextField12, _nsTextField13, _nsTextField14, _nsTextField15, _nsTextField16, _nsTextField17, _nsTextField18, _nsTextField19, _nsTextField2, _nsTextField20, _nsTextField21, _nsTextField22, _nsTextField23, _nsTextField24, _nsTextField25, _nsTextField26, _nsTextField3, _nsTextField4, _nsTextField5, _nsTextField6, _nsTextField7, _nsTextField8, _nsTextField9;
+ javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4;
+ javax.swing.JCheckBox _jCheckBox0, _nsButton10, _nsButton11, _nsButton12, _nsButton13, _nsButton5, _nsButton6, _nsButton7, _nsButton8, _nsButton9;
+ javax.swing.JComboBox _popup0;
+ javax.swing.JPanel _nsView0, _nsView1;
+ javax.swing.JPasswordField _nsSecureTextField0, _nsTextField27;
+
+ public _MainMenu_EOArchive_English(Object owner, NSDisposableRegistry registry) {
+ super(owner, registry);
+ }
+
+ protected void _construct() {
+ Object owner = _owner();
+ EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null;
+ Object replacement;
+
+ super._construct();
+
+ _eoTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _eoTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _eoTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _jCheckBox0 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox(""), "");
+ _eoTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _eoTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _nsTextField26 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField13");
+ _iBHelpConnector13 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsTextField25 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ _nsTextField24 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField11");
+ _nsTextField23 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ _iBHelpConnector12 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector11 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Copy"), "NSButton211");
+ _iBHelpConnector10 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Remove"), "NSButton21");
+ _iBHelpConnector9 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Add"), "NSButton2");
+ _iBHelpConnector8 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton13 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Fetch correct row count (slower)"), "NSButton411111121");
+ _popup0 = (javax.swing.JComboBox)_registered(new javax.swing.JComboBox(), "NSPopUpButton1");
+ _iBHelpConnector7 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton12 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Use monospaced fonts"), "NSButton41111112");
+ _iBHelpConnector6 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton11 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Limit result to"), "NSButton41111111");
+ _iBHelpConnector5 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsTextField22 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+ _iBHelpConnector4 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton10 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Don't load blob and text fields"), "NSButton4111111");
+ _iBHelpConnector3 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton9 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Show error when no rows are affected"), "NSButton411111");
+ _nsTextField21 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12312");
+ _nsTextField20 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1231");
+ _nsTextField19 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12113");
+ _nsTextField18 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1212");
+ _nsTextField17 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField16 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField212");
+ _nsTextField27 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField112");
+ _nsTextField15 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField13");
+ _nsButton8 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Use SSH tunnel"), "NSButton4");
+ _nsTextField14 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1211111");
+ _nsTextField13 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField123");
+ _nsTextField12 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField122");
+ _nsTextField11 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12111");
+ _nsTextField10 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1211");
+ _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("Save"), "NSButton");
+ _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+ _nsTextField9 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField121111");
+ _nsTextField8 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField121");
+ _nsTextField7 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ _eoFrame1 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "favoriteSheet");
+ _nsView1 = (JPanel)_eoFrame1.getContentPane();
+ _nsTextField6 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField111");
+ _nsTextField5 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField3");
+ _nsTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1111");
+ _nsSecureTextField0 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField11");
+ _nsTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ _nsTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+ _keyChain0 = (KeyChain)_registered(new KeyChain(), "KeyChain");
+ _iBHelpConnector2 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ _eoTableColumn5 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn4 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn3 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn2 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn1 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "NSTableColumn1");
+ _eoTableColumn0 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "NSTableColumn");
+ _nsTableView0 = (com.webobjects.eointerface.swing.EOTable)_registered(new com.webobjects.eointerface.swing.EOTable(), "NSTableView");
+ _iBHelpConnector1 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton7 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Reload table after removing a row"), "NSButton411");
+ _iBHelpConnector0 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton6 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Reload table after editing a row"), "NSButton41");
+ _mainController0 = (MainController)_registered(new MainController(), "MainController");
+ _nsButton5 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Reload table after adding a row"), "NSButton4");
+ _eoFrame0 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "preferencesWindow");
+ _nsView0 = (JPanel)_eoFrame0.getContentPane();
+ }
+
+ protected void _awaken() {
+ super._awaken();
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "unhideAllApplications", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "hideOtherApplications", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "orderFrontStandardAboutPanel", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "terminate", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "hide", ), ""));
+ _popup0.setModel(new javax.swing.DefaultComboBoxModel());
+ _popup0.addItem("Autodetect");
+ _popup0.addItem("");
+ _popup0.addItem("UCS-2 Unicode (ucs2)");
+ _popup0.addItem("UTF-8 Unicode (utf8)");
+ _popup0.addItem("");
+ _popup0.addItem("US ASCII (ascii)");
+ _popup0.addItem("ISO Latin 1 (latin1)");
+ _popup0.addItem("Mac Roman (macroman)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Latin 2 (cp1250)");
+ _popup0.addItem("ISO Latin 2 (latin2)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Arabic (cp1256)");
+ _popup0.addItem("ISO Greek (greek)");
+ _popup0.addItem("ISO Hebrew (hebrew)");
+ _popup0.addItem("ISO Turkish (latin5)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Baltic (cp1257)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Cyrillic (cp1251)");
+ _popup0.addItem("");
+ _popup0.addItem("Big5 Traditional Chinese (big5)");
+ _popup0.addItem("Shift-JIS Japanese (sjis)");
+ _popup0.addItem("EUC-JP Japanese (ujis)");
+ }
+
+ protected void _init() {
+ super._init();
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "print", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "performMiniaturize", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewQuery", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "selectAll", ), ""));
+ _setFontForComponent(_eoTextField4, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "showHelp", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewContent", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "clear", ), ""));
+ _setFontForComponent(_eoTextField3, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "paste", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "performClose", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewStructure", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "copy", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "toggleContinuousSpellChecking", ), ""));
+ _setFontForComponent(_eoTextField2, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "arrangeInFront", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "checkSpelling", ), ""));
+ _setFontForComponent(_jCheckBox0, "Lucida Grande", 12, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "import", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "redo", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "showGuessPanel", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "undo", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "import", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ _setFontForComponent(_eoTextField1, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "newDocument", ), ""));
+ _setFontForComponent(_eoTextField0, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "runPageLayout", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "cut", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "clearRecentDocuments", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewStatus", ), ""));
+ _setFontForComponent(_nsTextField26, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField26.setEditable(false);
+ _nsTextField26.setOpaque(false);
+ _nsTextField26.setText("Default Encoding");
+ _nsTextField26.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField26.setSelectable(false);
+ _nsTextField26.setEnabled(true);
+ _nsTextField26.setBorder(null);
+ _setFontForComponent(_nsTextField25, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField25.setEditable(false);
+ _nsTextField25.setOpaque(false);
+ _nsTextField25.setText("rows");
+ _nsTextField25.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField25.setSelectable(false);
+ _nsTextField25.setEnabled(true);
+ _nsTextField25.setBorder(null);
+ _setFontForComponent(_nsTextField24, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField24.setEditable(false);
+ _nsTextField24.setOpaque(false);
+ _nsTextField24.setText("String to display NULL-Values");
+ _nsTextField24.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField24.setSelectable(false);
+ _nsTextField24.setEnabled(true);
+ _nsTextField24.setBorder(null);
+ _setFontForComponent(_nsTextField23, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField23.setEditable(false);
+ _nsTextField23.setOpaque(false);
+ _nsTextField23.setText("Favorites");
+ _nsTextField23.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField23.setSelectable(false);
+ _nsTextField23.setEnabled(true);
+ _nsTextField23.setBorder(null);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "visitHelpWebsite", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "visitWebsite", ), ""));
+ _connect(_eoFrame0, _mainController0, "delegate");
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "donate", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "checkForUpdates", ), ""));
+ _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton4.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "copyFavorite", _nsButton4), ""));
+ _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton3.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "removeFavorite", _nsButton3), ""));
+ _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton2.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "addFavorite", _nsButton2), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "openPreferences", ), ""));
+ _setFontForComponent(_nsButton13, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton13, "fetchRowCountSwitch");
+ _setFontForComponent(_popup0, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _popup0, "encodingPopUpButton");
+ _setFontForComponent(_nsButton12, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton12, "useMonospacedFontsSwitch");
+ _nsButton11.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "chooseLimitRows", _nsButton11), ""));
+ _setFontForComponent(_nsButton11, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton11, "limitRowsSwitch");
+ _setFontForComponent(_nsTextField22, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField22.setEditable(true);
+ _nsTextField22.setOpaque(true);
+ _nsTextField22.setText("100");
+ _nsTextField22.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField22.setSelectable(true);
+ _nsTextField22.setEnabled(false);
+ _connect(_mainController0, _nsTextField22, "limitRowsField");
+ _setFontForComponent(_nsButton10, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton10, "dontShowBlobSwitch");
+ _setFontForComponent(_nsButton9, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton9, "showErrorSwitch");
+ _setFontForComponent(_nsTextField21, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField21.setEditable(false);
+ _nsTextField21.setOpaque(false);
+ _nsTextField21.setText("Local Port");
+ _nsTextField21.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField21.setSelectable(false);
+ _nsTextField21.setEnabled(true);
+ _nsTextField21.setBorder(null);
+ _setFontForComponent(_nsTextField20, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField20.setEditable(false);
+ _nsTextField20.setOpaque(false);
+ _nsTextField20.setText("SSH Host");
+ _nsTextField20.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField20.setSelectable(false);
+ _nsTextField20.setEnabled(true);
+ _nsTextField20.setBorder(null);
+ _setFontForComponent(_nsTextField19, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField19.setEditable(false);
+ _nsTextField19.setOpaque(false);
+ _nsTextField19.setText("SSH Password\n");
+ _nsTextField19.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField19.setSelectable(false);
+ _nsTextField19.setEnabled(true);
+ _nsTextField19.setBorder(null);
+ _setFontForComponent(_nsTextField18, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField18.setEditable(false);
+ _nsTextField18.setOpaque(false);
+ _nsTextField18.setText("SSH User\n");
+ _nsTextField18.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField18.setSelectable(false);
+ _nsTextField18.setEnabled(true);
+ _nsTextField18.setBorder(null);
+ _connect(_mainController0, _nsTextField15, "sshUserField");
+ _connect(_mainController0, _nsTextField27, "sshPasswordField");
+ _connect(_mainController0, _nsTextField16, "sshPortField");
+ _connect(_mainController0, _nsTextField17, "sshHostField");
+ _connect(_nsTextField17, _nsTextField15, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField17, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField17.setEditable(true);
+ _nsTextField17.setOpaque(true);
+ _nsTextField17.setText("");
+ _nsTextField17.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField17.setSelectable(true);
+ _nsTextField17.setEnabled(false);
+ _connect(_nsTextField16, _nsTextField17, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField16, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField16.setEditable(true);
+ _nsTextField16.setOpaque(true);
+ _nsTextField16.setText("8888");
+ _nsTextField16.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField16.setSelectable(true);
+ _nsTextField16.setEnabled(false);
+ _connect(_nsTextField27, _nsTextField16, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField27, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField27.setEditable(true);
+ _nsTextField27.setOpaque(true);
+ _nsTextField27.setText("");
+ _nsTextField27.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField27.setEnabled(false);
+ _connect(_nsTextField15, _nsTextField27, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField15, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField15.setEditable(true);
+ _nsTextField15.setOpaque(true);
+ _nsTextField15.setText("");
+ _nsTextField15.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField15.setSelectable(true);
+ _nsTextField15.setEnabled(false);
+ _connect(_mainController0, _nsButton8, "sshCheckbox");
+ _nsButton8.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "toggleUseSSH", _nsButton8), ""));
+ _setFontForComponent(_nsButton8, "Lucida Grande", 11, Font.PLAIN);
+ _setFontForComponent(_nsTextField14, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField14.setEditable(false);
+ _nsTextField14.setOpaque(false);
+ _nsTextField14.setText("* optional");
+ _nsTextField14.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField14.setSelectable(false);
+ _nsTextField14.setEnabled(true);
+ _nsTextField14.setBorder(null);
+ _setFontForComponent(_nsTextField13, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField13.setEditable(false);
+ _nsTextField13.setOpaque(false);
+ _nsTextField13.setText("Socket *");
+ _nsTextField13.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField13.setSelectable(false);
+ _nsTextField13.setEnabled(true);
+ _nsTextField13.setBorder(null);
+ _setFontForComponent(_nsTextField12, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField12.setEditable(false);
+ _nsTextField12.setOpaque(false);
+ _nsTextField12.setText("Name\n");
+ _nsTextField12.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField12.setSelectable(false);
+ _nsTextField12.setEnabled(true);
+ _nsTextField12.setBorder(null);
+ _setFontForComponent(_nsTextField11, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField11.setEditable(false);
+ _nsTextField11.setOpaque(false);
+ _nsTextField11.setText("Port *");
+ _nsTextField11.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField11.setSelectable(false);
+ _nsTextField11.setEnabled(true);
+ _nsTextField11.setBorder(null);
+ _setFontForComponent(_nsTextField10, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField10.setEditable(false);
+ _nsTextField10.setOpaque(false);
+ _nsTextField10.setText("Password\n");
+ _nsTextField10.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField10.setSelectable(false);
+ _nsTextField10.setEnabled(true);
+ _nsTextField10.setBorder(null);
+ _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "closeFavoriteSheet", _nsButton1), ""));
+ _setFontForComponent(_nsButton1, "Lucida Grande", 11, Font.PLAIN);
+ _nsButton1.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "closeFavoriteSheet", _nsButton0), ""));
+ _setFontForComponent(_nsButton0, "Lucida Grande", 11, Font.PLAIN);
+ _nsButton0.setMargin(new Insets(0, 2, 0, 2));
+ _setFontForComponent(_nsTextField9, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField9.setEditable(false);
+ _nsTextField9.setOpaque(false);
+ _nsTextField9.setText("Database *");
+ _nsTextField9.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField9.setSelectable(false);
+ _nsTextField9.setEnabled(true);
+ _nsTextField9.setBorder(null);
+ _setFontForComponent(_nsTextField8, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField8.setEditable(false);
+ _nsTextField8.setOpaque(false);
+ _nsTextField8.setText("User\n");
+ _nsTextField8.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField8.setSelectable(false);
+ _nsTextField8.setEnabled(true);
+ _nsTextField8.setBorder(null);
+ _setFontForComponent(_nsTextField7, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField7.setEditable(false);
+ _nsTextField7.setOpaque(false);
+ _nsTextField7.setText("Host");
+ _nsTextField7.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField7.setSelectable(false);
+ _nsTextField7.setEnabled(true);
+ _nsTextField7.setBorder(null);
+ if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); }
+ _nsTextField4.setSize(159, 18);
+ _nsTextField4.setLocation(14, 118);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField4, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField4);
+ _nsSecureTextField0.setSize(159, 18);
+ _nsSecureTextField0.setLocation(14, 92);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsSecureTextField0, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsSecureTextField0);
+ _nsTextField7.setSize(29, 14);
+ _nsTextField7.setLocation(178, 43);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField7, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField7);
+ _nsTextField8.setSize(29, 14);
+ _nsTextField8.setLocation(178, 69);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField8, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField8);
+ _nsTextField9.setSize(63, 14);
+ _nsTextField9.setLocation(178, 121);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField9, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField9);
+ _nsTextField3.setSize(159, 18);
+ _nsTextField3.setLocation(14, 66);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField3, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField3);
+ _nsButton0.setSize(77, 22);
+ _nsButton0.setLocation(95, 320);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton0);
+ _nsButton1.setSize(77, 22);
+ _nsButton1.setLocation(177, 320);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton1);
+ _nsTextField10.setSize(55, 14);
+ _nsTextField10.setLocation(178, 95);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField10, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField10);
+ _nsTextField11.setSize(35, 14);
+ _nsTextField11.setLocation(178, 173);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField11, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField11);
+ _nsTextField6.setSize(159, 18);
+ _nsTextField6.setLocation(14, 170);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField6, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField6);
+ _nsTextField2.setSize(159, 18);
+ _nsTextField2.setLocation(14, 40);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField2, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField2);
+ _nsTextField12.setSize(35, 14);
+ _nsTextField12.setLocation(178, 17);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField12, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField12);
+ _nsTextField1.setSize(159, 18);
+ _nsTextField1.setLocation(14, 14);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField1);
+ _nsTextField13.setSize(48, 14);
+ _nsTextField13.setLocation(178, 147);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField13, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField13);
+ _nsTextField5.setSize(159, 18);
+ _nsTextField5.setLocation(14, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField5, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField5);
+ _nsTextField14.setSize(57, 14);
+ _nsTextField14.setLocation(11, 324);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField14, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField14);
+ _nsButton8.setSize(118, 17);
+ _nsButton8.setLocation(10, 195);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton8, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton8);
+ _nsTextField15.setSize(159, 18);
+ _nsTextField15.setLocation(14, 244);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField15, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField15);
+ _nsTextField27.setSize(159, 18);
+ _nsTextField27.setLocation(14, 270);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField27, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField27);
+ _nsTextField18.setSize(55, 14);
+ _nsTextField18.setLocation(178, 248);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField18, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField18);
+ _nsTextField19.setSize(78, 14);
+ _nsTextField19.setLocation(177, 274);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField19, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField19);
+ _nsTextField17.setSize(159, 18);
+ _nsTextField17.setLocation(14, 218);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField17, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField17);
+ _nsTextField20.setSize(55, 14);
+ _nsTextField20.setLocation(178, 221);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField20, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField20);
+ _nsTextField16.setSize(159, 18);
+ _nsTextField16.setLocation(14, 296);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField16, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField16);
+ _nsTextField21.setSize(63, 14);
+ _nsTextField21.setLocation(178, 299);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField21, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField21);
+ _nsView1.setSize(264, 353);
+ _eoFrame1.setTitle("favoriteSheet");
+ _eoFrame1.setLocation(447, 267);
+ _eoFrame1.setSize(264, 353);
+ _connect(_mainController0, _eoFrame1, "favoriteSheet");
+ _connect(_mainController0, _nsTextField2, "hostField");
+ _connect(_mainController0, _nsTextField3, "userField");
+ _connect(_mainController0, _nsSecureTextField0, "passwordField");
+ _connect(_mainController0, _nsTextField4, "databaseField");
+ _connect(_mainController0, _nsTextField5, "socketField");
+ _connect(_mainController0, _nsTextField6, "portField");
+ _connect(_nsTextField6, _nsTextField1, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField6, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField6.setEditable(true);
+ _nsTextField6.setOpaque(true);
+ _nsTextField6.setText("");
+ _nsTextField6.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField6.setSelectable(true);
+ _nsTextField6.setEnabled(true);
+ _connect(_nsTextField5, _nsTextField6, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField5, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField5.setEditable(true);
+ _nsTextField5.setOpaque(true);
+ _nsTextField5.setText("");
+ _nsTextField5.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField5.setSelectable(true);
+ _nsTextField5.setEnabled(true);
+ _connect(_nsTextField4, _nsTextField5, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField4, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField4.setEditable(true);
+ _nsTextField4.setOpaque(true);
+ _nsTextField4.setText("");
+ _nsTextField4.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField4.setSelectable(true);
+ _nsTextField4.setEnabled(true);
+ _connect(_nsSecureTextField0, _nsTextField4, "nextFocusableComponent");
+ _setFontForComponent(_nsSecureTextField0, "Lucida Grande", 11, Font.PLAIN);
+ _nsSecureTextField0.setEditable(true);
+ _nsSecureTextField0.setOpaque(true);
+ _nsSecureTextField0.setText("");
+ _nsSecureTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsSecureTextField0.setEnabled(true);
+ _connect(_nsTextField3, _nsSecureTextField0, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField3, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField3.setEditable(true);
+ _nsTextField3.setOpaque(true);
+ _nsTextField3.setText("");
+ _nsTextField3.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField3.setSelectable(true);
+ _nsTextField3.setEnabled(true);
+ _connect(_nsTextField2, _nsTextField3, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField2, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField2.setEditable(true);
+ _nsTextField2.setOpaque(true);
+ _nsTextField2.setText("");
+ _nsTextField2.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField2.setSelectable(true);
+ _nsTextField2.setEnabled(true);
+ _connect(_nsTextField1, _nsTextField2, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField1, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField1.setEditable(true);
+ _nsTextField1.setOpaque(true);
+ _nsTextField1.setText("");
+ _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField1.setSelectable(true);
+ _nsTextField1.setEnabled(true);
+ _connect(_mainController0, _nsTextField1, "nameField");
+ _connect(_mainController0, _keyChain0, "keyChainInstance");
+ _setFontForComponent(_nsTextField0, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField0.setEditable(true);
+ _nsTextField0.setOpaque(true);
+ _nsTextField0.setText("NULL");
+ _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField0.setSelectable(true);
+ _nsTextField0.setEnabled(true);
+ _connect(_mainController0, _nsTextField0, "nullValueField");
+ _connect(_nsTableView0, _mainController0, "delegate");
+ _connect(_nsTableView0, _mainController0, "dataSource");
+ _eoTableColumn5.setMinWidth(10);
+ _eoTableColumn5.setMaxWidth(1000);
+ _eoTableColumn5.setPreferredWidth(43);
+ _eoTableColumn5.setWidth(43);
+ _eoTableColumn5.setResizable(true);
+ _eoTableColumn5.setHeaderValue("use SSH");
+ if ((_eoTableColumn5.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn5.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn4.setMinWidth(10);
+ _eoTableColumn4.setMaxWidth(1000);
+ _eoTableColumn4.setPreferredWidth(80);
+ _eoTableColumn4.setWidth(80);
+ _eoTableColumn4.setResizable(true);
+ _eoTableColumn4.setHeaderValue("Database");
+ if ((_eoTableColumn4.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn4.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn3.setMinWidth(10);
+ _eoTableColumn3.setMaxWidth(1000);
+ _eoTableColumn3.setPreferredWidth(32);
+ _eoTableColumn3.setWidth(32);
+ _eoTableColumn3.setResizable(true);
+ _eoTableColumn3.setHeaderValue("Port");
+ if ((_eoTableColumn3.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn3.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn2.setMinWidth(10);
+ _eoTableColumn2.setMaxWidth(1000);
+ _eoTableColumn2.setPreferredWidth(80);
+ _eoTableColumn2.setWidth(80);
+ _eoTableColumn2.setResizable(true);
+ _eoTableColumn2.setHeaderValue("User");
+ if ((_eoTableColumn2.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn2.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn1.setMinWidth(10);
+ _eoTableColumn1.setMaxWidth(1000);
+ _eoTableColumn1.setPreferredWidth(80);
+ _eoTableColumn1.setWidth(80);
+ _eoTableColumn1.setResizable(true);
+ _eoTableColumn1.setHeaderValue("Host");
+ if ((_eoTableColumn1.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn1.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn0.setMinWidth(10);
+ _eoTableColumn0.setMaxWidth(1000);
+ _eoTableColumn0.setPreferredWidth(80);
+ _eoTableColumn0.setWidth(80);
+ _eoTableColumn0.setResizable(true);
+ _eoTableColumn0.setHeaderValue("Name");
+ if ((_eoTableColumn0.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn0.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _nsTableView0.table().addColumn(_eoTableColumn0);
+ _nsTableView0.table().addColumn(_eoTableColumn1);
+ _nsTableView0.table().addColumn(_eoTableColumn2);
+ _nsTableView0.table().addColumn(_eoTableColumn3);
+ _nsTableView0.table().addColumn(_eoTableColumn4);
+ _nsTableView0.table().addColumn(_eoTableColumn5);
+ _setFontForComponent(_nsTableView0.table().getTableHeader(), "Lucida Grande", 11, Font.PLAIN);
+ _nsTableView0.table().setRowHeight(18);
+ _connect(_mainController0, _nsTableView0, "tableView");
+ _connect(_mainController0, _eoFrame0, "preferencesWindow");
+ _setFontForComponent(_nsButton7, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton7, "reloadAfterRemovingSwitch");
+ _setFontForComponent(_nsButton6, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton6, "reloadAfterEditingSwitch");
+ _connect(_mainController0, _nsButton5, "reloadAfterAddingSwitch");
+ _setFontForComponent(_nsButton5, "Lucida Grande", 11, Font.PLAIN);
+ if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); }
+ _nsButton5.setSize(190, 17);
+ _nsButton5.setLocation(12, 32);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton5, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton5);
+ _nsButton6.setSize(190, 17);
+ _nsButton6.setLocation(12, 52);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton6, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton6);
+ _nsButton7.setSize(203, 17);
+ _nsButton7.setLocation(12, 72);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton7, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton7);
+ _nsTableView0.setSize(427, 198);
+ _nsTableView0.setLocation(256, 36);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTableView0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTableView0);
+ _nsTextField23.setSize(52, 14);
+ _nsTextField23.setLocation(254, 14);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField23, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField23);
+ _nsButton2.setSize(28, 29);
+ _nsButton2.setLocation(657, 241);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton2);
+ _nsButton3.setSize(28, 29);
+ _nsButton3.setLocation(625, 241);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton3);
+ _nsButton4.setSize(28, 29);
+ _nsButton4.setLocation(593, 241);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton4);
+ _nsTextField0.setSize(51, 18);
+ _nsTextField0.setLocation(16, 193);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField0);
+ _nsTextField24.setSize(168, 14);
+ _nsTextField24.setLocation(72, 196);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField24, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField24);
+ _nsButton9.setSize(225, 17);
+ _nsButton9.setLocation(12, 92);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton9, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton9);
+ _nsButton10.setSize(185, 17);
+ _nsButton10.setLocation(12, 112);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton10, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton10);
+ _nsButton11.setSize(100, 17);
+ _nsButton11.setLocation(12, 172);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton11, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton11);
+ _nsTextField22.setSize(76, 18);
+ _nsTextField22.setLocation(117, 170);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField22, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField22);
+ _nsTextField25.setSize(30, 14);
+ _nsTextField25.setLocation(198, 173);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField25, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField25);
+ _nsTextField26.setSize(98, 14);
+ _nsTextField26.setLocation(156, 220);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField26, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField26);
+ _nsButton12.setSize(185, 17);
+ _nsButton12.setLocation(12, 132);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton12, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton12);
+ _popup0.setSize(134, 22);
+ _popup0.setLocation(17, 218);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_popup0, EOViewLayout.WidthSizable | EOViewLayout.MinYMargin);
+ _nsView0.add(_popup0);
+ _nsButton13.setSize(194, 17);
+ _nsButton13.setLocation(12, 152);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton13, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton13);
+ _nsView0.setSize(696, 280);
+ _eoFrame0.setTitle("Preferences");
+ _eoFrame0.setLocation(51, 402);
+ _eoFrame0.setSize(696, 280);
+ }
+}
diff --git a/English.lproj/MainMenu.nib/classes.nib b/English.lproj/MainMenu.nib/classes.nib
new file mode 100644
index 00000000..f58a97d2
--- /dev/null
+++ b/English.lproj/MainMenu.nib/classes.nib
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBClasses</key>
+ <array>
+ <dict>
+ <key>CLASS</key>
+ <string>KeyChain</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>export</key>
+ <string>id</string>
+ <key>import</key>
+ <string>id</string>
+ <key>viewContent</key>
+ <string>id</string>
+ <key>viewQuery</key>
+ <string>id</string>
+ <key>viewStatus</key>
+ <string>id</string>
+ <key>viewStructure</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>FirstResponder</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ <dict>
+ <key>ACTIONS</key>
+ <dict>
+ <key>addFavorite</key>
+ <string>id</string>
+ <key>checkForUpdates</key>
+ <string>id</string>
+ <key>chooseLimitRows</key>
+ <string>id</string>
+ <key>closeFavoriteSheet</key>
+ <string>id</string>
+ <key>closePreferences</key>
+ <string>id</string>
+ <key>copyFavorite</key>
+ <string>id</string>
+ <key>donate</key>
+ <string>id</string>
+ <key>openPreferences</key>
+ <string>id</string>
+ <key>removeFavorite</key>
+ <string>id</string>
+ <key>toggleUseSSH</key>
+ <string>id</string>
+ <key>visitHelpWebsite</key>
+ <string>id</string>
+ <key>visitWebsite</key>
+ <string>id</string>
+ </dict>
+ <key>CLASS</key>
+ <string>MainController</string>
+ <key>LANGUAGE</key>
+ <string>ObjC</string>
+ <key>OUTLETS</key>
+ <dict>
+ <key>databaseField</key>
+ <string>id</string>
+ <key>dontShowBlobSwitch</key>
+ <string>id</string>
+ <key>encodingPopUpButton</key>
+ <string>id</string>
+ <key>favoriteSheet</key>
+ <string>id</string>
+ <key>fetchRowCountSwitch</key>
+ <string>id</string>
+ <key>hostField</key>
+ <string>id</string>
+ <key>keyChainInstance</key>
+ <string>id</string>
+ <key>limitRowsField</key>
+ <string>id</string>
+ <key>limitRowsSwitch</key>
+ <string>id</string>
+ <key>nameField</key>
+ <string>id</string>
+ <key>nullValueField</key>
+ <string>id</string>
+ <key>passwordField</key>
+ <string>id</string>
+ <key>portField</key>
+ <string>id</string>
+ <key>preferencesWindow</key>
+ <string>id</string>
+ <key>reloadAfterAddingSwitch</key>
+ <string>id</string>
+ <key>reloadAfterEditingSwitch</key>
+ <string>id</string>
+ <key>reloadAfterRemovingSwitch</key>
+ <string>id</string>
+ <key>showErrorSwitch</key>
+ <string>id</string>
+ <key>socketField</key>
+ <string>id</string>
+ <key>sshCheckbox</key>
+ <string>id</string>
+ <key>sshHostField</key>
+ <string>id</string>
+ <key>sshPasswordField</key>
+ <string>id</string>
+ <key>sshPortField</key>
+ <string>id</string>
+ <key>sshUserField</key>
+ <string>id</string>
+ <key>tableView</key>
+ <string>id</string>
+ <key>useMonospacedFontsSwitch</key>
+ <string>id</string>
+ <key>userField</key>
+ <string>id</string>
+ </dict>
+ <key>SUPERCLASS</key>
+ <string>NSObject</string>
+ </dict>
+ </array>
+ <key>IBVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/English.lproj/MainMenu.nib/info.nib b/English.lproj/MainMenu.nib/info.nib
new file mode 100644
index 00000000..7517302b
--- /dev/null
+++ b/English.lproj/MainMenu.nib/info.nib
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBFramework Version</key>
+ <string>629</string>
+ <key>IBLastKnownRelativeProjectPath</key>
+ <string>../../CocoaMySQL.xcodeproj</string>
+ <key>IBOldestOS</key>
+ <integer>5</integer>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>250</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>9C7010</string>
+ <key>targetFramework</key>
+ <string>IBCocoaFramework</string>
+</dict>
+</plist>
diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib
new file mode 100644
index 00000000..7970cf18
--- /dev/null
+++ b/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/English.lproj/MainMenu~.nib/JavaCompiling.plist b/English.lproj/MainMenu~.nib/JavaCompiling.plist
new file mode 100644
index 00000000..6e7346ac
--- /dev/null
+++ b/English.lproj/MainMenu~.nib/JavaCompiling.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>JavaSourceSubpath</key>
+ <string>_MainMenu_EOArchive_English.java</string>
+</dict>
+</plist>
diff --git a/English.lproj/MainMenu~.nib/_MainMenu_EOArchive_English.java b/English.lproj/MainMenu~.nib/_MainMenu_EOArchive_English.java
new file mode 100644
index 00000000..7a77f9c7
--- /dev/null
+++ b/English.lproj/MainMenu~.nib/_MainMenu_EOArchive_English.java
@@ -0,0 +1,728 @@
+// _MainMenu_EOArchive_English.java
+// Generated by EnterpriseObjects palette at Friday, February 24, 2006 5:48:40 PM Europe/Zurich
+
+import com.webobjects.eoapplication.*;
+import com.webobjects.eocontrol.*;
+import com.webobjects.eointerface.*;
+import com.webobjects.eointerface.swing.*;
+import com.webobjects.eointerface.swing.EOTable._EOTableColumn;
+import com.webobjects.foundation.*;
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import javax.swing.text.*;
+
+public class _MainMenu_EOArchive_English extends com.webobjects.eoapplication.EOArchive {
+ IBHelpConnector _iBHelpConnector0, _iBHelpConnector1, _iBHelpConnector10, _iBHelpConnector11, _iBHelpConnector12, _iBHelpConnector2, _iBHelpConnector3, _iBHelpConnector4, _iBHelpConnector5, _iBHelpConnector6, _iBHelpConnector7, _iBHelpConnector8, _iBHelpConnector9;
+ KeyChain _keyChain0;
+ MainController _mainController0;
+ com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1;
+ com.webobjects.eointerface.swing.EOTable _nsTableView0;
+ com.webobjects.eointerface.swing.EOTable._EOTableColumn _eoTableColumn0, _eoTableColumn1, _eoTableColumn2, _eoTableColumn3, _eoTableColumn4, _eoTableColumn5;
+ com.webobjects.eointerface.swing.EOTextField _eoTextField0, _eoTextField1, _eoTextField2, _eoTextField3, _eoTextField4, _nsTextField0, _nsTextField1, _nsTextField10, _nsTextField11, _nsTextField12, _nsTextField13, _nsTextField14, _nsTextField15, _nsTextField16, _nsTextField17, _nsTextField18, _nsTextField19, _nsTextField2, _nsTextField20, _nsTextField21, _nsTextField22, _nsTextField23, _nsTextField24, _nsTextField25, _nsTextField26, _nsTextField3, _nsTextField4, _nsTextField5, _nsTextField6, _nsTextField7, _nsTextField8, _nsTextField9;
+ javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4;
+ javax.swing.JCheckBox _jCheckBox0, _nsButton10, _nsButton11, _nsButton12, _nsButton5, _nsButton6, _nsButton7, _nsButton8, _nsButton9;
+ javax.swing.JComboBox _popup0;
+ javax.swing.JPanel _nsView0, _nsView1;
+ javax.swing.JPasswordField _nsSecureTextField0, _nsTextField27;
+
+ public _MainMenu_EOArchive_English(Object owner, NSDisposableRegistry registry) {
+ super(owner, registry);
+ }
+
+ protected void _construct() {
+ Object owner = _owner();
+ EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null;
+ Object replacement;
+
+ super._construct();
+
+ _eoTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _eoTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _eoTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _eoTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _jCheckBox0 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox(""), "");
+ _eoTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "");
+ _nsTextField26 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField13");
+ _iBHelpConnector12 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsTextField25 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ _nsTextField24 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField11");
+ _nsTextField23 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ _iBHelpConnector11 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector10 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Copy"), "NSButton211");
+ _iBHelpConnector9 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Remove"), "NSButton21");
+ _iBHelpConnector8 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Add"), "NSButton2");
+ _popup0 = (javax.swing.JComboBox)_registered(new javax.swing.JComboBox(), "NSPopUpButton1");
+ _iBHelpConnector7 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton12 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Use monospaced fonts"), "NSButton41111112");
+ _iBHelpConnector6 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton11 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Limit result to"), "NSButton41111111");
+ _iBHelpConnector5 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsTextField22 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+ _iBHelpConnector4 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton10 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Don't load blob and text fields"), "NSButton4111111");
+ _iBHelpConnector3 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton9 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Show error when no rows are affected"), "NSButton411111");
+ _nsTextField21 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12312");
+ _nsTextField20 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1231");
+ _nsTextField19 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12113");
+ _nsTextField18 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1212");
+ _nsTextField17 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField16 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField212");
+ _nsTextField27 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField112");
+ _nsTextField15 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField13");
+ _nsButton8 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Use SSH tunnel"), "NSButton4");
+ _nsTextField14 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1211111");
+ _nsTextField13 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField123");
+ _nsTextField12 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField122");
+ _nsTextField11 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12111");
+ _nsTextField10 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1211");
+ _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("Save"), "NSButton");
+ _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+ _nsTextField9 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField121111");
+ _nsTextField8 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField121");
+ _nsTextField7 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ _eoFrame1 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "favoriteSheet");
+ _nsView1 = (JPanel)_eoFrame1.getContentPane();
+ _nsTextField6 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField111");
+ _nsTextField5 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField3");
+ _nsTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1111");
+ _nsSecureTextField0 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField11");
+ _nsTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ _nsTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+ _keyChain0 = (KeyChain)_registered(new KeyChain(), "KeyChain");
+ _iBHelpConnector2 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ _eoTableColumn5 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn4 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn3 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn2 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "");
+ _eoTableColumn1 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "NSTableColumn1");
+ _eoTableColumn0 = (com.webobjects.eointerface.swing.EOTable._EOTableColumn)_registered(new com.webobjects.eointerface.swing.EOTable._EOTableColumn(), "NSTableColumn");
+ _nsTableView0 = (com.webobjects.eointerface.swing.EOTable)_registered(new com.webobjects.eointerface.swing.EOTable(), "NSTableView");
+ _iBHelpConnector1 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton7 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Reload table after removing a row"), "NSButton411");
+ _iBHelpConnector0 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _nsButton6 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Reload table after editing a row"), "NSButton41");
+ _mainController0 = (MainController)_registered(new MainController(), "MainController");
+ _nsButton5 = (javax.swing.JCheckBox)_registered(new javax.swing.JCheckBox("Reload table after adding a row"), "NSButton4");
+ _eoFrame0 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "preferencesWindow");
+ _nsView0 = (JPanel)_eoFrame0.getContentPane();
+ }
+
+ protected void _awaken() {
+ super._awaken();
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "unhideAllApplications", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "hideOtherApplications", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "orderFrontStandardAboutPanel", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "terminate", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "hide", ), ""));
+ _popup0.setModel(new javax.swing.DefaultComboBoxModel());
+ _popup0.addItem("Autodetect");
+ _popup0.addItem("");
+ _popup0.addItem("UCS-2 Unicode (ucs2)");
+ _popup0.addItem("UTF-8 Unicode (utf8)");
+ _popup0.addItem("");
+ _popup0.addItem("US ASCII (ascii)");
+ _popup0.addItem("ISO Latin 1 (latin1)");
+ _popup0.addItem("Mac Roman (macroman)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Latin 2 (cp1250)");
+ _popup0.addItem("ISO Latin 2 (latin2)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Arabic (cp1256)");
+ _popup0.addItem("ISO Greek (greek)");
+ _popup0.addItem("ISO Hebrew (hebrew)");
+ _popup0.addItem("ISO Turkish (latin5)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Baltic (cp1257)");
+ _popup0.addItem("");
+ _popup0.addItem("Windows Cyrillic (cp1251)");
+ _popup0.addItem("");
+ _popup0.addItem("Big5 Traditional Chinese (big5)");
+ _popup0.addItem("Shift-JIS Japanese (sjis)");
+ _popup0.addItem("EUC-JP Japanese (ujis)");
+ }
+
+ protected void _init() {
+ super._init();
+ _setFontForComponent(_eoTextField4, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "showGuessPanel", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewContent", ), ""));
+ _setFontForComponent(_eoTextField3, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "selectAll", ), ""));
+ _setFontForComponent(_eoTextField2, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "paste", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "showHelp", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "clearRecentDocuments", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewStatus", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "undo", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "import", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "print", ), ""));
+ _setFontForComponent(_eoTextField1, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "cut", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "redo", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "runPageLayout", ), ""));
+ _setFontForComponent(_jCheckBox0, "Lucida Grande", 12, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "import", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "checkSpelling", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "newDocument", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "copy", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "clear", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewQuery", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "performClose", ), ""));
+ _setFontForComponent(_eoTextField0, "Lucida Grande", 11, Font.PLAIN);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "performMiniaturize", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "toggleContinuousSpellChecking", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "export", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "arrangeInFront", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(null, "viewStructure", ), ""));
+ _setFontForComponent(_nsTextField26, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField26.setEditable(false);
+ _nsTextField26.setOpaque(false);
+ _nsTextField26.setText("Default Encoding");
+ _nsTextField26.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField26.setSelectable(false);
+ _nsTextField26.setEnabled(true);
+ _nsTextField26.setBorder(null);
+ _setFontForComponent(_nsTextField25, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField25.setEditable(false);
+ _nsTextField25.setOpaque(false);
+ _nsTextField25.setText("rows");
+ _nsTextField25.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField25.setSelectable(false);
+ _nsTextField25.setEnabled(true);
+ _nsTextField25.setBorder(null);
+ _setFontForComponent(_nsTextField24, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField24.setEditable(false);
+ _nsTextField24.setOpaque(false);
+ _nsTextField24.setText("String to display NULL-Values");
+ _nsTextField24.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField24.setSelectable(false);
+ _nsTextField24.setEnabled(true);
+ _nsTextField24.setBorder(null);
+ _setFontForComponent(_nsTextField23, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField23.setEditable(false);
+ _nsTextField23.setOpaque(false);
+ _nsTextField23.setText("Favorites");
+ _nsTextField23.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField23.setSelectable(false);
+ _nsTextField23.setEnabled(true);
+ _nsTextField23.setBorder(null);
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "visitHelpWebsite", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "visitWebsite", ), ""));
+ _connect(_eoFrame0, _mainController0, "delegate");
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "donate", ), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "checkForUpdates", ), ""));
+ _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton4.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "copyFavorite", _nsButton4), ""));
+ _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton3.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "removeFavorite", _nsButton3), ""));
+ _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton2.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "addFavorite", _nsButton2), ""));
+ .addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "openPreferences", ), ""));
+ _setFontForComponent(_popup0, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _popup0, "encodingPopUpButton");
+ _setFontForComponent(_nsButton12, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton12, "useMonospacedFontsSwitch");
+ _nsButton11.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "chooseLimitRows", _nsButton11), ""));
+ _setFontForComponent(_nsButton11, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton11, "limitRowsSwitch");
+ _setFontForComponent(_nsTextField22, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField22.setEditable(true);
+ _nsTextField22.setOpaque(true);
+ _nsTextField22.setText("100");
+ _nsTextField22.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField22.setSelectable(true);
+ _nsTextField22.setEnabled(false);
+ _connect(_mainController0, _nsTextField22, "limitRowsField");
+ _setFontForComponent(_nsButton10, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton10, "dontShowBlobSwitch");
+ _setFontForComponent(_nsButton9, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton9, "showErrorSwitch");
+ _setFontForComponent(_nsTextField21, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField21.setEditable(false);
+ _nsTextField21.setOpaque(false);
+ _nsTextField21.setText("Local Port");
+ _nsTextField21.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField21.setSelectable(false);
+ _nsTextField21.setEnabled(true);
+ _nsTextField21.setBorder(null);
+ _setFontForComponent(_nsTextField20, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField20.setEditable(false);
+ _nsTextField20.setOpaque(false);
+ _nsTextField20.setText("SSH Host");
+ _nsTextField20.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField20.setSelectable(false);
+ _nsTextField20.setEnabled(true);
+ _nsTextField20.setBorder(null);
+ _setFontForComponent(_nsTextField19, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField19.setEditable(false);
+ _nsTextField19.setOpaque(false);
+ _nsTextField19.setText("SSH Password\n");
+ _nsTextField19.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField19.setSelectable(false);
+ _nsTextField19.setEnabled(true);
+ _nsTextField19.setBorder(null);
+ _setFontForComponent(_nsTextField18, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField18.setEditable(false);
+ _nsTextField18.setOpaque(false);
+ _nsTextField18.setText("SSH User\n");
+ _nsTextField18.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField18.setSelectable(false);
+ _nsTextField18.setEnabled(true);
+ _nsTextField18.setBorder(null);
+ _connect(_mainController0, _nsTextField15, "sshUserField");
+ _connect(_mainController0, _nsTextField27, "sshPasswordField");
+ _connect(_mainController0, _nsTextField16, "sshPortField");
+ _connect(_mainController0, _nsTextField17, "sshHostField");
+ _connect(_nsTextField17, _nsTextField15, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField17, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField17.setEditable(true);
+ _nsTextField17.setOpaque(true);
+ _nsTextField17.setText("");
+ _nsTextField17.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField17.setSelectable(true);
+ _nsTextField17.setEnabled(false);
+ _connect(_nsTextField16, _nsTextField17, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField16, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField16.setEditable(true);
+ _nsTextField16.setOpaque(true);
+ _nsTextField16.setText("8888");
+ _nsTextField16.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField16.setSelectable(true);
+ _nsTextField16.setEnabled(false);
+ _connect(_nsTextField27, _nsTextField16, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField27, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField27.setEditable(true);
+ _nsTextField27.setOpaque(true);
+ _nsTextField27.setText("");
+ _nsTextField27.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField27.setEnabled(false);
+ _connect(_nsTextField15, _nsTextField27, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField15, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField15.setEditable(true);
+ _nsTextField15.setOpaque(true);
+ _nsTextField15.setText("");
+ _nsTextField15.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField15.setSelectable(true);
+ _nsTextField15.setEnabled(false);
+ _connect(_mainController0, _nsButton8, "sshCheckbox");
+ _nsButton8.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "toggleUseSSH", _nsButton8), ""));
+ _setFontForComponent(_nsButton8, "Lucida Grande", 11, Font.PLAIN);
+ _setFontForComponent(_nsTextField14, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField14.setEditable(false);
+ _nsTextField14.setOpaque(false);
+ _nsTextField14.setText("* optional");
+ _nsTextField14.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField14.setSelectable(false);
+ _nsTextField14.setEnabled(true);
+ _nsTextField14.setBorder(null);
+ _setFontForComponent(_nsTextField13, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField13.setEditable(false);
+ _nsTextField13.setOpaque(false);
+ _nsTextField13.setText("Socket *");
+ _nsTextField13.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField13.setSelectable(false);
+ _nsTextField13.setEnabled(true);
+ _nsTextField13.setBorder(null);
+ _setFontForComponent(_nsTextField12, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField12.setEditable(false);
+ _nsTextField12.setOpaque(false);
+ _nsTextField12.setText("Name\n");
+ _nsTextField12.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField12.setSelectable(false);
+ _nsTextField12.setEnabled(true);
+ _nsTextField12.setBorder(null);
+ _setFontForComponent(_nsTextField11, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField11.setEditable(false);
+ _nsTextField11.setOpaque(false);
+ _nsTextField11.setText("Port *");
+ _nsTextField11.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField11.setSelectable(false);
+ _nsTextField11.setEnabled(true);
+ _nsTextField11.setBorder(null);
+ _setFontForComponent(_nsTextField10, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField10.setEditable(false);
+ _nsTextField10.setOpaque(false);
+ _nsTextField10.setText("Password\n");
+ _nsTextField10.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField10.setSelectable(false);
+ _nsTextField10.setEnabled(true);
+ _nsTextField10.setBorder(null);
+ _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "closeFavoriteSheet", _nsButton1), ""));
+ _setFontForComponent(_nsButton1, "Lucida Grande", 11, Font.PLAIN);
+ _nsButton1.setMargin(new Insets(0, 2, 0, 2));
+ _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_mainController0, "closeFavoriteSheet", _nsButton0), ""));
+ _setFontForComponent(_nsButton0, "Lucida Grande", 11, Font.PLAIN);
+ _nsButton0.setMargin(new Insets(0, 2, 0, 2));
+ _setFontForComponent(_nsTextField9, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField9.setEditable(false);
+ _nsTextField9.setOpaque(false);
+ _nsTextField9.setText("Database *");
+ _nsTextField9.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField9.setSelectable(false);
+ _nsTextField9.setEnabled(true);
+ _nsTextField9.setBorder(null);
+ _setFontForComponent(_nsTextField8, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField8.setEditable(false);
+ _nsTextField8.setOpaque(false);
+ _nsTextField8.setText("User\n");
+ _nsTextField8.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField8.setSelectable(false);
+ _nsTextField8.setEnabled(true);
+ _nsTextField8.setBorder(null);
+ _setFontForComponent(_nsTextField7, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField7.setEditable(false);
+ _nsTextField7.setOpaque(false);
+ _nsTextField7.setText("Host");
+ _nsTextField7.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField7.setSelectable(false);
+ _nsTextField7.setEnabled(true);
+ _nsTextField7.setBorder(null);
+ if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); }
+ _nsTextField4.setSize(159, 18);
+ _nsTextField4.setLocation(14, 118);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField4, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField4);
+ _nsSecureTextField0.setSize(159, 18);
+ _nsSecureTextField0.setLocation(14, 92);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsSecureTextField0, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsSecureTextField0);
+ _nsTextField7.setSize(29, 14);
+ _nsTextField7.setLocation(178, 43);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField7, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField7);
+ _nsTextField8.setSize(29, 14);
+ _nsTextField8.setLocation(178, 69);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField8, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField8);
+ _nsTextField9.setSize(63, 14);
+ _nsTextField9.setLocation(178, 121);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField9, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField9);
+ _nsTextField3.setSize(159, 18);
+ _nsTextField3.setLocation(14, 66);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField3, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField3);
+ _nsButton0.setSize(77, 22);
+ _nsButton0.setLocation(95, 320);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton0);
+ _nsButton1.setSize(77, 22);
+ _nsButton1.setLocation(177, 320);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton1);
+ _nsTextField10.setSize(55, 14);
+ _nsTextField10.setLocation(178, 95);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField10, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField10);
+ _nsTextField11.setSize(35, 14);
+ _nsTextField11.setLocation(178, 173);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField11, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField11);
+ _nsTextField6.setSize(159, 18);
+ _nsTextField6.setLocation(14, 170);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField6, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField6);
+ _nsTextField2.setSize(159, 18);
+ _nsTextField2.setLocation(14, 40);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField2, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField2);
+ _nsTextField12.setSize(35, 14);
+ _nsTextField12.setLocation(178, 17);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField12, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField12);
+ _nsTextField1.setSize(159, 18);
+ _nsTextField1.setLocation(14, 14);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField1);
+ _nsTextField13.setSize(48, 14);
+ _nsTextField13.setLocation(178, 147);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField13, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField13);
+ _nsTextField5.setSize(159, 18);
+ _nsTextField5.setLocation(14, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField5, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField5);
+ _nsTextField14.setSize(57, 14);
+ _nsTextField14.setLocation(11, 324);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField14, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField14);
+ _nsButton8.setSize(118, 17);
+ _nsButton8.setLocation(10, 195);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton8, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton8);
+ _nsTextField15.setSize(159, 18);
+ _nsTextField15.setLocation(14, 244);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField15, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField15);
+ _nsTextField27.setSize(159, 18);
+ _nsTextField27.setLocation(14, 270);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField27, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField27);
+ _nsTextField18.setSize(55, 14);
+ _nsTextField18.setLocation(178, 248);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField18, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField18);
+ _nsTextField19.setSize(78, 14);
+ _nsTextField19.setLocation(177, 274);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField19, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField19);
+ _nsTextField17.setSize(159, 18);
+ _nsTextField17.setLocation(14, 218);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField17, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField17);
+ _nsTextField20.setSize(55, 14);
+ _nsTextField20.setLocation(178, 221);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField20, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField20);
+ _nsTextField16.setSize(159, 18);
+ _nsTextField16.setLocation(14, 296);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField16, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField16);
+ _nsTextField21.setSize(63, 14);
+ _nsTextField21.setLocation(178, 299);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField21, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsTextField21);
+ _nsView1.setSize(264, 353);
+ _eoFrame1.setTitle("favoriteSheet");
+ _eoFrame1.setLocation(447, 267);
+ _eoFrame1.setSize(264, 353);
+ _connect(_mainController0, _eoFrame1, "favoriteSheet");
+ _connect(_mainController0, _nsTextField2, "hostField");
+ _connect(_mainController0, _nsTextField3, "userField");
+ _connect(_mainController0, _nsSecureTextField0, "passwordField");
+ _connect(_mainController0, _nsTextField4, "databaseField");
+ _connect(_mainController0, _nsTextField5, "socketField");
+ _connect(_mainController0, _nsTextField6, "portField");
+ _connect(_nsTextField6, _nsTextField1, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField6, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField6.setEditable(true);
+ _nsTextField6.setOpaque(true);
+ _nsTextField6.setText("");
+ _nsTextField6.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField6.setSelectable(true);
+ _nsTextField6.setEnabled(true);
+ _connect(_nsTextField5, _nsTextField6, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField5, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField5.setEditable(true);
+ _nsTextField5.setOpaque(true);
+ _nsTextField5.setText("");
+ _nsTextField5.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField5.setSelectable(true);
+ _nsTextField5.setEnabled(true);
+ _connect(_nsTextField4, _nsTextField5, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField4, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField4.setEditable(true);
+ _nsTextField4.setOpaque(true);
+ _nsTextField4.setText("");
+ _nsTextField4.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField4.setSelectable(true);
+ _nsTextField4.setEnabled(true);
+ _connect(_nsSecureTextField0, _nsTextField4, "nextFocusableComponent");
+ _setFontForComponent(_nsSecureTextField0, "Lucida Grande", 11, Font.PLAIN);
+ _nsSecureTextField0.setEditable(true);
+ _nsSecureTextField0.setOpaque(true);
+ _nsSecureTextField0.setText("");
+ _nsSecureTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsSecureTextField0.setEnabled(true);
+ _connect(_nsTextField3, _nsSecureTextField0, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField3, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField3.setEditable(true);
+ _nsTextField3.setOpaque(true);
+ _nsTextField3.setText("");
+ _nsTextField3.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField3.setSelectable(true);
+ _nsTextField3.setEnabled(true);
+ _connect(_nsTextField2, _nsTextField3, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField2, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField2.setEditable(true);
+ _nsTextField2.setOpaque(true);
+ _nsTextField2.setText("");
+ _nsTextField2.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField2.setSelectable(true);
+ _nsTextField2.setEnabled(true);
+ _connect(_nsTextField1, _nsTextField2, "nextFocusableComponent");
+ _setFontForComponent(_nsTextField1, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField1.setEditable(true);
+ _nsTextField1.setOpaque(true);
+ _nsTextField1.setText("");
+ _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField1.setSelectable(true);
+ _nsTextField1.setEnabled(true);
+ _connect(_mainController0, _nsTextField1, "nameField");
+ _connect(_mainController0, _keyChain0, "keyChainInstance");
+ _setFontForComponent(_nsTextField0, "Lucida Grande", 11, Font.PLAIN);
+ _nsTextField0.setEditable(true);
+ _nsTextField0.setOpaque(true);
+ _nsTextField0.setText("NULL");
+ _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField0.setSelectable(true);
+ _nsTextField0.setEnabled(true);
+ _connect(_mainController0, _nsTextField0, "nullValueField");
+ _connect(_nsTableView0, _mainController0, "delegate");
+ _connect(_nsTableView0, _mainController0, "dataSource");
+ _eoTableColumn5.setMinWidth(10);
+ _eoTableColumn5.setMaxWidth(1000);
+ _eoTableColumn5.setPreferredWidth(43);
+ _eoTableColumn5.setWidth(43);
+ _eoTableColumn5.setResizable(true);
+ _eoTableColumn5.setHeaderValue("use SSH");
+ if ((_eoTableColumn5.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn5.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn4.setMinWidth(10);
+ _eoTableColumn4.setMaxWidth(1000);
+ _eoTableColumn4.setPreferredWidth(80);
+ _eoTableColumn4.setWidth(80);
+ _eoTableColumn4.setResizable(true);
+ _eoTableColumn4.setHeaderValue("Database");
+ if ((_eoTableColumn4.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn4.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn3.setMinWidth(10);
+ _eoTableColumn3.setMaxWidth(1000);
+ _eoTableColumn3.setPreferredWidth(32);
+ _eoTableColumn3.setWidth(32);
+ _eoTableColumn3.setResizable(true);
+ _eoTableColumn3.setHeaderValue("Port");
+ if ((_eoTableColumn3.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn3.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn2.setMinWidth(10);
+ _eoTableColumn2.setMaxWidth(1000);
+ _eoTableColumn2.setPreferredWidth(80);
+ _eoTableColumn2.setWidth(80);
+ _eoTableColumn2.setResizable(true);
+ _eoTableColumn2.setHeaderValue("User");
+ if ((_eoTableColumn2.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn2.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn1.setMinWidth(10);
+ _eoTableColumn1.setMaxWidth(1000);
+ _eoTableColumn1.setPreferredWidth(80);
+ _eoTableColumn1.setWidth(80);
+ _eoTableColumn1.setResizable(true);
+ _eoTableColumn1.setHeaderValue("Host");
+ if ((_eoTableColumn1.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn1.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _eoTableColumn0.setMinWidth(10);
+ _eoTableColumn0.setMaxWidth(1000);
+ _eoTableColumn0.setPreferredWidth(80);
+ _eoTableColumn0.setWidth(80);
+ _eoTableColumn0.setResizable(true);
+ _eoTableColumn0.setHeaderValue("Name");
+ if ((_eoTableColumn0.getHeaderRenderer() != null)) {
+ ((DefaultTableCellRenderer)(_eoTableColumn0.getHeaderRenderer())).setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ }
+ _nsTableView0.table().addColumn(_eoTableColumn0);
+ _nsTableView0.table().addColumn(_eoTableColumn1);
+ _nsTableView0.table().addColumn(_eoTableColumn2);
+ _nsTableView0.table().addColumn(_eoTableColumn3);
+ _nsTableView0.table().addColumn(_eoTableColumn4);
+ _nsTableView0.table().addColumn(_eoTableColumn5);
+ _setFontForComponent(_nsTableView0.table().getTableHeader(), "Lucida Grande", 11, Font.PLAIN);
+ _nsTableView0.table().setRowHeight(18);
+ _connect(_mainController0, _nsTableView0, "tableView");
+ _connect(_mainController0, _eoFrame0, "preferencesWindow");
+ _setFontForComponent(_nsButton7, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton7, "reloadAfterRemovingSwitch");
+ _setFontForComponent(_nsButton6, "Lucida Grande", 11, Font.PLAIN);
+ _connect(_mainController0, _nsButton6, "reloadAfterEditingSwitch");
+ _connect(_mainController0, _nsButton5, "reloadAfterAddingSwitch");
+ _setFontForComponent(_nsButton5, "Lucida Grande", 11, Font.PLAIN);
+ if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); }
+ _nsButton5.setSize(190, 17);
+ _nsButton5.setLocation(12, 32);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton5, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton5);
+ _nsButton6.setSize(190, 17);
+ _nsButton6.setLocation(12, 52);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton6, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton6);
+ _nsButton7.setSize(203, 17);
+ _nsButton7.setLocation(12, 72);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton7, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton7);
+ _nsTableView0.setSize(427, 178);
+ _nsTableView0.setLocation(256, 36);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTableView0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTableView0);
+ _nsTextField23.setSize(52, 14);
+ _nsTextField23.setLocation(254, 14);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField23, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField23);
+ _nsButton2.setSize(28, 29);
+ _nsButton2.setLocation(657, 221);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton2);
+ _nsButton3.setSize(28, 29);
+ _nsButton3.setLocation(625, 221);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton3);
+ _nsButton4.setSize(28, 29);
+ _nsButton4.setLocation(593, 221);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton4);
+ _nsTextField0.setSize(51, 18);
+ _nsTextField0.setLocation(14, 173);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField0);
+ _nsTextField24.setSize(168, 14);
+ _nsTextField24.setLocation(70, 176);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField24, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField24);
+ _nsButton9.setSize(225, 17);
+ _nsButton9.setLocation(12, 92);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton9, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton9);
+ _nsButton10.setSize(185, 17);
+ _nsButton10.setLocation(12, 112);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton10, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton10);
+ _nsButton11.setSize(100, 17);
+ _nsButton11.setLocation(12, 152);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton11, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton11);
+ _nsTextField22.setSize(76, 18);
+ _nsTextField22.setLocation(115, 150);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField22, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField22);
+ _nsTextField25.setSize(30, 14);
+ _nsTextField25.setLocation(196, 153);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField25, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField25);
+ _nsTextField26.setSize(98, 14);
+ _nsTextField26.setLocation(154, 200);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField26, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsTextField26);
+ _nsButton12.setSize(185, 17);
+ _nsButton12.setLocation(12, 132);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton12, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton12);
+ _popup0.setSize(134, 22);
+ _popup0.setLocation(15, 198);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_popup0, EOViewLayout.WidthSizable | EOViewLayout.MinYMargin);
+ _nsView0.add(_popup0);
+ _nsView0.setSize(696, 255);
+ _eoFrame0.setTitle("Preferences");
+ _eoFrame0.setLocation(51, 427);
+ _eoFrame0.setSize(696, 255);
+ }
+}
diff --git a/English.lproj/MainMenu~.nib/classes.nib b/English.lproj/MainMenu~.nib/classes.nib
new file mode 100644
index 00000000..460e684a
--- /dev/null
+++ b/English.lproj/MainMenu~.nib/classes.nib
@@ -0,0 +1,67 @@
+{
+ IBClasses = (
+ {
+ ACTIONS = {
+ export = id;
+ import = id;
+ viewContent = id;
+ viewQuery = id;
+ viewStatus = id;
+ viewStructure = id;
+ };
+ CLASS = FirstResponder;
+ LANGUAGE = ObjC;
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = KeyChain; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {
+ addFavorite = id;
+ checkForUpdates = id;
+ chooseLimitRows = id;
+ closeFavoriteSheet = id;
+ closePreferences = id;
+ copyFavorite = id;
+ donate = id;
+ openPreferences = id;
+ removeFavorite = id;
+ toggleUseSSH = id;
+ visitHelpWebsite = id;
+ visitWebsite = id;
+ };
+ CLASS = MainController;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ databaseField = id;
+ dontShowBlobSwitch = id;
+ encodingPopUpButton = id;
+ favoriteSheet = id;
+ hostField = id;
+ keyChainInstance = id;
+ limitRowsField = id;
+ limitRowsSwitch = id;
+ nameField = id;
+ nullValueField = id;
+ passwordField = id;
+ portField = id;
+ preferencesWindow = id;
+ reloadAfterAddingSwitch = id;
+ reloadAfterEditingSwitch = id;
+ reloadAfterRemovingSwitch = id;
+ showErrorSwitch = id;
+ socketField = id;
+ sshCheckbox = id;
+ sshHostField = id;
+ sshPasswordField = id;
+ sshPortField = id;
+ sshUserField = id;
+ tableView = id;
+ useMonospacedFontsSwitch = id;
+ userField = id;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {CLASS = SSHTunnelApp; LANGUAGE = ObjC; SUPERCLASS = NSObject; }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/English.lproj/MainMenu~.nib/info.nib b/English.lproj/MainMenu~.nib/info.nib
new file mode 100644
index 00000000..d50bf0d3
--- /dev/null
+++ b/English.lproj/MainMenu~.nib/info.nib
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>416 43 356 240 0 0 1152 746 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>29</key>
+ <string>249 582 365 44 0 0 1152 746 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>439.0</string>
+ <key>IBSystem Version</key>
+ <string>8H14</string>
+</dict>
+</plist>
diff --git a/English.lproj/MainMenu~.nib/keyedobjects.nib b/English.lproj/MainMenu~.nib/keyedobjects.nib
new file mode 100644
index 00000000..a4c18926
--- /dev/null
+++ b/English.lproj/MainMenu~.nib/keyedobjects.nib
Binary files differ
diff --git a/English.lproj/MainMenu~.nib/objects.nib b/English.lproj/MainMenu~.nib/objects.nib
new file mode 100644
index 00000000..07c91d2a
--- /dev/null
+++ b/English.lproj/MainMenu~.nib/objects.nib
Binary files differ
diff --git a/English.lproj/english_help/bar.gif b/English.lproj/english_help/bar.gif
new file mode 100644
index 00000000..f716f3f9
--- /dev/null
+++ b/English.lproj/english_help/bar.gif
Binary files differ
diff --git a/English.lproj/english_help/cocoamysql_logo.jpg b/English.lproj/english_help/cocoamysql_logo.jpg
new file mode 100644
index 00000000..3308dc6c
--- /dev/null
+++ b/English.lproj/english_help/cocoamysql_logo.jpg
Binary files differ
diff --git a/English.lproj/english_help/english_help idx b/English.lproj/english_help/english_help idx
new file mode 100644
index 00000000..beac9c4d
--- /dev/null
+++ b/English.lproj/english_help/english_help idx
Binary files differ
diff --git a/English.lproj/english_help/icon.gif b/English.lproj/english_help/icon.gif
new file mode 100644
index 00000000..d6f678ac
--- /dev/null
+++ b/English.lproj/english_help/icon.gif
Binary files differ
diff --git a/English.lproj/english_help/index.html b/English.lproj/english_help/index.html
new file mode 100755
index 00000000..11d70d7f
--- /dev/null
+++ b/English.lproj/english_help/index.html
@@ -0,0 +1,101 @@
+<html>
+<head>
+<title>CocoaMySQL Help</title>
+<meta name="AppleTitle" content="CocoaMySQL Help">
+<meta NAME="AppleIcon" CONTENT="icon.gif">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial" size="-1">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="70">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left">
+ <h1>CocoaMySQL Help</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+
+<table border="0" cellpadding="2" cellspacing="2" width="100%">
+ <tr>
+ <td width="50%" valign="top">
+ <font face="Lucida Grande,Geneva,Arial">
+ <b>Topics</b>
+ <br>
+ <font size="-1">
+ <a href="topics/connect.html">Connecting to a Database</a>
+ <br>
+ <a href="topics/tables.html">Managing Tables (Creation, Deletion, Changes)</a>
+ <br>
+ <a href="topics/data.html">Data Management</a>
+ <br>
+ <a href="topics/query.html">Performing Custom Queries</a>
+ <br>
+ <a href="topics/dump.html">Data Dumps (CSV, XML)</a>
+ <br>
+ <a href="topics/preferences.html">Setting Preferences</a>
+ <br>
+ <a href="topics/console.html">Console</a>
+ <br>
+ <a href="topics/encoding.html">Encoding</a>
+ <br>
+ <a href="topics/syntax.html">Table Syntax Generation</a>
+ <br>
+ <a href="topics/sample_tables.html">SQL Table examples</a>
+ <br>
+ <a href="topics/sample_query.html">SQL Query examples</a>
+ <br>
+ <a href="topics/reference.html">MySQL SQL Reference</a>
+ <br>
+ </font>
+ </font>
+ </td>
+ <td width="50%" valign="top">
+ <font face="Lucida Grande,Geneva,Arial">
+ <b>CocoaMySQL Websites</b>
+ <br>
+ <font size="-1">
+ <a href="http://cocoamysql.sourceforge.net/">http://cocoamysql.sourceforge.net/</a>
+ <br>
+ <a href="http://sourceforge.net/projects/cocoamysql/">http://sourceforge.net/projects/cocoamysql/</a>
+ </font>
+ <br>
+ <br>
+ <hr>
+ <b>Developers and Contributors</b>
+ <br>
+ <font size="-1">Lorenz Textor, Jeff Skrysak, Walter Lee Davis, Tristan O'Tierney, Kotaro Funakoshi, David Buxton, Stuart B. Glenn, Jason Hallford, <a href="http://www.snowhouse.co.uk/">snowhouse</a>, <a href="http://mysql-cocoa.sourceforge.net/">MySQL Cocoa project</a></font>
+ <br>
+ <br>
+ <hr>
+ <b>MySQL Websites</b>
+ <br>
+ <font size="-1">
+ <a href="http://www.mysql.com/">http://www.mysql.com/</a>
+ <br>
+ <a href="http://www.serverlogistics.com/mysql.php">http://www.serverlogistics.com/mysql.php</a>
+ </font>
+ <br>
+ </font>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/bar.gif b/English.lproj/english_help/topics/bar.gif
new file mode 100644
index 00000000..f716f3f9
--- /dev/null
+++ b/English.lproj/english_help/topics/bar.gif
Binary files differ
diff --git a/English.lproj/english_help/topics/cocoamysql_logo.jpg b/English.lproj/english_help/topics/cocoamysql_logo.jpg
new file mode 100644
index 00000000..3308dc6c
--- /dev/null
+++ b/English.lproj/english_help/topics/cocoamysql_logo.jpg
Binary files differ
diff --git a/English.lproj/english_help/topics/connect.html b/English.lproj/english_help/topics/connect.html
new file mode 100755
index 00000000..b32c0dc8
--- /dev/null
+++ b/English.lproj/english_help/topics/connect.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Connecting to a Database</title>
+<meta name="AppleTitle" content="Connecting to a Database">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Connecting to a Database</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;In order to work with a database and its tables, you must first be connected to it. The database connection screen appears at the start of the program.
+<br>
+<br>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Enter at least the host (IP or domain name). To connect to a local database, enter localhost or 127.0.0.1 as host.</li>
+ <li>If you enter a database, it will be selected when the connection to the server is established. Otherwise you can select one of the databases on the server afterwards.</li>
+ <li>If you enter no port, CocoaMySQL uses the default port.</li>
+ <li>Choose "Save to favorites..." in the favorites popup-button to save a connection. Passwords are stored in the Keychain. To edit favorites open the Preferences.</li>
+ <li>You can connect to multiple databases by opening a new window (Menu File > New)</li>
+ </ul>
+ </td>
+ <td width="255" valign="top" align="center">
+ <img src="connect.jpg" width="220" height="199" border="0">
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/connect.jpg b/English.lproj/english_help/topics/connect.jpg
new file mode 100644
index 00000000..e9c1ab6e
--- /dev/null
+++ b/English.lproj/english_help/topics/connect.jpg
Binary files differ
diff --git a/English.lproj/english_help/topics/console.html b/English.lproj/english_help/topics/console.html
new file mode 100755
index 00000000..6bd2a8f3
--- /dev/null
+++ b/English.lproj/english_help/topics/console.html
@@ -0,0 +1,48 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Actions Console</title>
+<meta name="AppleTitle" content="Actions Console">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Console</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;The Console at the bottom of CocoaMySQL lists all of the actions you made in the current session accompanied by a timestamp.
+It can be shown or hidden using the toolbar icon at the top that says "Show/Hide Console". You can also clear
+the console by using the "Clear Console" button. If those two icons are not located in your toolbar then right-click
+in the toolbar area and select "Customize Toolbar..." from the menu. You should then see a window
+of icons which you can add to your CocoaMySQL toolbar including the two mentioned above.
+<br>
+<br>
+
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/data.html b/English.lproj/english_help/topics/data.html
new file mode 100755
index 00000000..109e7b0c
--- /dev/null
+++ b/English.lproj/english_help/topics/data.html
@@ -0,0 +1,92 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Data Management</title>
+<meta name="AppleTitle" content="Data Management">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Data Management</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;In order to view, add, modify, or change data (rows) in your database tables you must either be in the "Content" tab or the "Custom Query" tab.
+<br>
+<br>
+<b>Adding and editing fields</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Add or remove entries with the plus- and minus-buttons. You can select more than one entry and remove them together.</li>
+ <li>Edit entries by double-clicking on the value you want to change. If the button with the three lines on it is clicked, double clicking on a value opens a sheet where you can edit it. This is preferred to edit large entries or entries with multiple lines.</li>
+ <li>Use the value specified in the preferences (NULL by default) to enter NULL-values.</li>
+ <li><font color="red">Changes aren't written to the database until you deselect the row!</font></li>
+ <li>It is recommended that you edit only tables which have a primary key.</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+<br>
+<br>
+<b>Sorting and filtering the table content</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>To sort a table by a field, click on the header of the appropriate column in the content-view.</li>
+ <li>Click on it twice to sort the table in descending order.</li>
+ <li>Select a field and operator and enter a keyword to filter a table. Click on the Show All-button to disable filtering.</li>
+ <li>As wildcards use % and _ (% matches any number of characters, even zero characters; _ matches exactly one character)</li>
+ <li>If you have selected "Limit result..." in the Preferences, you can specify the first row to be returned and hit "Go".</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+<br>
+<br>
+<b>Binary Data (Images, Strings, Hex Representations)</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Field type should be Blob or Longblob</li>
+ <li>To edit/enter the data, double select the field in the Content tab</li>
+ <li>Click on Open and load an image</li>
+ <li>Change to image and hex view</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/dump.html b/English.lproj/english_help/topics/dump.html
new file mode 100755
index 00000000..f50804f1
--- /dev/null
+++ b/English.lproj/english_help/topics/dump.html
@@ -0,0 +1,93 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Data Dumps</title>
+<meta name="AppleTitle" content="Data Dumps">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Data Dumps</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;In order to perform actions with data dumps, you must use the "File->Import; File->Export" menu options of CocoaMySQL. A variety
+of exports/dumps can be performed: CocoaMySQL dump, Export of Table Content Results (csv or xml format), Export of Custom
+Query Results (csv or xml format), or Export of Multiple Table data (csv or xml format). On the other hand, you can only import a
+CocoaMySQL dump or a CSV file.
+<br>
+<br>
+<b>CSV File Format Information</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>You can choose the following characters: fields enclosed, fields terminated, escaped and line ends</li>
+ <li>The following characters are escaped: the escaped-character itself, the line ends character, the enclosed character (if given) and the fields terminated character if no enclosed character is given</li>
+ <li>NULL values are written without enclosed character. If it is enclosed, it is interpreted as a string.</li>
+ <li>When importing a csv, unenclosed \N is also interpreted as NULL (this format is used by mysqldump)</li>
+ <li>The recommended formats should work best. When importing, enclosed/terminated/escaped characters should be all only one character long (line ends may be longer). </li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+<br>
+<b>Importing Dumps</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Choose "File->Import" from the CocoaMySQL Menu</li>
+ <li>You must choose to import a CSV file (table data) or a CocoaMySQL dump (varied information)</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+
+<br>
+<b>Excel CSV Formatting Options</b>
+<br>
+If you wish to export data to a CSV file for use in Excel, use the following settings:
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Enclosed by: " (single quote)</li>
+ <li>Escaped by: " (single quote)</li>
+ <li>Line ends: \r (for Macs)</li>
+ <li>Delimiter: , (comma)</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/encoding.html b/English.lproj/english_help/topics/encoding.html
new file mode 100755
index 00000000..c824d70c
--- /dev/null
+++ b/English.lproj/english_help/topics/encoding.html
@@ -0,0 +1,73 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Text Encoding</title>
+<meta name="AppleTitle" content="Text Encoding">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Text Encoding</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;You may choose the type of encoding for the data (text) that is stored in your MySQL database. There are two
+places to choose the encoding: the Preferences pane or the encoding pull-down bar at the bottom left of the application window. There
+are over 20 encodings for you to choose from.
+<br>
+<br>
+<b>In the Preferences Pane</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Open up the "Preferences Pane" of CocoaMySQL</li>
+ <li>From the pull-down at the bottom left of the preferences window, labelled "Default Encoding", choose an option.</li>
+ <li>The encoding you choose will be the default encoding for all future databases</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+<br>
+<b>In the Application Window</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>In the main application window there will be a pull-down at the bottom left of the window labelled "Encoding".</li>
+ <li>From the pull-down choose an encoding option.</li>
+ <li>The encoding you choose will be the default encoding for all future databases</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/preferences.html b/English.lproj/english_help/topics/preferences.html
new file mode 100755
index 00000000..66ae21a8
--- /dev/null
+++ b/English.lproj/english_help/topics/preferences.html
@@ -0,0 +1,58 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Setting Preferences</title>
+<meta name="AppleTitle" content="Setting Preferences">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Setting Preferences</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+<br>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Choose if you want to reload the table after adding, editing or removing a row. If you reload it, you will be sure that the entries showed by CocoaMySQL correspond to the entries in the MySQL database, but editing tables will become slow with big tables.</li>
+ <li>Choose if you want CocoaMySQL to show an error message if no rows have been affected after adding or editing a row.</li>
+ <li>Choose if you want to display the values of blob and text fields (especially with big tables this can speed up the interface significantly because CocoaMySQL will load only the blob and text fields of the rows you will be editing).</li>
+ <li>Choose if you want to limit the rows returned by the MySQL server. You can limit the result to a given number of rows to speed up the interface.</li>
+ <li>Select a value that is displayed and used to enter NULL-values.</li>
+ <li>Add favorites used to quickly connect to a MySQL database. Drag&amp;drop them to change their order. Double-click to edit a favorite. Passwords are stored in the Keychain.</li>
+ </ul>
+ </td>
+ <td width="350" valign="top" align="center">
+ <img src="preferences.jpg" width="350" height="160" border="0">
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/preferences.jpg b/English.lproj/english_help/topics/preferences.jpg
new file mode 100644
index 00000000..64ae8e10
--- /dev/null
+++ b/English.lproj/english_help/topics/preferences.jpg
Binary files differ
diff --git a/English.lproj/english_help/topics/query.html b/English.lproj/english_help/topics/query.html
new file mode 100755
index 00000000..2be8ebe9
--- /dev/null
+++ b/English.lproj/english_help/topics/query.html
@@ -0,0 +1,58 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Performing Custom Queries</title>
+<meta name="AppleTitle" content="Performing Custom Queries">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Performing Custom Queries</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;In order to perform a SQL query you must first choose the "Custom Query" tab.
+<br>
+<br>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Enter your query and click on the "Run Query" button.</li>
+ <li>The result, if there is one, is displayed in the bottom view.</li>
+ <li>Under "Last Error Message" you can see the last error message returned by MySQL, if there is one.</li>
+ <li>Add your query to the favorites or select a favorite query with the favorites pop-up-button.</li>
+ <li>Select one of the last 20 queries with the history pop-up-button.</li>
+ <li>You can perform custom queries out of your favorite text editor by using the services menu (Services > CocoaMySQL > Perform selection as MySQL query). CocoaMySQL uses the last opened window to perform the query.</li>
+ <li>If you perferm a query out of a different text editor, be sure that CocoaMySQL is already loaded and has at least one window open.</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/reference.html b/English.lproj/english_help/topics/reference.html
new file mode 100755
index 00000000..532d29b4
--- /dev/null
+++ b/English.lproj/english_help/topics/reference.html
@@ -0,0 +1,212 @@
+<html>
+<head>
+<title>CocoaMySQL Help - MySQL SQL Referernce</title>
+<meta name="AppleTitle" content="SQL Reference">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>MySQL SQL Reference</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+<table border="0" width="95%">
+ <tr>
+ <td>
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ In the following commands and functions, any italicized text should be replaced by a variable
+ or name of your choice. Any text within brackets ( [ and ] ) is optional. This is only a short reference
+ of the SQL commands supported in MySQL. It is NOT the full list and also may not be complete
+ nor up-to-date.
+ </font>
+ </td>
+ </tr>
+</table>
+
+<br>
+<table border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <td width="60%" valign="top">
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ <b>Commands</b>
+ <br>
+ CREATE DATABASE [IF NOT EXISTS] <i>name</i>
+ <br>
+ CREATE [UNIQUE|FULLTEXT] INDEX <i>name</i> ON <i>table</i> (<i>column</i>,..)
+ <br>
+ CREATE TABLE [IF NOT EXISTS] <i>name</i>
+ <br>
+ DELETE FROM <i>table</i> [WHERE <i>clause</i>] [LIMIT <i>n</i>]
+ <br>
+ DROP DATABASE [IF EXISTS] <i>name</i>
+ <br>
+ DROP TABLE [IF EXISTS] <i>name</i>
+ <br>
+ GRANT <i>privilege</i> ON <i>table</i> TO <i>user</i>
+ <br>
+ INSERT [INTO] <i>table</i> [ (column, ...) ] VALUES (values, ...)
+ <br>
+ LOAD DATA INFILE <i>file</i> INTO TABLE <i>name</i>
+ <br>
+ SELECT [DISTINCT|ALL| |] FROM <i>table</i> [WHERE <i>clause</i> ]
+ <br>
+ UPDATE <i>table</i> SET <i>column=value,...</i> [WHERE <i>clause</i>] [LIMIT <i>n</i>]
+ <br>
+ <br>
+ <b>Logical Operators</b>
+ <br>
+ NOT <i>or</i>&nbsp; ! - performs a logical not
+ <br>
+ OR <i>or</i> | | - performs a logical or
+ <br>
+ XOR - performs a logical exclusive or
+ <br>
+ AND <i>or</i> &amp;&amp; - performs a logical and
+ </font>
+ </td>
+ <td width="40%" valign="top">
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ <b>Aggregate Functions</b>
+ <br>
+ AVG(<i>expression</i>)
+ <br>
+ BIT_AND(<i>expression</i>)
+ <br>
+ BIT_OR(<i>expression</i>)
+ <br>
+ COUNT(<i>expression</i>)
+ <br>
+ MAX(<i>expression</i>)
+ <br>
+ MIN(<i>expression</i>)
+ <br>
+ STD(<i>expression</i>)/STDDEV(<i>expression</i>)
+ <br>
+ SUM(<i>expression</i>)
+ <br>
+ <br>
+ <b>General Functions</b>
+ <br>
+ ABS(<i>number</i>)
+ <br>
+ ACOS(<i>number</i>)
+ <br>
+ ADDDATE(<i>date</i>, INTERVAL, <i>amount</i>, <i>type</i>)
+ <br>
+ ASCII(<i>char</i>)
+ <br>
+ ASIN(<i>number</i>)
+ <br>
+ ATAN(<i>number</i>)
+ <br>
+ ATAN2(x, y)
+ <br>
+ BENCHMARK(<i>num</i>, <i>function</i>)
+ <br>
+ BIN((<i>decimal</i>)
+ <br>
+ BIT_COUNT(<i>number</i>)
+ <br>
+ BIT_LENGTH(<i>number</i>)
+ <br>
+ CEILING(<i>number</i>)
+ <br>
+ CHAR_LENGTH(<i>string</i>)
+ <br>
+ COS(<i>radians</i>)
+ <br>
+ COT(<i>radians</i>)
+ <br>
+ CURDATE()
+ <br>
+ CURTIME()
+ <br>
+ DATABASE()
+ <br>
+ DATE_FORMAT(<i>date</i>, <i>format</i>)
+ <br>
+ DAYNAME(<i>date</i>)
+ <br>
+ DAYOFMONTH(<i>date</i>)
+ <br>
+ DAYOFWEEK(<i>date</i>)
+ <br>
+ DAYOFYEAR(<i>date</i>)
+ <br>
+ EXP(<i>power</i>)
+ <br>
+ FLOOR(<i>number</i>)
+ <br>
+ FORMAT(<i>number</i>, <i>decimals</i>)
+ <br>
+ HOUR(<i>time</i>)
+ <br>
+ LENGTH(<i>string</i>)
+ <br>
+ LOG(<i>number</i>)
+ <br>
+ LOWER(<i>number</i>)
+ <br>
+ MD5(<i>string</i>)
+ <br>
+ MINUTE(<i>time</i>)
+ <br>
+ MONTH(<i>date</i>)
+ <br>
+ MONTHNAME(<i>date</i>)
+ <br>
+ NOW()
+ <br>
+ PASSWORD(<i>string</i>)
+ <br>
+ QUARTER(<i>date</i>)
+ <br>
+ REVERSE(<i>string</i>)
+ <br>
+ SECOND(<i>time</i>)
+ <br>
+ SIGN(<i>number</i>)
+ <br>
+ SPACE(<i>number</i>)
+ <br>
+ SQRT(<i>number</i>)
+ <br>
+ UPPER(<i>string</i>)
+ <br>
+ VERSION()
+ <br>
+ WEEK(<i>date</i>)
+ <br>
+ WEEKDAY(<i>date</i>)
+ <br>
+ YEAR(<i>date</i>)
+ </font>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/sample_query.html b/English.lproj/english_help/topics/sample_query.html
new file mode 100755
index 00000000..c77723df
--- /dev/null
+++ b/English.lproj/english_help/topics/sample_query.html
@@ -0,0 +1,81 @@
+<html>
+<head>
+<title>CocoaMySQL Help - SQL Query Examples</title>
+<meta name="AppleTitle" content="SQL Query Examples">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>SQL Query Examples</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+<table border="0" width="95%">
+ <tr>
+ <td>
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ The following queries are only examples and any use of these queries in a company or critical environment
+ signifies the prior knowledge and acceptance, on behalf of the implentor, that the authors of this software are not liable for damages or losses in use of these queries.
+ No guarantees are made as to the quality or reliabity of the queries listed below. They are listed to help database designers/creators in their
+ work by showing an example.
+ </font>
+ </td>
+ </tr>
+</table>
+<br>
+<br>
+<table border="0" cellpadding="5" cellspacing="10" width="100%" align="center">
+ <tr>
+ <td valign="top" bgcolor="#EAEAEA">
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ <b>Example SELECT Query</b>
+ <hr>
+ This obtains information an account table and only returns the accounts with logins of 1 or more,
+ ordered alphabetically by the person's name.
+ <br>
+ <br>
+ <b>SELECT * FROM accounts WHERE LoginCount > 1 ORDER BY Name</b>
+ <br>
+ </font>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" bgcolor="#EAEAEA">
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ <b>Example DELETE Query</b>
+ <hr>
+ This query deletes one row of data from a product table.
+ <br>
+ <br>
+ <b>DELETE FROM products WHERE ProductID=5 LIMIT 1</b>
+ <br>
+ </font>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/sample_tables.html b/English.lproj/english_help/topics/sample_tables.html
new file mode 100755
index 00000000..908f55aa
--- /dev/null
+++ b/English.lproj/english_help/topics/sample_tables.html
@@ -0,0 +1,374 @@
+<html>
+<head>
+<title>CocoaMySQL Help - SQL Table Examples</title>
+<meta name="AppleTitle" content="SQL Table Examples">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>SQL Table Examples</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+<table border="0" width="95%">
+ <tr>
+ <td>
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ The following tables are only examples and any use of these tables in a company or critical environment
+ signifies the prior knowledge and acceptance, on behalf of the implentor, that the authors of this software are not liable for damages or losses in use of these tables.
+ No guarantees are made as to the quality or reliabity of the table designs listed below. They are listed to help database designers/creators in their
+ work by showing an example.
+ <br>
+ The schema used is non-standard. It shows the table name above three columns. The first is the name of the variable, the second
+ is the type of that variable, and the third is the size (if necessary).
+ </font>
+ </td>
+ </tr>
+</table>
+<br>
+<br>
+<table border="0" cellpadding="5" cellspacing="10" width="100%" align="center">
+ <tr>
+ <td width="50%" valign="top" bgcolor="#EAEAEA">
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ <b>Example Accounts Database Table</b>
+ <hr>
+ This table was designed for a custom system needing user accounts where they
+ could have a login and password to a website. It tracks logins, modifications to
+ the data and who created the account. It also allows the account to be locked out.
+ The password should be MD5 encrypted and stored in the database that way.
+ <br>
+ <br>
+ <center>
+ <table width="80%" bgcolor="black" cellspacing="2" border="1" align="center">
+ <tr>
+ <td bgcolor="white" align="center" colspan="3"><font size="-1">
+ tblAccounts
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;AccountID
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ INTEGER
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 11
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Name
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 200
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Login
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 12
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Password
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 32
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Locked
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ TINYINT
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;LoginCount
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ INTEGER
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 11
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;LastLogin
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DATETIME
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Created
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DATETIME
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;CreatedBy
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 200
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Updated
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DATETIME
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;UpdatedBy
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 200
+ </font></td>
+ </tr>
+ </table>
+ </center>
+ <br>
+ * The AccountID is a PRIMARY KEY (also UNIQUE)
+ <br>
+ * The Password is MD5 encrypted, hence the length of 32
+ <br>
+ * The Locked value is either zero (0) or one (1)
+ </font>
+ </td>
+ <td width="50%" valign="top" bgcolor="#EAEAEA">
+ <font face="Lucida Grande,Geneva,Arial" size="-1">
+ <b>Example Products Database Table</b>
+ <hr>
+ This table was designed to store basic production information, possibly in a
+ small business database or online shopping cart. It is highly recommended
+ that this table be customized to your needs.
+ <br>
+ <br>
+ <center>
+ <table width="80%" bgcolor="black" cellspacing="2" border="1" align="center">
+ <tr>
+ <td bgcolor="white" align="center" colspan="3"><font size="-1">
+ tblProducts
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;ProductID
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ INTEGER
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 11
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Name
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 200
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;ShortDescription
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 250
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;LongDescription
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ TEXT
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Price
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DECIMAL(9,2)
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;ImageURL
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 250
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Locked
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ TINYINT
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;ViewCount
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ INTEGER
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 11
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;LastViewed
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DATETIME
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Created
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DATETIME
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;CreatedBy
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 200
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;Updated
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ DATETIME
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ </font></td>
+ </tr>
+ <tr>
+ <td width="50%" bgcolor="white"><font size="-1">
+ &nbsp;UpdatedBy
+ </font></td>
+ <td width="35%" bgcolor="white" align="center"><font size="-1">
+ VARCHAR
+ </font></td>
+ <td width="15%" bgcolor="white" align="center"><font size="-1">
+ 200
+ </font></td>
+ </tr>
+ </table>
+ </center>
+ <br>
+ * The ProductID is a PRIMARY KEY (also UNIQUE)
+ <br>
+ * The ImageURL points to an image of the product
+ <br>
+ * The Locked value is either zero (0) or one (1)
+ </font>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/syntax.html b/English.lproj/english_help/topics/syntax.html
new file mode 100755
index 00000000..0aeb52ac
--- /dev/null
+++ b/English.lproj/english_help/topics/syntax.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Table Syntax Generation</title>
+<meta name="AppleTitle" content="Table Syntax Generation">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Table Syntax Generation</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;If you would like to generate a SQL output of your table's syntax (column types, sizes, keys, table name, etc..) use
+the "Create Table Syntax" icon at the top of the application in the CocoaMySQL Toolbar area. You can then use that text to
+create a copy of the table in another database or it may also serve as a backup of the table's schema. If the "Create Table Syntax" icon is
+not located in your toolbar then right-click
+in the toolbar area and select "Customize Toolbar..." from the menu. You should then see a window
+of icons which you can add to your CocoaMySQL toolbar including the one mentioned above.
+<br>
+<br>
+
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/English.lproj/english_help/topics/tables.html b/English.lproj/english_help/topics/tables.html
new file mode 100755
index 00000000..7b56fc10
--- /dev/null
+++ b/English.lproj/english_help/topics/tables.html
@@ -0,0 +1,89 @@
+<html>
+<head>
+<title>CocoaMySQL Help - Managing Tables</title>
+<meta name="AppleTitle" content="Managing Tables">
+<meta name="AppleFont" content="Lucida Grande">
+<meta ROBOTS="robots" CONTENT="anchors">
+</head>
+<body text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
+
+<font face="Lucida Grande,Geneva,Arial">
+
+<br>
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80">
+ <tr>
+ <td align="left" valign="top" width="70">
+ <img src="cocoamysql_logo.jpg" width="60" height="60" border="0">
+ </td>
+ <td align="left"><h1>Managing Tables</h1>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <img src="bar.gif" width="100%" height="20">
+ </td>
+ </tr>
+</table>
+
+<br>
+<font size="-1">
+&nbsp;<a href="../index.html">Back to the main menu</a>
+<br>
+<br>
+
+&nbsp;In order to perform actions with tables, you must first choose the "Structure" tab.
+<br>
+<br>
+<b>Adding and Editing Fields</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Add fields with the plus-button and drop them with the minus-button.</li>
+ <li>Edit fields by double-click on the value you want to change. To cancel editing hit the esc-key.</li>
+ <li><font color="red">Changes aren't written to the database until you deselect the row!</font></li>
+ <li>You can also drag &amp; drop fields to change their order (if they are not indexed).</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+<br>
+<br>
+<b>Adding, editing, removing and copying tables</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Add or remove tables with the plus- and minus-buttons.</li>
+ <li>If you add a table, CocoaMySQL creates a field called "id" because a table must have at least one column. You can change or delete this field afterwards.</li>
+ <li>Change the name of a table by double-clicking on it. Hit the esc-key to cancel editing.</li>
+ <li>Select a table and hit the copy button under the list of tables to copy it. If you mark "Copy table content", the new table will also contain all entries of the old table.</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+<br>
+<br>
+<b>Adding and editing indexes</b>
+<table border="0" cellpadding="5" cellspacing="0" width="100%">
+ <tr>
+ <td bgcolor="#fff8dc" valign="top">
+ <font size="-1" face="Lucida Grande,Geneva,Arial">
+ <ul>
+ <li>Add indexes with the plus-button and drop them with the minus-button.</li>
+ <li>Select "Key Type", "Key Name" and "Indexed Columns" in the sheet. If you don't specify a key name, the column name is used as name.</li>
+ <li>If you want to make an index of more than one column, enter them in the appropriated field separated by commas (without whitespace after the comma!).</li>
+ </ul>
+ </td>
+ </tr>
+</table>
+
+</font>
+
+</body>
+</html> \ No newline at end of file
diff --git a/Info.plist b/Info.plist
new file mode 100644
index 00000000..54ca1909
--- /dev/null
+++ b/Info.plist
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string></string>
+ <key>CFBundleTypeName</key>
+ <string>DocumentType</string>
+ <key>CFBundleTypeOSTypes</key>
+ <array>
+ <string>????</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>NSDocumentClass</key>
+ <string>TableDocument</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>CocoaMySQL</string>
+ <key>CFBundleGetInfoString</key>
+ <string>CocoaMySQL</string>
+ <key>CFBundleHelpBookFolder</key>
+ <string>english_help</string>
+ <key>CFBundleHelpBookName</key>
+ <string>CocoaMySQL Help</string>
+ <key>CFBundleIconFile</key>
+ <string>appicon.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.textor.CocoaMySQL</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>CocoaMySQL</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.7b4</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>0.7b4</string>
+ <key>NSAppleScriptEnabled</key>
+ <string>YES</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+ <key>NSServices</key>
+ <array>
+ <dict>
+ <key>NSKeyEquivalent</key>
+ <dict>
+ <key>default</key>
+ <string>M</string>
+ </dict>
+ <key>NSMenuItem</key>
+ <dict>
+ <key>default</key>
+ <string>CocoaMySQL/Perform selection as MySQL query</string>
+ </dict>
+ <key>NSMessage</key>
+ <string>doPerformQueryService</string>
+ <key>NSPortName</key>
+ <string>CocoaMySQL</string>
+ <key>NSSendTypes</key>
+ <array>
+ <string>NSStringPboardType</string>
+ </array>
+ </dict>
+ </array>
+</dict>
+</plist>
diff --git a/KeyChain.h b/KeyChain.h
new file mode 100644
index 00000000..938424de
--- /dev/null
+++ b/KeyChain.h
@@ -0,0 +1,37 @@
+//
+// KeyChain.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed Dec 25 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Foundation/Foundation.h>
+#import <Carbon/Carbon.h>
+
+
+@interface KeyChain : NSObject {
+
+}
+
+- (void)addPassword:(NSString *)password forName:(NSString *)name account:(NSString *)account;
+- (NSString *)getPasswordForName:(NSString *)name account:(NSString *)account;
+- (void)deletePasswordForName:(NSString *)name account:(NSString *)account;
+
+@end
diff --git a/KeyChain.m b/KeyChain.m
new file mode 100644
index 00000000..20264411
--- /dev/null
+++ b/KeyChain.m
@@ -0,0 +1,64 @@
+//
+// KeyChain.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed Dec 25 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "KeyChain.h"
+
+
+@implementation KeyChain
+
+- (void)addPassword:(NSString *)password forName:(NSString *)name account:(NSString *)account
+{
+ int code;
+ code = kcaddgenericpassword([name cString], [account cString],
+ [password cStringLength], [password cString], NULL);
+
+ if ( code != 0 )
+ NSLog(@"Error while trying to add password for name: %@ account: %@", name, account);
+}
+
+- (NSString *)getPasswordForName:(NSString *)name account:(NSString *)account
+{
+ int code;
+ UInt32 length;
+ void *p = (void *)malloc(128 * sizeof(char));
+ NSString *password = @"";
+
+ code = kcfindgenericpassword([name cString], [account cString], 128, p, &length, nil);
+
+ if (!code)
+ password = [NSString stringWithCString:(const char*)p length:length];
+ free(p);
+
+ return password;
+}
+
+- (void)deletePasswordForName:(NSString *)name account:(NSString *)account
+{
+ KCItemRef itemref = nil ;
+
+ kcfindgenericpassword([name cString],[account cString],nil,nil,nil,&itemref);
+ KCDeleteItem(itemref);
+}
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPAttribute.h b/MCPKit_bundled.framework/Headers/MCPAttribute.h
new file mode 100644
index 00000000..7044718d
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPAttribute.h
@@ -0,0 +1,104 @@
+//
+// MCPAttribute.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPRelation;
+@class MCPJoin;
+
+
+@interface MCPAttribute : NSObject < NSCoding > {
+@protected
+ MCPClassDescription *classDescription; // ClassDescription of which the attribute is attribute
+ NSString *name; // Name of the attribute (Obj-C side)
+ Class valueClass; // Class used by the attribute (or NULL if the internal type is not an object)
+ NSString *internalType; // Name of the class, or type used for the class definition
+ NSString *externalName; // Name of the corresponding column in the DB
+ NSString *externalType; // Type used to store the attribute (in the DB)
+ unsigned int width; // Width (for storing by the DB)
+ BOOL allowsNull; // Attribute can be null
+ BOOL autoGenerated; // Attribute is auto generated by the DB
+ BOOL isPartOfKey; // Attribute is part of theprimary key of the class description
+ BOOL isPartOfIdentity; // Attribute is part of the idclass description of the class description
+ BOOL hasAccessor; // Does this attribute have an accessor
+ id defaultValue; // Default value of the attribute
+ NSMutableArray *joins; // An array of the joins using this attribute
+// NSMutableArray *relations; // An array of the relations (MCPRelation) that use this attribue as join
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initForClassDescription:(MCPClassDescription *) iClassDescription withName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setValueClass:(Class) iValueClass;
+- (void) setInternalType:(NSString *) iInternalType;
+- (void) setExternalType:(NSString *) iExternalType;
+- (void) setExternalName:(NSString *) iExternalName;
+- (void) setWidth:(unsigned int) iWidth;
+- (void) setAllowsNull:(BOOL) iAllowsNull;
+- (void) setAutoGenerated:(BOOL) iAutoGenerated;
+- (void) setIsPartOfKey:(BOOL) iIsPartOfKey;
+- (void) setIsPartOfIdentity:(BOOL) iIsPartOfIdentity;
+- (void) setHasAccessor:(BOOL) iHasAccessor;
+- (void) setDefaultValue:(id) iDefaultValue;
+- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index;
+- (void) removeObjectFromJoinsAtIndex:(unsigned int) index;
+//- (void) addRelation:(MCPRelation *) iRelation;
+//- (void) removeRelation:(MCPRelation *) iRelation;
+
+#pragma mark Getters
+- (MCPClassDescription *) classDescription;
+- (NSString *) name;
+- (Class) valueClass;
+- (NSString *) valueClassName;
+- (NSString *) internalType;
+- (NSString *) externalName;
+- (NSString *) externalType;
+- (unsigned int) width;
+- (BOOL) allowsNull;
+- (BOOL) autoGenerated;
+- (BOOL) isPartOfKey;
+- (BOOL) isPartOfIdentity;
+- (BOOL) hasAccessor;
+- (id) defaultValue;
+- (unsigned int) countOfJoins;
+- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPClassDescription+MCPEntreprise.h b/MCPKit_bundled.framework/Headers/MCPClassDescription+MCPEntreprise.h
new file mode 100644
index 00000000..a41a4617
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPClassDescription+MCPEntreprise.h
@@ -0,0 +1,42 @@
+//
+// MCPClassDescription+MCPEntreprise.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+#import "MCPClassDescription.h"
+
+@interface MCPClassDescription (MCPEntreprise)
+
+#pragma mark Pseudo getters (for NSClassDescription overload)
+- (NSArray *) attributeKeys;
+- (NSString *) inverseRelationshipKey:(NSString *) relationshipKey;
+- (NSArray *) toManyRelationshipKeys;
+- (NSArray *) toOneRelationshipKeys;
+
+#pragma mark Specifics for MCPObject
+- (NSArray *) primaryKeyAttributes;
+- (NSArray *) identityAttributes;
+- (MCPAttribute *) attributeWithName: (NSString *) iName;
+- (MCPRelation *) relationWithName:(NSString *) iRelationName;
+- (BOOL) singleIntAutoGenKey;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPClassDescription.h b/MCPKit_bundled.framework/Headers/MCPClassDescription.h
new file mode 100644
index 00000000..26ca382e
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPClassDescription.h
@@ -0,0 +1,91 @@
+//
+// MCPClassDescription.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPAttribute;
+@class MCPRelation;
+@class MCPRelation;
+
+@interface MCPClassDescription : NSClassDescription < NSCoding > {
+@protected
+ MCPModel *model; // The model where we stand
+ NSString *name; // Name of the class (can not use className, as it is already used by NSObject).
+ NSString *externalName; // Name of the table for storage
+ NSMutableArray *attributes; // array of the attributes of the class description
+ NSMutableArray *relations; // array of the relations of the class description (both origin and destination)
+ NSMutableArray *incomings; // array if the INCOMMING relation (just to be sure we are able to invalidate those if necessary)
+ Class representedClass; // the class object that the description represents.
+}
+
+#warning hasSingleIntAutoGenKey should be a method returning the obvious (from the name).
+// This correspond to the method singleIntAutoGenKey in the category MCPEntreprise... which name should I change...
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initInModel:(MCPModel *) iModel withName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Making new attributes and relations
+- (MCPAttribute *) addNewAttributeWithName:(NSString *) iName inPosition:(int) index;
+- (MCPRelation *) addNewRelationTo:(MCPClassDescription *) iTo name:(NSString *) iName inPostion:(int) index;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setExternalName:(NSString *) iExternalName;
+- (void) insertObject:(MCPAttribute *) iAttribute inAttributesAtIndex:(unsigned int) index;
+- (void) removeObjectFromAttributesAtIndex:(unsigned int) index;
+- (void) insertObject:(MCPRelation *) iRelation inRelationsAtIndex:(unsigned int) index;
+- (void) removeObjectFromRelationsAtIndex:(unsigned int) index;
+
+#pragma mark Getters
+- (MCPModel *) model;
+- (NSString *) name;
+- (NSString *) externalName;
+- (NSArray *) attributes;
+- (unsigned int) countOfAttributes;
+- (MCPAttribute *) objectInAttributesAtIndex:(unsigned int) index;
+- (unsigned int) indexOfAttribute:(id) iAttribute;
+- (NSArray *) relations;
+- (unsigned int) countOfRelations;
+- (MCPRelation *) objectInRelationsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfRelation:(id) iRelation;
+- (Class) representedClass;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+#pragma mark Output for logging
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+//- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+//- (NSString *) description;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPConnection.h b/MCPKit_bundled.framework/Headers/MCPConnection.h
new file mode 100644
index 00000000..5b2f2eaf
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPConnection.h
@@ -0,0 +1,158 @@
+//
+// MCPConnection.h
+// SMySQL
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPConnection.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+#import <Foundation/Foundation.h>
+#import "mysql.h"
+#import "MCPConstants.h"
+
+
+@class MCPResult;
+
+// Deafult connection option
+extern const unsigned int kMCPConnectionDefaultOption;
+
+// Default socket (from the mysql.h used at compile time)
+extern const char *kMCPConnectionDefaultSocket;
+
+// Added to mysql error code
+extern const unsigned int kMCPConnectionNotInited;
+
+// The length of the truncation if required:
+extern const unsigned int kLengthOfTruncationForLog;
+
+@interface MCPConnection : NSObject {
+@protected
+ MYSQL *mConnection; /*"The inited MySQL connection."*/
+ BOOL mConnected; /*"Reflect the fact that the connection is already in place or not."*/
+ NSStringEncoding mEncoding; /*"The encoding used by MySQL server, to ISO-1 default."*/
+ NSTimeZone *mTimeZone; /*"The time zone of the session."*/
+ unsigned int mConnectionFlags; /*"The flags to be used for the connection to the database."*/
+}
+/*"
+Getting default of MySQL
+"*/
++ (NSDictionary *) getMySQLLocales;
++ (NSStringEncoding) encodingForMySQLEncoding:(const char *) mysqlEncoding;
++ (NSStringEncoding) defaultMySQLEncoding;
+
+/*"
+Class maintenance
+"*/
++ (void) initialize;
++ (void) setLogQueries:(BOOL) iLogFlag;
++ (void) setTruncateLongFieldInLogs:(BOOL) iTruncFlag;
++ (BOOL) truncateLongField;
+
+/*"
+Initialisation
+"*/
+- (id) init;
+// Port to 0 to use the default port
+- (id) initToHost:(NSString *) host withLogin:(NSString *) login password:(NSString *) pass usingPort:(int) port;
+- (id) initToSocket:(NSString *) socket withLogin:(NSString *) login password:(NSString *) pass;
+
+- (BOOL) setConnectionOption:(int) option toValue:(BOOL) value;
+// Port to 0 to use the default port
+- (BOOL) connectWithLogin:(NSString *) login password:(NSString *) pass host:(NSString *) host port:(int) port socket:(NSString *) socket;
+
+- (BOOL) selectDB:(NSString *) dbName;
+
+/*"
+Errors information
+"*/
+
+- (NSString *) getLastErrorMessage;
+- (unsigned int) getLastErrorID;
+- (BOOL) isConnected;
+- (BOOL) checkConnection;
+
+/*"
+Queries
+"*/
+
+- (NSString *) prepareBinaryData:(NSData *) theData;
+- (NSString *) prepareString:(NSString *) theString;
+- (NSString *) quoteObject:(id) theObject;
+
+- (MCPResult *) queryString:(NSString *) query;
+
+- (my_ulonglong) affectedRows;
+- (my_ulonglong) insertId;
+
+
+/*"
+Getting description of the database structure
+"*/
+- (MCPResult *) listDBs;
+- (MCPResult *) listDBsLike:(NSString *) dbsName;
+- (MCPResult *) listTables;
+- (MCPResult *) listTablesLike:(NSString *) tablesName;
+// Next method uses SHOW TABLES FROM db to be sure that the db is not changed during this call.
+- (MCPResult *) listTablesFromDB:(NSString *) dbName like:(NSString *) tablesName;
+- (MCPResult *) listFieldsFromTable:(NSString *) tableName;
+- (MCPResult *) listFieldsFromTable:(NSString *) tableName like:(NSString *) fieldsName;
+
+
+/*"
+Server information and control
+"*/
+
+- (NSString *) clientInfo;
+- (NSString *) hostInfo;
+- (NSString *) serverInfo;
+- (NSNumber *) protoInfo;
+- (MCPResult *) listProcesses;
+- (BOOL) killProcess:(unsigned long) pid;
+
+//- (BOOL)createDBWithName:(NSString *)dbName;
+//- (BOOL)dropDBWithName:(NSString *)dbName;
+
+/*"
+Disconnection
+"*/
+- (void) disconnect;
+- (void) dealloc;
+
+/*"
+String encoding concerns (C string type to NSString).
+It's unlikely that users of the framework needs to use these methods which are used internally
+"*/
+- (void) setEncoding:(NSStringEncoding) theEncoding;
+- (NSStringEncoding) encoding;
+
+- (const char *) cStringFromString:(NSString *) theString;
+- (NSString *) stringWithCString:(const char *) theCString;
+
+/*"
+Text data convertion to string
+"*/
+- (NSString *) stringWithText:(NSData *) theTextData;
+
+/*" Time Zone handling ."*/
+- (void) setTimeZone:(NSTimeZone *) iTimeZone;
+- (NSTimeZone *) timeZone;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPConnectionWinCont.h b/MCPKit_bundled.framework/Headers/MCPConnectionWinCont.h
new file mode 100644
index 00000000..98195e9f
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPConnectionWinCont.h
@@ -0,0 +1,52 @@
+//
+// MCPConnectionWinCont.h
+// Vacations
+//
+// Created by Serge Cohen on Mon May 26 2003.
+// Copyright (c) 2003 ARP/wARP. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+// External classes, forward reference.
+@class MCPDocument;
+
+
+@interface MCPConnectionWinCont : NSWindowController
+{
+ IBOutlet NSTextField *mHostField;
+ IBOutlet NSTextField *mLoginField;
+ IBOutlet NSTextField *mDatabaseField;
+ IBOutlet NSTextField *mPortField;
+
+ IBOutlet NSPanel *mPasswordSheet;
+ IBOutlet NSTextField *mPasswordField;
+
+ IBOutlet NSButton *mCreateButton;
+// MCPDocument *mMCPDocument;
+}
+
+
+/*" Actions for Interface Builder "*/
+/*" For the clear text information. "*/
+- (IBAction) doGo:(id) sender;
+- (IBAction) doCancel:(id) sender;
+- (IBAction) doCreate:(id) sender;
+- (IBAction) modifyInstance:(id) sender;
+
+
+/*" For the password. "*/
+- (IBAction) passwordClick:(id) sender;
+- (IBAction) askPassword:(id) sender;
+- (NSString *) Password;
+
+
+/*" Overrides of NSWindowController method, to adapt to this Window Controller. "*/
+- (id) init;
+- (void) dealloc;
+- (void) windowDidLoad;
+
+/*" Getting the button for creating a DB. "*/
+- (NSButton*) getCreateButton;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPConstants.h b/MCPKit_bundled.framework/Headers/MCPConstants.h
new file mode 100644
index 00000000..cccdfe8c
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPConstants.h
@@ -0,0 +1,33 @@
+//
+// MCPConstants.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPConstants.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+typedef enum {
+ MCPTypeArray = 1,
+ MCPTypeDictionary = 2,
+ MCPTypeFlippedArray = 3,
+ MCPTypeFlippedDictionary = 4
+} MCPReturnType;
+
diff --git a/MCPKit_bundled.framework/Headers/MCPDocument.h b/MCPKit_bundled.framework/Headers/MCPDocument.h
new file mode 100644
index 00000000..28f375da
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPDocument.h
@@ -0,0 +1,95 @@
+//
+// MCPDocument.h
+// Vacations
+//
+// Created by Serge Cohen on Sat May 24 2003.
+// Copyright (c) 2003 ARP/wARP. All rights reserved.
+//
+
+
+#import <Cocoa/Cocoa.h>
+
+// External classes, forward reference.
+@class MCPConnection;
+@class MCPResult;
+
+
+@interface MCPDocument : NSDocument
+{
+ BOOL MCPConInfoNeeded, MCPPassNeeded;
+ NSString *MCPHost, *MCPLogin, *MCPDatabase;
+ unsigned int MCPPort;
+ MCPConnection *MCPConnect;
+
+// Handling of windows.
+ NSWindowController *MCPMainWinCont;
+ Class MCPConnectedWinCont; /*" Window controller used once the connection is established (As a class). "*/
+// Handling the DB creation state.
+ NSString *MCPModelName;
+ BOOL MCPWillCreateNewDB;
+}
+
+/*" Class Maintenance "*/
++ (void) initialize;
+
+// Standards
+/*" Initialisation and deallocation "*/
+- (id) init;
+- (void) dealloc;
+
+/*" Connection to the databse related "*/
+- (MCPResult *) MCPqueryString:(NSString *) query;
+- (unsigned int) MCPinsertRow:(NSString *) insert;
+- (MCPConnection *) MCPgetConnection;
+
+// Accessors
+/*" Accessors to the parameters of the connection "*/
+- (void) setMCPHost:(NSString *) theHost;
+- (void) setMCPLogin:(NSString *) theLogin;
+- (void) setMCPDatabase:(NSString *) theDatabase;
+- (void) setMCPPort:(unsigned int) thePort;
+- (void) setMCPConInfoNeeded:(BOOL) theConInfoNeeded;
+
+- (NSString *) MCPHost;
+- (NSString *) MCPLogin;
+- (NSString *) MCPDatabase;
+- (unsigned int) MCPPort;
+- (BOOL) MCPConInfoNeeded;
+- (BOOL) MCPPassNeeded;
+
+- (BOOL) MCPisConnected;
+- (MCPConnection *) MCPConnect;
+
+/*" Accessor to the window generated once the connection is established "*/
+- (void) setMCPConnectedWinCont:(Class) theConnectedWinCont;
+
+- (Class) MCPConnectedWinCont;
+
+/*" Accessors to the main window (connection or connected window), through their window controller. "*/
+- (NSWindowController *) MCPMainWinCont;
+
+/*" Accessors to the DB creation instances. "*/
+- (void) setMCPModelName:(NSString *) theModelName;
+- (void) setMCPWillCreateNewDB:(BOOL) theWillCreateNewDB;
+
+- (NSString *) MCPModelName;
+- (BOOL) MCPWillCreateNewDB;
+
+/*" Practical creation of the database, from a model file. "*/
+- (BOOL) createModelDB;
+
+/*" Overrides of NSDocument methods. "*/
+// Managing the document in file format
+- (NSData *) dataRepresentationOfType:(NSString *) aType;
+- (BOOL)loadDataRepresentation:(NSData *) data ofType:(NSString *)aType;
+
+// Managing NSWindowController(s)
+- (NSArray *) makeWindowControllers;
+- (void) windowControllerDidLoadNib:(NSWindowController *) aController;
+
+/*" Method to take care of the password sheet. "*/
+// Callback from sheet
+- (void) MCPPasswordSheetDidEnd:(NSWindow *) sheet returnCode:(int) returnCode contextInfo:(void *) contextInfo;
+
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPEntrepriseNotifications.h b/MCPKit_bundled.framework/Headers/MCPEntrepriseNotifications.h
new file mode 100644
index 00000000..824051e6
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPEntrepriseNotifications.h
@@ -0,0 +1,35 @@
+//
+// MCPEntrepriseNotifications.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+// The instance are defined in MMDocument.h
+
+#pragma mark Name for notification
+
+extern NSString *MCPModelChangedNotification;
+extern NSString *MCPClassDescriptionChangedNotification;
+extern NSString *MCPAttributeChangedNotification;
+extern NSString *MCPRelationChangedNotification;
+
diff --git a/MCPKit_bundled.framework/Headers/MCPFastQueries.h b/MCPKit_bundled.framework/Headers/MCPFastQueries.h
new file mode 100644
index 00000000..cea22a11
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPFastQueries.h
@@ -0,0 +1,47 @@
+//
+// MCPFastQueries.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPFastQueries.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+#import "MCPConnection.h"
+
+@interface MCPConnection (MCPFastQueries)
+/*"
+For insert queries, get directly the Id of the newly inserted row
+"*/
+- (my_ulonglong) insertQuery:(NSString *) aQuery;
+- (my_ulonglong) updateQuery:(NSString *) aQuery;
+
+
+/*"
+Returns directly a proper NS object, or a collection (NSArray, NSDictionary...).
+"*/
+- (id) getFirstFieldFromQuery:(NSString *) aQuery;
+- (id) getFirstRowFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType;
+- (id) getAllRowsFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType;
+- (NSArray *) getQuery:(NSString *) aQuery colWithIndex:(unsigned int) aCol;
+- (NSArray *) getQuery:(NSString *) aQuery colWithName:(NSString *) aColName;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPJoin.h b/MCPKit_bundled.framework/Headers/MCPJoin.h
new file mode 100644
index 00000000..4784a30b
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPJoin.h
@@ -0,0 +1,68 @@
+//
+// MCPJoin.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 18/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPAttribute;
+@class MCPRelation;
+@class MCPRelation;
+
+@interface MCPJoin : NSObject < NSCoding > {
+@protected
+// Note that NONE of these attributes are retained!!!
+// Instead all these objects are notified of the existence of the join
+// and are responsible to invalidate/delete it if necessary.
+ MCPRelation *relation;
+ MCPAttribute *origin;
+ MCPAttribute *destination;
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initForRelation:(MCPRelation *) iRelation from:(MCPAttribute *) iOrigin to:(MCPAttribute *) iDestination;
+- (void) invalidate;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Setters
+// No setter for relation : should be set at init time!
+- (void) setOrigin:(MCPAttribute *) iOrigin;
+- (void) setDestination:(MCPAttribute *) iDestination;
+
+#pragma mark Getters
+- (MCPRelation *) relation;
+- (MCPAttribute *) origin;
+- (MCPAttribute *) destination;
+- (unsigned int) index;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPKit_bundled.h b/MCPKit_bundled.framework/Headers/MCPKit_bundled.h
new file mode 100644
index 00000000..3242a9dd
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPKit_bundled.h
@@ -0,0 +1,38 @@
+/*
+ * MCPKit_bundled.h
+ * MCPKit
+ *
+ * Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+ * Copyright (c) 2001 Serge Cohen.
+ *
+ * This code 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 any later version.
+ *
+ * This code 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.
+ *
+ * For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+ * write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * More info at <http://mysql-cocoa.sourceforge.net/>
+ *
+ *
+ * $Id: MCPKit_bundled.h 335 2006-01-08 21:14:07Z serge $
+ * $Author: serge $
+ */
+
+#import <Foundation/Foundation.h>
+
+#import <MCPKit_bundled/MCPConstants.h>
+#import <MCPKit_bundled/MCPNull.h>
+#import <MCPKit_bundled/MCPResult.h>
+#import <MCPKit_bundled/MCPConnection.h>
+#import <MCPKit_bundled/MCPNumber.h>
+#import <MCPKit_bundled/MCPResultPlus.h>
+#import <MCPKit_bundled/MCPFastQueries.h>
+#import "mysql.h"
+//#import <SMySQL/mysql.h>
diff --git a/MCPKit_bundled.framework/Headers/MCPModel+MCPEntreprise.h b/MCPKit_bundled.framework/Headers/MCPModel+MCPEntreprise.h
new file mode 100644
index 00000000..069c9862
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPModel+MCPEntreprise.h
@@ -0,0 +1,32 @@
+//
+// MCPModel+MCPEntreprise.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPModel.h"
+
+@interface MCPModel (MCPEntreprise)
+
+#pragma mark Work as a class description server
+- (void) registerAsClassDescriptionServer;
+- (void) registerDescriptionForClass:(NSNotification *) notification;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPModel.h b/MCPKit_bundled.framework/Headers/MCPModel.h
new file mode 100644
index 00000000..362fed72
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPModel.h
@@ -0,0 +1,78 @@
+//
+// MCPModel.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+
+@class MCPClassDescription;
+@class MCPAttribute;
+@class MCPRelation;
+
+@interface MCPModel : NSObject < NSCoding > {
+@protected
+ NSString *name; // Name of the model ... useless.
+ NSMutableArray *classDescriptions; // Order of the class descriptions in the model.
+ BOOL usesInnoDBTables; // The database should use InnoDB tables.
+// Might add a string holding définition of tables.
+// Might also add some sort of template for generated files (at least the header).
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initWithName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Making new class description
+- (MCPClassDescription *) addNewClassDescriptionWithName:(NSString *) iName inPosition:(int) index;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setClassDescriptions:(NSArray *) iClassDescriptions;
+- (void) insertObject:(MCPClassDescription *) iClassDescription inClassDescriptionsAtIndex:(unsigned int) index;
+- (void) removeObjectFromClassDescriptionsAtIndex:(unsigned int) index;
+- (void) setUsesInnoDBTables:(BOOL) iUsesInnoDB;
+
+// Deprecated : non KVC
+//- (void) removeClassDescription:(MCPClassDescription *) iClassDescription;
+//- (void) addClassDescription:(MCPClassDescription *) iClassDescription;
+
+#pragma mark Getters
+- (NSString *) name;
+- (NSArray *) classDescriptions;
+- (unsigned int) countOfClassDescriptions;
+- (MCPClassDescription *) objectInClassDescriptionsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfClassDescription:(id) iClassDescription;
+- (BOOL) usesInnoDBTables;
+
+// Deprecated : non KVC
+//- (MCPClassDescription *) classDescriptionWithClassName:(NSString *) iClassDescriptionClassName;
+
+#pragma mark Output for logging
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPNull.h b/MCPKit_bundled.framework/Headers/MCPNull.h
new file mode 100644
index 00000000..1fa0babd
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPNull.h
@@ -0,0 +1,36 @@
+//
+// MCPNull.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Sun Jun 02 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPNull.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+
+@interface NSObject (MCPNSNullTest)
+
+/*"
+Addin to NSObject.
+"*/
+- (BOOL) isNSNull;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPNumber.h b/MCPKit_bundled.framework/Headers/MCPNumber.h
new file mode 100644
index 00000000..f4851e2a
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPNumber.h
@@ -0,0 +1,84 @@
+//
+// MCPNumber.h
+// NumberTest
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPNumber.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+
+@interface MCPNumber : NSNumber {
+ const char *typeCode;
+ NSNumber *number;
+}
+
+- (id) initWithChar:(char) value;
+- (id) initWithUnsignedChar:(unsigned char) value;
+- (id) initWithShort:(short) value;
+- (id) initWithUnsignedShort:(unsigned short) value;
+- (id) initWithInt:(int) value;
+- (id) initWithUnsignedInt:(unsigned int) value;
+- (id) initWithLong:(long) value;
+- (id) initWithUnsignedLong:(unsigned long) value;
+- (id) initWithLongLong:(long long) value;
+- (id) initWithUnsignedLongLong:(unsigned long long) value;
+- (id) initWithFloat:(float) value;
+- (id) initWithDouble:(double) value;
+- (id) initWithBool:(BOOL) value;
+
++ (MCPNumber *) numberWithChar:(char) value;
++ (MCPNumber *) numberWithUnsignedChar:(unsigned char) value;
++ (MCPNumber *) numberWithShort:(short) value;
++ (MCPNumber *) numberWithUnsignedShort:(unsigned short) value;
++ (MCPNumber *) numberWithInt:(int) value;
++ (MCPNumber *) numberWithUnsignedInt:(unsigned int) value;
++ (MCPNumber *) numberWithLong:(long) value;
++ (MCPNumber *) numberWithUnsignedLong:(unsigned long) value;
++ (MCPNumber *) numberWithLongLong:(long long) value;
++ (MCPNumber *) numberWithUnsignedLongLong:(unsigned long long) value;
++ (MCPNumber *) numberWithFloat:(float) value;
++ (MCPNumber *) numberWithDouble:(double) value;
++ (MCPNumber *) numberWithBool:(BOOL) value;
+
+- (void) dealloc;
+
+/*" Most important : NSNumber primitive methods: "*/
+- (const char *) objCType;
+- (void) getValue:(void *) buffer;
+
+//- (NSString *) descriptionWithLocale:(NSDictionary *) aLocale; // Not Primitive, but buggy...
+
+- (char) charValue;
+- (unsigned char) unsignedCharValue;
+- (short) shortValue;
+- (unsigned short) unsignedShortValue;
+- (int) intValue;
+- (unsigned int) unsignedIntValue;
+- (long) longValue;
+- (unsigned long) unsignedLongValue;
+- (long long) longLongValue;
+- (unsigned long long) unsignedLongLongValue;
+- (float) floatValue;
+- (double) doubleValue;
+- (BOOL) boolValue;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPObject.h b/MCPKit_bundled.framework/Headers/MCPObject.h
new file mode 100644
index 00000000..2496180a
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPObject.h
@@ -0,0 +1,106 @@
+//
+// MCPObject.h
+// MCPKit
+//
+// Created by Serge Cohen on Wed May 19 2004.
+// Copyright (c) 2004 Serge Cohen. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+/*" Possible return code on some operations of the database interaction. "*/
+typedef enum {
+ MCPDBReturnUnknown = 0, /*"Unknown state, should not happen."*/
+ MCPDBReturnDeleted = 1, /*"The entry have been successfuly deleted from DB."*/
+ MCPDBReturnUsed = 2, /*"The entry can not be removed, because some entries are still connected to it (some delete restrict/inhibit delete)."*/
+ MCPDBReturnNone = 3, /*"No entry exist with this Id."*/
+ MCPDBReturnNew = 4, /*"The entry was indeed new and inserted in the database."*/
+ MCPDBReturnUpdated = 5, /*"The entry was updated in the DB."*/
+ MCPDBReturnIncompleteKey = 6, /*"Part of the primary key is missing, action not taken."*/
+ MCPDBReturnMultiple = 7, /*"Multiple rows are found with a query supposed to return at most one row."*/
+ MCPDBReturnNoIdentity = 8, /*"The object does not have attributes that defines identity."*/
+ MCPDBReturnNoKey = 9, /*"There is no primary key defined for this entity."*/
+ MCPDBReturnNoConnection = 10, /*"The MCPObject is not having a connection."*/
+ MCPDBReturnWrongRelationOrigin = 11, /*"Looking for a relation not which origin is not of the specified class."*/
+ MCPDBReturnWrongRelationCardinality = 12, /*"Using a method assuming a cardinality of the relation while the relation as the other one."*/
+ MCPDBReturnNoSuchRelation = 13, /*"There is no relation with such a name starting from this class."*/
+ MCPDBReturnNotTarget = 14, /*"Tried to remove an object from a relation, while the objects does NOT belong to the relation."*/
+ MCPDBReturnOK = 100 /*"Everything went OK."*/
+} MCPDBReturnCode;
+
+@class MCPConnection;
+@class MCPClassDescription;
+@class MCPRelation;
+
+@interface MCPObject : NSObject {
+ MCPClassDescription *classDescription;
+ MCPConnection *connection;
+}
+
+#pragma mark Life of the Object
+/*" Life of the object "*/
+- (id) init;
+- (id) initWithDictionary:(NSDictionary *) dictionary;
+
+- (void) dealloc;
+
+- (void) setAttributesToDefault;
+
+#pragma mark Accessors
+/*" Accessor(s) "*/
+- (MCPClassDescription *) classDescription;
+- (MCPConnection *) connection;
+
+- (void) setConnection:(MCPConnection *) iConnection;
+
+#pragma mark Database interface
+/*" Database interface "*/
+- (id) readFromDBRow:(NSDictionary *) iDictionary withTableName:(NSString *) iTableName;
+- (MCPDBReturnCode) setPrimaryKey:(id) iDictionary andFetchFromDB:(MCPConnection *) iConnection;
+//- (MCPDBReturnCode) setPrimaryKey:(NSDictionary *) iDictionary andFetchFromDB:(MCPConnection *) iConnection;
+- (NSDictionary *) checkDBId; // the returned dictionary contains a MCPDBReturnCode key with the return code.
+- (NSDictionary *) saveInDB; // the returned dictionary contains a MCPDBReturnCode key with the return code.
+- (MCPDBReturnCode) getAutoGenerated;
+- (MCPDBReturnCode) updateInDB;
+- (MCPDBReturnCode) deleteInDB;
++ (MCPDBReturnCode) deleteInDBUsingConnection:(MCPConnection *) iConnection withId:(id) iId;
+
+#pragma mark Handling relations
+/*" Handling realtions "*/
+- (id) getTargetOfRelation:(MCPRelation *) iRelation;
+- (id) getTargetOfRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) setTarget:(id) iTarget forRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) setTarget:(id) iTarget forRelationNamed:(NSString *) iRelationName;
+- (unsigned int) countTargetForRelation:(MCPRelation *) iRelation;
+- (unsigned int) countTargetForRelationNamed:(NSString *) iRelationName;
+- (MCPObject *) getTargetOfRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex;
+- (MCPObject *) getTargetOfRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex;
+- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) removeTargetToRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex;
+- (MCPDBReturnCode) removeTargetToRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex;
+- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelation:(MCPRelation *) iRelation;
+- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelationNamed:(NSString *) iRelationName;
+
+#pragma mark Utilities
+/*" Utility methods "*/
+- (id) defaultValueForKey:(NSString *) iKey;
+- (NSDictionary *) primaryKey;
+
+/*" Testing equality (VERY important for relation management)"*/
+- (BOOL) isEqual:(id) iObject;
+
+#pragma mark Output
+/*" Output : "*/
+- (NSString *) description;
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+#pragma mark Ordering the array for relations
+- (NSString *) orderSQLForClassDescription:(MCPClassDescription *) iClassDescription;
+
+/*" Anti-crash method... "*/
+- (void) setNilValueForKey:(NSString *) iKey;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPRelation.h b/MCPKit_bundled.framework/Headers/MCPRelation.h
new file mode 100644
index 00000000..fa359e2e
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPRelation.h
@@ -0,0 +1,109 @@
+//
+// MCPRelation.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPAttribute;
+
+@class MCPJoin;
+
+typedef enum {
+ OnDeleteNullify = 1,
+ OnDeleteDeny = 2,
+ OnDeleteCascade = 3,
+ OnDeleteDefault = 4,
+ OnDeleteNoAction = 5
+} MCPRelationDeleteRule;
+
+
+@interface MCPRelation : NSObject < NSCoding > {
+@protected
+ NSString *name; // Name of the relation
+ MCPRelationDeleteRule deleteRule; // Delete rule : what to do of the destination when origin is deleted
+ MCPRelation *inverseRelation; // The inverse relation (or nil if no inverse present)
+ MCPClassDescription *origin; // The class description from which the relation originate
+ MCPClassDescription *destination; // The class description to which the relation arrives
+ NSMutableArray *joins; // Joining attributes (array of MCPJoin)
+ BOOL isToMany; // Is the relation to many (or to one)
+ BOOL isMandatory; // Is the relation mandatory for the class description (origin)
+ BOOL ownsDestination; // The origin class description owns the destination class description(ies)
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
++ (NSArray *) existingDeleteRules;
+- (NSArray *) existingDeleteRules;
+
+#pragma mark Life cycle
+- (id) initWithName:(NSString *) iName from:(MCPClassDescription *) iFrom to:(MCPClassDescription *) iTo;
+- (void) invalidateRelation;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Managing joins
+//- (MCPJoin *) addNewJoin;
+- (MCPJoin *) addJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo;
+- (void) removeJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo;
+//- (void) unjoinAttribute:(MCPAttribute *) iAttribute;
+
+#pragma mark Setters
+- (void) setDestination:(MCPClassDescription *) iDestination;
+- (void) setName:(NSString *) iName;
+- (void) setDeleteRule:(MCPRelationDeleteRule) iDeleteRule;
+- (void) setInverseRelation:(MCPRelation *) iInverseRelation;
+- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index;
+- (void) removeObjectFromJoinsAtIndex:(unsigned int) index;
+- (void) setIsToMany:(BOOL) iIsToMany;
+- (void) setIsMandatory:(BOOL) iIsMandatory;
+- (void) setOwnsDestintation:(BOOL) iOwnsDestination;
+
+#pragma mark Getters
+- (NSString *) name;
+- (MCPRelationDeleteRule) deleteRule;
+- (MCPRelation *) inverseRelation;
+- (MCPClassDescription *) origin;
+- (MCPClassDescription *) destination;
+- (NSArray *) joins;
+- (unsigned int) countOfJoins;
+- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin;
+- (BOOL) isToMany;
+- (BOOL) isMandatory;
+- (BOOL) ownsDestination;
+
+#pragma mark Some Usefull methods
+- (MCPAttribute *) destinationAttributeForOrigin:(MCPAttribute *) iFrom;
+- (MCPAttribute *) originAttributeForDestination:(MCPAttribute *) iTo;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPResult.h b/MCPKit_bundled.framework/Headers/MCPResult.h
new file mode 100644
index 00000000..91b69fb5
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPResult.h
@@ -0,0 +1,110 @@
+//
+// MCPResult.h
+// SMySQL
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPResult.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+#import <Foundation/Foundation.h>
+#import "mysql.h"
+#import "MCPConstants.h"
+
+
+@interface MCPResult : NSObject {
+@protected
+ MYSQL_RES *mResult; /*" The MYSQL_RES structure of the C API. "*/
+ NSArray *mNames; /*" An NSArray holding the name of the columns. "*/
+ NSDictionary *mMySQLLocales; /*" A Locales dictionary to define the locales of MySQL. "*/
+ NSStringEncoding mEncoding; /*" The encoding used by MySQL server, to ISO-1 default. "*/
+ unsigned int mNumOfFields; /*" The number of fields in the result. "*/
+ NSTimeZone *mTimeZone; /*" The time zone of the connection when the query was made. "*/
+}
+/*"
+Class maintenance
+ "*/
+
++ (void) initialize;
+
+ /*"
+ Init used #{only} by #{MCPConnection}
+ "*/
+
+- (id) initWithMySQLPtr:(MYSQL *) mySQLPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone;
+- (id) initWithResPtr:(MYSQL_RES *) mySQLResPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone;
+- (id) init;
+
+ /*"
+ General info on the result
+ "*/
+
+- (my_ulonglong) numOfRows;
+- (unsigned int) numOfFields;
+
+ /*"
+ Getting the rows
+ "*/
+
+- (void) dataSeek:(my_ulonglong) row;
+
+- (id) fetchRowAsType:(MCPReturnType) aType;
+- (NSArray *) fetchRowAsArray;
+- (NSDictionary *) fetchRowAsDictionary;
+
+ /*"
+ Getting information on columns
+ "*/
+
+- (NSArray *) fetchFieldNames;
+
+- (id) fetchTypesAsType:(MCPReturnType) aType;
+- (NSArray *) fetchTypesAsArray;
+- (NSDictionary *) fetchTypesAsDictionary;
+
+- (unsigned int) fetchFlagsAtIndex:(unsigned int) index;
+- (unsigned int) fetchFlagsForKey:(NSString *) key;
+
+- (BOOL) isBlobAtIndex:(unsigned int) index;
+- (BOOL) isBlobForKey:(NSString *) key;
+
+ /*"
+ Text data convertion to string
+ "*/
+- (NSString *) stringWithText:(NSData *) theTextData;
+
+ /*"
+ Utility method
+ "*/
+- (NSString *) description;
+
+ /*"
+ End of the scope...
+ "*/
+
+- (void) dealloc;
+
+ /*"
+ Private methods, internal use only
+ "*/
+- (const char *) cStringFromString:(NSString *) theString;
+- (NSString *) stringWithCString:(const char *) theCString;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/MCPResultPlus.h b/MCPKit_bundled.framework/Headers/MCPResultPlus.h
new file mode 100644
index 00000000..28d6ff2f
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/MCPResultPlus.h
@@ -0,0 +1,43 @@
+//
+// MCPResultPlus.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPResultPlus.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+#import "MCPResult.h"
+
+@interface MCPResult (MCPResultPlus)
+
+/*"
+Getting a complete column as an array
+"*/
+- (NSArray *) fetchColAtIndex:(unsigned int) aCol;
+- (NSArray *) fetchColWithName:(NSString *) aColName;
+
+/*"
+Getting the complete result as 2D array
+"*/
+- (id) fetch2DResultAsType:(MCPReturnType) aType;
+
+@end
diff --git a/MCPKit_bundled.framework/Headers/my_alloc.h b/MCPKit_bundled.framework/Headers/my_alloc.h
new file mode 100644
index 00000000..a3dd35d7
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/my_alloc.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typedef struct st_mem_root
+{
+ USED_MEM *free; /* blocks with free memory in it */
+ USED_MEM *used; /* blocks almost without free memory */
+ USED_MEM *pre_alloc; /* preallocated block */
+ /* if block have less memory it will be put in 'used' list */
+ unsigned int min_malloc;
+ unsigned int block_size; /* initial block size */
+ unsigned int block_num; /* allocated blocks counter */
+ /*
+ first free block in queue test counter (if it exceed
+ MAX_BLOCK_USAGE_BEFORE_DROP block will be droped in 'used' list)
+ */
+ unsigned int first_block_usage;
+
+ void (*error_handler)(void);
+} MEM_ROOT;
+#endif
diff --git a/MCPKit_bundled.framework/Headers/my_list.h b/MCPKit_bundled.framework/Headers/my_list.h
new file mode 100644
index 00000000..f786621e
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/my_list.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+#ifndef _list_h_
+#define _list_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_list {
+ struct st_list *prev,*next;
+ void *data;
+} LIST;
+
+typedef int (*list_walk_action)(void *,void *);
+
+extern LIST *list_add(LIST *root,LIST *element);
+extern LIST *list_delete(LIST *root,LIST *element);
+extern LIST *list_cons(void *data,LIST *root);
+extern LIST *list_reverse(LIST *root);
+extern void list_free(LIST *root,unsigned int free_data);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,gptr argument);
+
+#define rest(a) ((a)->next)
+#define list_push(a,b) (a)=list_cons((b),(a))
+#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/MCPKit_bundled.framework/Headers/mysql.h b/MCPKit_bundled.framework/Headers/mysql.h
new file mode 100644
index 00000000..d8a56126
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/mysql.h
@@ -0,0 +1,738 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ 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 */
+
+#ifndef _mysql_h
+#define _mysql_h
+
+#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
+#undef WIN
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _global_h /* If not standard header */
+#include <sys/types.h>
+#ifdef __LCC__
+#include <winsock.h> /* For windows */
+#endif
+typedef char my_bool;
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
+#define __WIN__
+#endif
+#if !defined(__WIN__)
+#define STDCALL
+#else
+#define STDCALL __stdcall
+#endif
+typedef char * gptr;
+
+#ifndef my_socket_defined
+#ifdef __WIN__
+#define my_socket SOCKET
+#else
+typedef int my_socket;
+#endif /* __WIN__ */
+#endif /* my_socket_defined */
+#endif /* _global_h */
+
+#include "mysql_com.h"
+#include "mysql_time.h"
+#include "mysql_version.h"
+#include "typelib.h"
+
+#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
+
+extern unsigned int mysql_port;
+extern char *mysql_unix_port;
+
+#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
+#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
+
+#ifdef __NETWARE__
+#pragma pack(push, 8) /* 8 byte alignment */
+#endif
+
+#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
+#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
+#define IS_BLOB(n) ((n) & BLOB_FLAG)
+#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
+#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
+#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
+
+
+typedef struct st_mysql_field {
+ char *name; /* Name of column */
+ char *org_name; /* Original column name, if an alias */
+ char *table; /* Table of column if column was a field */
+ char *org_table; /* Org table name, if table was an alias */
+ char *db; /* Database for table */
+ char *catalog; /* Catalog for table */
+ char *def; /* Default value (set by mysql_list_fields) */
+ unsigned long length; /* Width of column (create length) */
+ unsigned long max_length; /* Max width for selected set */
+ unsigned int name_length;
+ unsigned int org_name_length;
+ unsigned int table_length;
+ unsigned int org_table_length;
+ unsigned int db_length;
+ unsigned int catalog_length;
+ unsigned int def_length;
+ unsigned int flags; /* Div flags */
+ unsigned int decimals; /* Number of decimals in field */
+ unsigned int charsetnr; /* Character set */
+ enum enum_field_types type; /* Type of field. See mysql_com.h for types */
+} MYSQL_FIELD;
+
+typedef char **MYSQL_ROW; /* return data as array of strings */
+typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
+
+#ifndef _global_h
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+#endif
+
+#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
+
+typedef struct st_mysql_rows {
+ struct st_mysql_rows *next; /* list of rows */
+ MYSQL_ROW data;
+ unsigned long length;
+} MYSQL_ROWS;
+
+typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
+
+#include "my_alloc.h"
+
+typedef struct st_mysql_data {
+ my_ulonglong rows;
+ unsigned int fields;
+ MYSQL_ROWS *data;
+ MEM_ROOT alloc;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ MYSQL_ROWS **prev_ptr;
+#endif
+} MYSQL_DATA;
+
+enum mysql_option
+{
+ MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
+ MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
+ MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
+ MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
+ MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
+ MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
+ MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH
+};
+
+struct st_mysql_options {
+ unsigned int connect_timeout, read_timeout, write_timeout;
+ unsigned int port, protocol;
+ unsigned long client_flag;
+ char *host,*user,*password,*unix_socket,*db;
+ struct st_dynamic_array *init_commands;
+ char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+ char *ssl_key; /* PEM key file */
+ char *ssl_cert; /* PEM cert file */
+ char *ssl_ca; /* PEM CA file */
+ char *ssl_capath; /* PEM directory of CA-s? */
+ char *ssl_cipher; /* cipher to use */
+ char *shared_memory_base_name;
+ unsigned long max_allowed_packet;
+ my_bool use_ssl; /* if to use SSL or not */
+ my_bool compress,named_pipe;
+ /*
+ On connect, find out the replication role of the server, and
+ establish connections to all the peers
+ */
+ my_bool rpl_probe;
+ /*
+ Each call to mysql_real_query() will parse it to tell if it is a read
+ or a write, and direct it to the slave or the master
+ */
+ my_bool rpl_parse;
+ /*
+ If set, never read from a master, only from slave, when doing
+ a read that is replication-aware
+ */
+ my_bool no_master_reads;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ my_bool separate_thread;
+#endif
+ enum mysql_option methods_to_use;
+ char *client_ip;
+ /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
+ my_bool secure_auth;
+
+ /* function pointers for local infile support */
+ int (*local_infile_init)(void **, const char *, void *);
+ int (*local_infile_read)(void *, char *, unsigned int);
+ void (*local_infile_end)(void *);
+ int (*local_infile_error)(void *, char *, unsigned int);
+ void *local_infile_userdata;
+};
+
+enum mysql_status
+{
+ MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
+};
+
+enum mysql_protocol_type
+{
+ MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
+ MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
+};
+/*
+ There are three types of queries - the ones that have to go to
+ the master, the ones that go to a slave, and the adminstrative
+ type which must happen on the pivot connectioin
+*/
+enum mysql_rpl_type
+{
+ MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
+};
+
+struct st_mysql_methods;
+
+typedef struct st_mysql
+{
+ NET net; /* Communication parameters */
+ gptr connector_fd; /* ConnectorFd for SSL */
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
+ char *db;
+ struct charset_info_st *charset;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
+ my_ulonglong extra_info; /* Used by mysqlshow */
+ unsigned long thread_id; /* Id for connection in server */
+ unsigned long packet_length;
+ unsigned int port;
+ unsigned long client_flag,server_capabilities;
+ unsigned int protocol_version;
+ unsigned int field_count;
+ unsigned int server_status;
+ unsigned int server_language;
+ unsigned int warning_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me; /* If free in mysql_close */
+ my_bool reconnect; /* set to 1 if automatic reconnect */
+
+ /* session-wide random string */
+ char scramble[SCRAMBLE_LENGTH+1];
+
+ /*
+ Set if this is the original connection, not a master or a slave we have
+ added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
+ */
+ my_bool rpl_pivot;
+ /*
+ Pointers to the master, and the next slave connections, points to
+ itself if lone connection.
+ */
+ struct st_mysql* master, *next_slave;
+
+ struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
+ /* needed for send/read/store/use result to work correctly with replication */
+ struct st_mysql* last_used_con;
+
+ LIST *stmts; /* list of all statements */
+ const struct st_mysql_methods *methods;
+ void *thd;
+ /*
+ Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
+ from mysql_stmt_close if close had to cancel result set of this object.
+ */
+ my_bool *unbuffered_fetch_owner;
+} MYSQL;
+
+typedef struct st_mysql_res {
+ my_ulonglong row_count;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA *data;
+ MYSQL_ROWS *data_cursor;
+ unsigned long *lengths; /* column lengths of current row */
+ MYSQL *handle; /* for unbuffered reads */
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
+ MYSQL_ROW row; /* If unbuffered read */
+ MYSQL_ROW current_row; /* buffer to current row */
+ my_bool eof; /* Used by mysql_fetch_row */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ const struct st_mysql_methods *methods;
+} MYSQL_RES;
+
+#define MAX_MYSQL_MANAGER_ERR 256
+#define MAX_MYSQL_MANAGER_MSG 256
+
+#define MANAGER_OK 200
+#define MANAGER_INFO 250
+#define MANAGER_ACCESS 401
+#define MANAGER_CLIENT_ERR 450
+#define MANAGER_INTERNAL_ERR 500
+
+#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
+#define MYSQL_CLIENT
+#endif
+
+
+typedef struct st_mysql_manager
+{
+ NET net;
+ char *host,*user,*passwd;
+ unsigned int port;
+ my_bool free_me;
+ my_bool eof;
+ int cmd_status;
+ int last_errno;
+ char* net_buf,*net_buf_pos,*net_data_end;
+ int net_buf_size;
+ char last_error[MAX_MYSQL_MANAGER_ERR];
+} MYSQL_MANAGER;
+
+typedef struct st_mysql_parameters
+{
+ unsigned long *p_max_allowed_packet;
+ unsigned long *p_net_buffer_length;
+} MYSQL_PARAMETERS;
+
+#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
+#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
+#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
+#endif
+
+/*
+ Set up and bring down the server; to ensure that applications will
+ work when linked against either the standard client library or the
+ embedded server library, these functions should be called.
+*/
+int STDCALL mysql_server_init(int argc, char **argv, char **groups);
+void STDCALL mysql_server_end(void);
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
+
+MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
+
+/*
+ Set up and bring down a thread; these function should be called
+ for each thread in an application which opens at least one MySQL
+ connection. All uses of the connection(s) should be between these
+ function calls.
+*/
+my_bool STDCALL mysql_thread_init(void);
+void STDCALL mysql_thread_end(void);
+
+/*
+ Functions to get information from the MYSQL and MYSQL_RES structures
+ Should definitely be used if one uses shared libraries.
+*/
+
+my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
+unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
+my_bool STDCALL mysql_eof(MYSQL_RES *res);
+MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
+ unsigned int fieldnr);
+MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
+MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
+
+unsigned int STDCALL mysql_field_count(MYSQL *mysql);
+my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
+my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
+unsigned int STDCALL mysql_errno(MYSQL *mysql);
+const char * STDCALL mysql_error(MYSQL *mysql);
+const char *STDCALL mysql_sqlstate(MYSQL *mysql);
+unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
+const char * STDCALL mysql_info(MYSQL *mysql);
+unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
+const char * STDCALL mysql_character_set_name(MYSQL *mysql);
+
+MYSQL * STDCALL mysql_init(MYSQL *mysql);
+my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
+ const char *cert, const char *ca,
+ const char *capath, const char *cipher);
+my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
+ const char *passwd, const char *db);
+MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
+ const char *user,
+ const char *passwd,
+ const char *db,
+ unsigned int port,
+ const char *unix_socket,
+ unsigned long clientflag);
+int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
+int STDCALL mysql_query(MYSQL *mysql, const char *q);
+int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
+
+/* perform query on master */
+my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+/* perform query on slave */
+my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+
+/* local infile support */
+
+#define LOCAL_INFILE_ERROR_LEN 512
+
+void
+mysql_set_local_infile_handler(MYSQL *mysql,
+ int (*local_infile_init)(void **, const char *,
+ void *),
+ int (*local_infile_read)(void *, char *,
+ unsigned int),
+ void (*local_infile_end)(void *),
+ int (*local_infile_error)(void *, char*,
+ unsigned int),
+ void *);
+
+void
+mysql_set_local_infile_default(MYSQL *mysql);
+
+
+/*
+ enable/disable parsing of all queries to decide if they go on master or
+ slave
+*/
+void STDCALL mysql_enable_rpl_parse(MYSQL* mysql);
+void STDCALL mysql_disable_rpl_parse(MYSQL* mysql);
+/* get the value of the parse flag */
+int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql);
+
+/* enable/disable reads from master */
+void STDCALL mysql_enable_reads_from_master(MYSQL* mysql);
+void STDCALL mysql_disable_reads_from_master(MYSQL* mysql);
+/* get the value of the master read flag */
+my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql);
+
+enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len);
+
+/* discover the master and its slaves */
+my_bool STDCALL mysql_rpl_probe(MYSQL* mysql);
+
+/* set the master, close/free the old one, if it is not a pivot */
+int STDCALL mysql_set_master(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+int STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+
+int STDCALL mysql_shutdown(MYSQL *mysql,
+ enum mysql_enum_shutdown_level
+ shutdown_level);
+int STDCALL mysql_dump_debug_info(MYSQL *mysql);
+int STDCALL mysql_refresh(MYSQL *mysql,
+ unsigned int refresh_options);
+int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid);
+int STDCALL mysql_set_server_option(MYSQL *mysql,
+ enum enum_mysql_set_option
+ option);
+int STDCALL mysql_ping(MYSQL *mysql);
+const char * STDCALL mysql_stat(MYSQL *mysql);
+const char * STDCALL mysql_get_server_info(MYSQL *mysql);
+const char * STDCALL mysql_get_client_info(void);
+unsigned long STDCALL mysql_get_client_version(void);
+const char * STDCALL mysql_get_host_info(MYSQL *mysql);
+unsigned long STDCALL mysql_get_server_version(MYSQL *mysql);
+unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
+int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
+ const char *arg);
+void STDCALL mysql_free_result(MYSQL_RES *result);
+void STDCALL mysql_data_seek(MYSQL_RES *result,
+ my_ulonglong offset);
+MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
+ MYSQL_FIELD_OFFSET offset);
+MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
+unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
+MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
+unsigned long STDCALL mysql_escape_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
+ char *to,const char *from,
+ unsigned long length);
+void STDCALL mysql_debug(const char *debug);
+char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
+ char *to,
+ unsigned long to_length,
+ const char *from,
+ unsigned long from_length,
+ void *param,
+ char *
+ (*extend_buffer)
+ (void *, char *to,
+ unsigned long *length));
+void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
+unsigned int STDCALL mysql_thread_safe(void);
+my_bool STDCALL mysql_embedded(void);
+MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con);
+MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
+ const char* host,
+ const char* user,
+ const char* passwd,
+ unsigned int port);
+void STDCALL mysql_manager_close(MYSQL_MANAGER* con);
+int STDCALL mysql_manager_command(MYSQL_MANAGER* con,
+ const char* cmd, int cmd_len);
+int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con,
+ char* res_buf,
+ int res_buf_size);
+my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
+
+
+/*
+ The following definitions are added for the enhanced
+ client-server protocol
+*/
+
+/* statement state */
+enum enum_mysql_stmt_state
+{
+ MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
+ MYSQL_STMT_FETCH_DONE
+};
+
+
+/* bind structure */
+typedef struct st_mysql_bind
+{
+ unsigned long *length; /* output length pointer */
+ my_bool *is_null; /* Pointer to null indicator */
+ void *buffer; /* buffer to get/put data */
+ enum enum_field_types buffer_type; /* buffer type */
+ unsigned long buffer_length; /* buffer length, must be set for str/binary */
+
+ /* Following are for internal use. Set by mysql_stmt_bind_param */
+ unsigned char *inter_buffer; /* for the current data position */
+ unsigned long offset; /* offset position for char/binary fetch */
+ unsigned long internal_length; /* Used if length is 0 */
+ unsigned int param_number; /* For null count and error messages */
+ unsigned int pack_length; /* Internal length for packed data */
+ my_bool is_unsigned; /* set if integer type is unsigned */
+ my_bool long_data_used; /* If used with mysql_send_long_data */
+ my_bool internal_is_null; /* Used if is_null is 0 */
+ void (*store_param_func)(NET *net, struct st_mysql_bind *param);
+ void (*fetch_result)(struct st_mysql_bind *, unsigned char **row);
+ void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+} MYSQL_BIND;
+
+
+/* statement handler */
+typedef struct st_mysql_stmt
+{
+ MEM_ROOT mem_root; /* root allocations */
+ LIST list; /* list to keep track of all stmts */
+ MYSQL *mysql; /* connection handle */
+ MYSQL_BIND *params; /* input parameters */
+ MYSQL_BIND *bind; /* output parameters */
+ MYSQL_FIELD *fields; /* result set metadata */
+ MYSQL_DATA result; /* cached result set */
+ MYSQL_ROWS *data_cursor; /* current row in cached result */
+ /* copy of mysql->affected_rows after statement execution */
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* copy of mysql->insert_id */
+ /*
+ mysql_stmt_fetch() calls this function to fetch one row (it's different
+ for buffered, unbuffered and cursor fetch).
+ */
+ int (*read_row_func)(struct st_mysql_stmt *stmt,
+ unsigned char **row);
+ unsigned long stmt_id; /* Id for prepared statement */
+ unsigned int last_errno; /* error code */
+ unsigned int param_count; /* input parameter count */
+ unsigned int field_count; /* number of columns in result set */
+ enum enum_mysql_stmt_state state; /* statement state */
+ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
+ char sqlstate[SQLSTATE_LENGTH+1];
+ /* Types of input parameters should be sent to server */
+ my_bool send_types_to_server;
+ my_bool bind_param_done; /* input buffers were supplied */
+ my_bool bind_result_done; /* output buffers were supplied */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ /*
+ Is set to true if we need to calculate field->max_length for
+ metadata fields when doing mysql_stmt_store_result.
+ */
+ my_bool update_max_length;
+} MYSQL_STMT;
+
+enum enum_stmt_attr_type
+{
+ /*
+ When doing mysql_stmt_store_result calculate max_length attribute
+ of statement metadata. This is to be consistent with the old API,
+ where this was done automatically.
+ In the new API we do that only by request because it slows down
+ mysql_stmt_store_result sufficiently.
+ */
+ STMT_ATTR_UPDATE_MAX_LENGTH
+};
+
+
+typedef struct st_mysql_methods
+{
+ my_bool (*read_query_result)(MYSQL *mysql);
+ my_bool (*advanced_command)(MYSQL *mysql,
+ enum enum_server_command command,
+ const char *header,
+ unsigned long header_length,
+ const char *arg,
+ unsigned long arg_length,
+ my_bool skip_check);
+ MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ unsigned int fields);
+ MYSQL_RES * (*use_result)(MYSQL *mysql);
+ void (*fetch_lengths)(unsigned long *to,
+ MYSQL_ROW column, unsigned int field_count);
+ void (*flush_use_result)(MYSQL *mysql);
+#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
+ MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
+ my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
+ int (*stmt_execute)(MYSQL_STMT *stmt);
+ int (*read_binary_rows)(MYSQL_STMT *stmt);
+ int (*unbuffered_fetch)(MYSQL *mysql, char **row);
+ void (*free_embedded_thd)(MYSQL *mysql);
+ const char *(*read_statistics)(MYSQL *mysql);
+ my_bool (*next_result)(MYSQL *mysql);
+ int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
+#endif
+} MYSQL_METHODS;
+
+
+MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
+int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
+ unsigned long length);
+int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
+ unsigned int column,
+ unsigned long offset);
+int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
+unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ const void *attr);
+my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ void *attr);
+my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
+my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
+ unsigned int param_number,
+ const char *data,
+ unsigned long length);
+MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
+MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
+void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
+my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
+
+my_bool STDCALL mysql_commit(MYSQL * mysql);
+my_bool STDCALL mysql_rollback(MYSQL * mysql);
+my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
+my_bool STDCALL mysql_more_results(MYSQL *mysql);
+int STDCALL mysql_next_result(MYSQL *mysql);
+void STDCALL mysql_close(MYSQL *sock);
+
+
+/* status return codes */
+#define MYSQL_NO_DATA 100
+
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+
+#ifdef USE_OLD_FUNCTIONS
+MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
+ const char *user, const char *passwd);
+int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
+int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+#endif
+#define HAVE_MYSQL_REAL_CONNECT
+
+/*
+ The following functions are mainly exported because of mysqlbinlog;
+ They are not for general usage
+*/
+
+#define simple_command(mysql, command, arg, length, skip_check) \
+ (*(mysql)->methods->advanced_command)(mysql, command, \
+ NullS, 0, arg, length, skip_check)
+unsigned long net_safe_read(MYSQL* mysql);
+
+#ifdef __NETWARE__
+#pragma pack(pop) /* restore alignment */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _mysql_h */
diff --git a/MCPKit_bundled.framework/Headers/mysql_com.h b/MCPKit_bundled.framework/Headers/mysql_com.h
new file mode 100644
index 00000000..56c7f7d2
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/mysql_com.h
@@ -0,0 +1,397 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/*
+** Common definition between mysql server & client
+*/
+
+#ifndef _mysql_com_h
+#define _mysql_com_h
+
+#define NAME_LEN 64 /* Field/table name length */
+#define HOSTNAME_LENGTH 60
+#define USERNAME_LENGTH 16
+#define SERVER_VERSION_LENGTH 60
+#define SQLSTATE_LENGTH 5
+
+#define LOCAL_HOST "localhost"
+#define LOCAL_HOST_NAMEDPIPE "."
+
+
+#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
+#define MYSQL_NAMEDPIPE "MySQL"
+#define MYSQL_SERVICENAME "MySQL"
+#endif /* __WIN__ */
+
+enum enum_server_command
+{
+ COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
+ COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
+ COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
+ COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
+ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
+ COM_PREPARE, COM_EXECUTE, COM_LONG_DATA, COM_CLOSE_STMT,
+ COM_RESET_STMT, COM_SET_OPTION,
+ /* don't forget to update const char *command_name[] in sql_parse.cc */
+
+ /* Must be last */
+ COM_END
+};
+
+
+/*
+ Length of random string sent by server on handshake; this is also length of
+ obfuscated password, recieved from client
+*/
+#define SCRAMBLE_LENGTH 20
+#define SCRAMBLE_LENGTH_323 8
+/* length of password stored in the db: new passwords are preceeded with '*' */
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
+
+
+#define NOT_NULL_FLAG 1 /* Field can't be NULL */
+#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
+#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
+#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
+#define BLOB_FLAG 16 /* Field is a blob */
+#define UNSIGNED_FLAG 32 /* Field is unsigned */
+#define ZEROFILL_FLAG 64 /* Field is zerofill */
+#define BINARY_FLAG 128 /* Field is binary */
+
+/* The following are only sent to new clients */
+#define ENUM_FLAG 256 /* field is an enum */
+#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
+#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
+#define SET_FLAG 2048 /* field is a set */
+#define NUM_FLAG 32768 /* Field is num (for clients) */
+#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
+#define GROUP_FLAG 32768 /* Intern: Group field */
+#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
+#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
+
+#define REFRESH_GRANT 1 /* Refresh grant tables */
+#define REFRESH_LOG 2 /* Start on new log file */
+#define REFRESH_TABLES 4 /* close all tables */
+#define REFRESH_HOSTS 8 /* Flush host cache */
+#define REFRESH_STATUS 16 /* Flush status variables */
+#define REFRESH_THREADS 32 /* Flush thread cache */
+#define REFRESH_SLAVE 64 /* Reset master info and restart slave
+ thread */
+#define REFRESH_MASTER 128 /* Remove all bin logs in the index
+ and truncate the index */
+
+/* The following can't be set with mysql_refresh() */
+#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
+#define REFRESH_FAST 32768 /* Intern flag */
+
+/* RESET (remove all queries) from query cache */
+#define REFRESH_QUERY_CACHE 65536
+#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
+#define REFRESH_DES_KEY_FILE 0x40000L
+#define REFRESH_USER_RESOURCES 0x80000L
+
+#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
+#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
+#define CLIENT_LONG_FLAG 4 /* Get all column flags */
+#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
+#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
+#define CLIENT_COMPRESS 32 /* Can use compression protocol */
+#define CLIENT_ODBC 64 /* Odbc client */
+#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
+#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
+#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
+#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
+#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
+#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */
+#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */
+#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31)
+
+#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
+#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
+#define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */
+#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
+#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
+#define SERVER_QUERY_NO_INDEX_USED 32
+#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
+
+#define MYSQL_ERRMSG_SIZE 512
+#define NET_READ_TIMEOUT 30 /* Timeout on read */
+#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
+#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
+
+struct st_vio; /* Only C */
+typedef struct st_vio Vio;
+
+#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */
+#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */
+#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */
+#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
+#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
+#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
+#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
+
+typedef struct st_net {
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
+ Vio* vio;
+ unsigned char *buff,*buff_end,*write_pos,*read_pos;
+ my_socket fd; /* For Perl DBI/dbd */
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
+ my_bool compress;
+ /*
+ The following variable is set if we are doing several queries in one
+ command ( as in LOAD TABLE ... FROM MASTER ),
+ and do not want to confuse the client with OK at the wrong time
+ */
+ unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned int *return_status;
+ unsigned char reading_or_writing;
+ char save_char;
+ my_bool no_send_ok;
+ /*
+ Pointer to query object in query cache, do not equal NULL (0) for
+ queries in cache that have not stored its results yet
+ */
+#endif
+ char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
+ unsigned int last_errno;
+ unsigned char error;
+ gptr query_cache_query;
+ my_bool report_error; /* We should report error (we have unreported error) */
+ my_bool return_errno;
+} NET;
+
+#define packet_error (~(unsigned long) 0)
+
+enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
+ MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
+ MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
+ MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
+ MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
+ MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
+ MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
+ MYSQL_TYPE_NEWDATE,
+ MYSQL_TYPE_ENUM=247,
+ MYSQL_TYPE_SET=248,
+ MYSQL_TYPE_TINY_BLOB=249,
+ MYSQL_TYPE_MEDIUM_BLOB=250,
+ MYSQL_TYPE_LONG_BLOB=251,
+ MYSQL_TYPE_BLOB=252,
+ MYSQL_TYPE_VAR_STRING=253,
+ MYSQL_TYPE_STRING=254,
+ MYSQL_TYPE_GEOMETRY=255
+
+};
+
+/* For backward compatibility */
+#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
+#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
+#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
+#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
+#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
+#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
+#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
+#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
+#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
+#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
+#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
+#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
+#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
+#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
+#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
+#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
+#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
+#define FIELD_TYPE_SET MYSQL_TYPE_SET
+#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
+#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
+#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
+#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
+#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
+#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
+#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
+#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
+#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
+
+
+/* Shutdown/kill enums and constants */
+
+/* Bits for THD::killable. */
+#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
+#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
+#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
+#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
+
+enum mysql_enum_shutdown_level {
+ /*
+ We want levels to be in growing order of hardness (because we use number
+ comparisons). Note that DEFAULT does not respect the growing property, but
+ it's ok.
+ */
+ SHUTDOWN_DEFAULT = 0,
+ /* wait for existing connections to finish */
+ SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT,
+ /* wait for existing trans to finish */
+ SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS,
+ /* wait for existing updates to finish (=> no partial MyISAM update) */
+ SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE,
+ /* flush InnoDB buffers and other storage engines' buffers*/
+ SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1),
+ /* don't flush InnoDB buffers, flush other storage engines' buffers*/
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
+ /* Now the 2 levels of the KILL command */
+#if MYSQL_VERSION_ID >= 50000
+ KILL_QUERY= 254,
+#endif
+ KILL_CONNECTION= 255
+};
+
+/* options for mysql_set_option */
+enum enum_mysql_set_option
+{
+ MYSQL_OPTION_MULTI_STATEMENTS_ON,
+ MYSQL_OPTION_MULTI_STATEMENTS_OFF
+};
+
+#define net_new_transaction(net) ((net)->pkt_nr=0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+my_bool my_net_init(NET *net, Vio* vio);
+void my_net_local_init(NET *net);
+void net_end(NET *net);
+void net_clear(NET *net);
+my_bool net_realloc(NET *net, unsigned long length);
+my_bool net_flush(NET *net);
+my_bool my_net_write(NET *net,const char *packet,unsigned long len);
+my_bool net_write_command(NET *net,unsigned char command,
+ const char *header, unsigned long head_len,
+ const char *packet, unsigned long len);
+int net_real_write(NET *net,const char *packet,unsigned long len);
+unsigned long my_net_read(NET *net);
+
+/*
+ The following function is not meant for normal usage
+ Currently it's used internally by manager.c
+*/
+struct sockaddr;
+int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
+ unsigned int timeout);
+
+struct rand_struct {
+ unsigned long seed1,seed2,max_value;
+ double max_value_dbl;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+ /* The following is for user defined functions */
+
+enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
+
+typedef struct st_udf_args
+{
+ unsigned int arg_count; /* Number of arguments */
+ enum Item_result *arg_type; /* Pointer to item_results */
+ char **args; /* Pointer to argument */
+ unsigned long *lengths; /* Length of string arguments */
+ char *maybe_null; /* Set to 1 for all maybe_null args */
+} UDF_ARGS;
+
+ /* This holds information about the result */
+
+typedef struct st_udf_init
+{
+ my_bool maybe_null; /* 1 if function can return NULL */
+ unsigned int decimals; /* for real functions */
+ unsigned long max_length; /* For string functions */
+ char *ptr; /* free pointer for function data */
+ my_bool const_item; /* 0 if result is independent of arguments */
+} UDF_INIT;
+
+ /* Constants when using compression */
+#define NET_HEADER_SIZE 4 /* standard header size */
+#define COMP_HEADER_SIZE 3 /* compression header extra size */
+
+ /* Prototypes to password functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ These functions are used for authentication by client and server and
+ implemented in sql/password.c
+*/
+
+void randominit(struct rand_struct *, unsigned long seed1,
+ unsigned long seed2);
+double my_rnd(struct rand_struct *);
+void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
+
+void hash_password(unsigned long *to, const char *password, unsigned int password_len);
+void make_scrambled_password_323(char *to, const char *password);
+void scramble_323(char *to, const char *message, const char *password);
+my_bool check_scramble_323(const char *, const char *message,
+ unsigned long *salt);
+void get_salt_from_password_323(unsigned long *res, const char *password);
+void make_password_from_salt_323(char *to, const unsigned long *salt);
+
+void make_scrambled_password(char *to, const char *password);
+void scramble(char *to, const char *message, const char *password);
+my_bool check_scramble(const char *reply, const char *message,
+ const unsigned char *hash_stage2);
+void get_salt_from_password(unsigned char *res, const char *password);
+void make_password_from_salt(char *to, const unsigned char *hash_stage2);
+
+/* end of password.c */
+
+char *get_tty_password(char *opt_message);
+const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
+
+/* Some other useful functions */
+
+my_bool my_init(void);
+int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
+my_bool my_thread_init(void);
+void my_thread_end(void);
+
+#ifdef _global_h
+ulong STDCALL net_field_length(uchar **packet);
+my_ulonglong net_field_length_ll(uchar **packet);
+char *net_store_length(char *pkg, ulonglong length);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
+#define MYSQL_STMT_HEADER 4
+#define MYSQL_LONG_DATA_HEADER 6
+
+#endif
diff --git a/MCPKit_bundled.framework/Headers/mysql_embed.h b/MCPKit_bundled.framework/Headers/mysql_embed.h
new file mode 100644
index 00000000..603af8e8
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/mysql_embed.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/* Defines that are unique to the embedded version of MySQL */
+
+#ifdef EMBEDDED_LIBRARY
+
+/* Things we don't need in the embedded version of MySQL */
+/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
+
+#undef HAVE_PSTACK /* No stacktrace */
+#undef HAVE_DLOPEN /* No udf functions */
+#undef HAVE_OPENSSL
+#undef HAVE_ISAM
+#undef HAVE_SMEM /* No shared memory */
+#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
+
+#define DONT_USE_RAID
+
+#endif /* EMBEDDED_LIBRARY */
diff --git a/MCPKit_bundled.framework/Headers/mysql_time.h b/MCPKit_bundled.framework/Headers/mysql_time.h
new file mode 100644
index 00000000..5f4fc12c
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/mysql_time.h
@@ -0,0 +1,56 @@
+/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+
+ 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 */
+
+#ifndef _mysql_time_h_
+#define _mysql_time_h_
+
+/*
+ Time declarations shared between the server and client API:
+ you should not add anything to this header unless it's used
+ (and hence should be visible) in mysql.h.
+ If you're looking for a place to add new time-related declaration,
+ it's most likely my_time.h. See also "C API Handling of Date
+ and Time Values" chapter in documentation.
+*/
+
+enum enum_mysql_timestamp_type
+{
+ MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
+ MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+};
+
+
+/*
+ Structure which is used to represent datetime values inside MySQL.
+
+ We assume that values in this structure are normalized, i.e. year <= 9999,
+ month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
+ in server such as my_system_gmt_sec() or make_time() family of functions
+ rely on this (actually now usage of make_*() family relies on a bit weaker
+ restriction). Also functions that produce MYSQL_TIME as result ensure this.
+ There is one exception to this rule though if this structure holds time
+ value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
+ bigger values.
+*/
+typedef struct st_mysql_time
+{
+ unsigned int year, month, day, hour, minute, second;
+ unsigned long second_part;
+ my_bool neg;
+ enum enum_mysql_timestamp_type time_type;
+} MYSQL_TIME;
+
+#endif /* _mysql_time_h_ */
diff --git a/MCPKit_bundled.framework/Headers/mysql_version.h b/MCPKit_bundled.framework/Headers/mysql_version.h
new file mode 100644
index 00000000..9f38c100
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/mysql_version.h
@@ -0,0 +1,29 @@
+/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
+ This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mysql_version_h
+#define _mysql_version_h
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define PROTOCOL_VERSION 10
+#define MYSQL_SERVER_VERSION "4.1.12"
+#define MYSQL_BASE_VERSION "mysqld-4.1"
+#define MYSQL_SERVER_SUFFIX_DEF ""
+#define FRM_VER 6
+#define MYSQL_VERSION_ID 40112
+#define MYSQL_PORT 3306
+#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
+#define MYSQL_CONFIG_NAME "my"
+#define MYSQL_COMPILATION_COMMENT "Source distribution"
+
+/* mysqld compile time options */
+#endif /* _CUSTOMCONFIG_ */
+
+#ifndef LICENSE
+#define LICENSE GPL
+#endif /* LICENSE */
+
+#endif /* _mysql_version_h */
diff --git a/MCPKit_bundled.framework/Headers/typelib.h b/MCPKit_bundled.framework/Headers/typelib.h
new file mode 100644
index 00000000..4d6a90ad
--- /dev/null
+++ b/MCPKit_bundled.framework/Headers/typelib.h
@@ -0,0 +1,34 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+
+#ifndef _typelib_h
+#define _typelib_h
+
+typedef struct st_typelib { /* Different types saved here */
+ unsigned int count; /* How many types */
+ const char *name; /* Name of typelib */
+ const char **type_names;
+ unsigned int *type_lengths;
+} TYPELIB;
+
+extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
+extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
+extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+
+extern TYPELIB sql_protocol_typelib;
+
+#endif /* _typelib_h */
diff --git a/MCPKit_bundled.framework/MCPKit_bundled b/MCPKit_bundled.framework/MCPKit_bundled
new file mode 100755
index 00000000..16b016f0
--- /dev/null
+++ b/MCPKit_bundled.framework/MCPKit_bundled
Binary files differ
diff --git a/MCPKit_bundled.framework/PrivateHeaders/MCPAttribute+Private.h b/MCPKit_bundled.framework/PrivateHeaders/MCPAttribute+Private.h
new file mode 100644
index 00000000..2426b16a
--- /dev/null
+++ b/MCPKit_bundled.framework/PrivateHeaders/MCPAttribute+Private.h
@@ -0,0 +1,35 @@
+//
+// MCPAttribute+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPAttribute.h"
+
+@interface MCPAttribute (Private)
+
+
+#pragma mark Setters
+- (void) setValueClassName:(NSString *) iClassName;
+
+#pragma mark Pseudo-getters
+
+@end
+
diff --git a/MCPKit_bundled.framework/PrivateHeaders/MCPClassDescription+Private.h b/MCPKit_bundled.framework/PrivateHeaders/MCPClassDescription+Private.h
new file mode 100644
index 00000000..fa4ffab3
--- /dev/null
+++ b/MCPKit_bundled.framework/PrivateHeaders/MCPClassDescription+Private.h
@@ -0,0 +1,41 @@
+//
+// MCPClassDescription+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import "MCPClassDescription.h"
+
+@interface MCPClassDescription (Private)
+
+#pragma mark Setters
+- (void) setAttributes:(NSArray *) iAttributes;
+- (void) setRelations:(NSArray *) iRelations;
+- (void) insertObject:(MCPRelation *) iRelation inIncomingsAtIndex:(unsigned int) index;
+- (void) removeObjectFromIncomingsAtIndex:(unsigned int) index;
+
+#pragma mark Getters
+- (NSArray *) incomings;
+- (unsigned int) countOfIncomings;
+- (MCPRelation *) objectInIncomingsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfIncoming:(id) iRelation;
+
+@end
diff --git a/MCPKit_bundled.framework/PrivateHeaders/MCPRelation+Private.h b/MCPKit_bundled.framework/PrivateHeaders/MCPRelation+Private.h
new file mode 100644
index 00000000..aa286787
--- /dev/null
+++ b/MCPKit_bundled.framework/PrivateHeaders/MCPRelation+Private.h
@@ -0,0 +1,41 @@
+//
+// MCPRelation+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPRelation.h"
+
+@interface MCPRelation (Private)
+
+#pragma mark Making some work
+- (void) invalidateJoins; // Check that the joins are realistics.
+
+#pragma mark Setters
+- (void) setOrigin:(MCPClassDescription *) iOrigin;
+//- (void) setJoins:(NSArray *) iJoins;
+
+#pragma mark Getters
+- (MCPModel *) model;
+
+#pragma mark Fro the controller layer and the UI
+- (void) addNewDefaultJoin;
+
+@end
diff --git a/MCPKit_bundled.framework/Resources/English.lproj/InfoPlist.strings b/MCPKit_bundled.framework/Resources/English.lproj/InfoPlist.strings
new file mode 100644
index 00000000..8177d470
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist
new file mode 100644
index 00000000..e0a16f9b
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>JavaSourceSubpath</key>
+ <string>_MCPConnectionWindow_EOArchive_English.java</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java
new file mode 100644
index 00000000..5ba619a6
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java
@@ -0,0 +1,424 @@
+// _MCPConnectionWindow_EOArchive_English.java
+// Generated by EnterpriseObjects palette at vendredi 14 mai 2004 11 h 08 Europe/Amsterdam
+
+import com.webobjects.eoapplication.*;
+import com.webobjects.eocontrol.*;
+import com.webobjects.eointerface.*;
+import com.webobjects.eointerface.swing.*;
+import com.webobjects.foundation.*;
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import javax.swing.text.*;
+
+public class _MCPConnectionWindow_EOArchive_English extends com.webobjects.eoapplication.EOArchive {
+ IBHelpConnector _iBHelpConnector0, _iBHelpConnector1, _iBHelpConnector2, _iBHelpConnector3;
+ com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1;
+ com.webobjects.eointerface.swing.EOTextField _nsTextField0, _nsTextField1, _nsTextField2, _nsTextField3, _nsTextField4, _nsTextField5, _nsTextField6, _nsTextField7, _nsTextField8, _nsTextField9;
+ com.webobjects.eointerface.swing.EOView _nsBox0, _nsBox1, _nsBox2, _nsBox3;
+ javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4;
+ javax.swing.JPanel _nsView0, _nsView1;
+ javax.swing.JPasswordField _nsSecureTextField0;
+
+ public _MCPConnectionWindow_EOArchive_English(Object owner, NSDisposableRegistry registry) {
+ super(owner, registry);
+ }
+
+ protected void _construct() {
+ Object owner = _owner();
+ EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null;
+ Object replacement;
+
+ super._construct();
+
+ _nsBox3 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView");
+ _nsBox2 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mCreateButton")) != null)) {
+ _nsButton4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsButton4");
+ } else {
+ _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Create DB"), "NSButton2");
+ }
+
+ _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+ _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Go"), "NSButton");
+ _nsBox1 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView");
+ _nsBox0 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1");
+ _nsTextField9 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField23");
+ _nsTextField8 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField22");
+ _nsTextField7 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField6 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "window")) != null)) {
+ _eoFrame1 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_eoFrame1");
+ } else {
+ _eoFrame1 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Window");
+ }
+
+ _nsView1 = (JPanel)_eoFrame1.getContentPane();
+ _iBHelpConnector3 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector2 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector1 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector0 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField5 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField5");
+ } else {
+ _nsTextField5 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField4");
+ } else {
+ _nsTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField11");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent")) != null)) {
+ _nsTextField3 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField3");
+ } else {
+ _nsTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField2 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField2");
+ } else {
+ _nsTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ }
+
+ _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField.nextFocusableComponent")) != null)) {
+ _nsButton0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsButton0");
+ } else {
+ _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("OK"), "NSButton");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField")) != null)) {
+ _nsSecureTextField0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JPasswordField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsSecureTextField0");
+ } else {
+ _nsSecureTextField0 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField");
+ }
+
+ _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordSheet")) != null)) {
+ _eoFrame0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_eoFrame0");
+ } else {
+ _eoFrame0 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Panel");
+ }
+
+ _nsView0 = (JPanel)_eoFrame0.getContentPane();
+ }
+
+ protected void _awaken() {
+ super._awaken();
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _connect(_eoFrame0, _owner(), "delegate");
+ }
+
+ _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton0), ""));
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _connect(_owner(), _eoFrame0, "mPasswordSheet");
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _connect(_owner(), _nsSecureTextField0, "mPasswordField");
+ }
+
+ if (_replacedObjects.objectForKey("_nsButton4") == null) {
+ _connect(_owner(), _nsButton4, "mCreateButton");
+ }
+
+ _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCreate", _nsButton4), ""));
+ _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCancel", _nsButton3), ""));
+ _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doGo", _nsButton2), ""));
+
+ if (_replacedObjects.objectForKey("_eoFrame1") == null) {
+ _connect(_owner(), _eoFrame1, "window");
+ }
+
+ _nsTextField2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField2), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _connect(_owner(), _nsTextField3, "mLoginField");
+ }
+
+ _nsTextField3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField3), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _connect(_owner(), _nsTextField4, "mDatabaseField");
+ }
+
+ _nsTextField4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField4), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _connect(_owner(), _nsTextField5, "mPortField");
+ }
+
+ _nsTextField5.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField5), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _connect(_owner(), _nsTextField2, "mHostField");
+ }
+
+ _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton1), ""));
+ }
+
+ protected void _init() {
+ super._init();
+ if (!(_nsBox2.getLayout() instanceof EOViewLayout)) { _nsBox2.setLayout(new EOViewLayout()); }
+ _nsBox3.setSize(401, 1);
+ _nsBox3.setLocation(2, 2);
+ ((EOViewLayout)_nsBox2.getLayout()).setAutosizingMask(_nsBox3, EOViewLayout.MinYMargin);
+ _nsBox2.add(_nsBox3);
+ _nsBox2.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN));
+
+ if (_replacedObjects.objectForKey("_nsButton4") == null) {
+ _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton4.setMargin(new Insets(0, 2, 0, 2));
+ }
+
+ _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton3.setMargin(new Insets(0, 2, 0, 2));
+ _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton2.setMargin(new Insets(0, 2, 0, 2));
+ if (!(_nsBox0.getLayout() instanceof EOViewLayout)) { _nsBox0.setLayout(new EOViewLayout()); }
+ _nsBox1.setSize(328, 1);
+ _nsBox1.setLocation(2, 2);
+ ((EOViewLayout)_nsBox0.getLayout()).setAutosizingMask(_nsBox1, EOViewLayout.MinYMargin);
+ _nsBox0.add(_nsBox1);
+ _nsBox0.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN));
+ _setFontForComponent(_nsTextField9, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField9.setEditable(false);
+ _nsTextField9.setOpaque(false);
+ _nsTextField9.setText("Port :");
+ _nsTextField9.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField9.setSelectable(true);
+ _nsTextField9.setEnabled(true);
+ _nsTextField9.setBorder(null);
+ _setFontForComponent(_nsTextField8, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField8.setEditable(false);
+ _nsTextField8.setOpaque(false);
+ _nsTextField8.setText("Database :");
+ _nsTextField8.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField8.setSelectable(true);
+ _nsTextField8.setEnabled(true);
+ _nsTextField8.setBorder(null);
+ _setFontForComponent(_nsTextField7, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField7.setEditable(false);
+ _nsTextField7.setOpaque(false);
+ _nsTextField7.setText("Login :");
+ _nsTextField7.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField7.setSelectable(true);
+ _nsTextField7.setEnabled(true);
+ _nsTextField7.setBorder(null);
+ _setFontForComponent(_nsTextField6, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField6.setEditable(false);
+ _nsTextField6.setOpaque(false);
+ _nsTextField6.setText("Host :");
+ _nsTextField6.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField6.setSelectable(true);
+ _nsTextField6.setEnabled(true);
+ _nsTextField6.setBorder(null);
+ if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); }
+ _nsTextField6.setSize(72, 17);
+ _nsTextField6.setLocation(11, 17);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField6, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField6);
+ _nsTextField7.setSize(72, 17);
+ _nsTextField7.setLocation(11, 47);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField7, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField7);
+ _nsTextField8.setSize(72, 17);
+ _nsTextField8.setLocation(11, 77);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField8, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField8);
+ _nsTextField9.setSize(72, 17);
+ _nsTextField9.setLocation(11, 107);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField9, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField9);
+ _nsTextField2.setSize(242, 22);
+ _nsTextField2.setLocation(88, 14);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField2, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField2);
+ _nsTextField3.setSize(242, 22);
+ _nsTextField3.setLocation(88, 44);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField3, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField3);
+ _nsTextField4.setSize(242, 22);
+ _nsTextField4.setLocation(88, 74);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField4, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField4);
+ _nsTextField5.setSize(242, 22);
+ _nsTextField5.setLocation(88, 104);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField5, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField5);
+ _nsBox0.setSize(332, 5);
+ _nsBox0.setLocation(5, 130);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsBox0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsBox0);
+ _nsButton2.setSize(77, 26);
+ _nsButton2.setLocation(256, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton2);
+ _nsButton3.setSize(77, 26);
+ _nsButton3.setLocation(172, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton3);
+ _nsButton4.setSize(96, 26);
+ _nsButton4.setLocation(12, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton4);
+
+ if (_replacedObjects.objectForKey("_eoFrame1") == null) {
+ _nsView1.setSize(342, 180);
+ _eoFrame1.setTitle("New Connection Parameters");
+ _eoFrame1.setLocation(111, 492);
+ _eoFrame1.setSize(342, 180);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _connect(_nsTextField5, _nsTextField2, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _setFontForComponent(_nsTextField5, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField5.setEditable(true);
+ _nsTextField5.setOpaque(true);
+ _nsTextField5.setText("");
+ _nsTextField5.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField5.setSelectable(true);
+ _nsTextField5.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _connect(_nsTextField4, _nsTextField5, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _setFontForComponent(_nsTextField4, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField4.setEditable(true);
+ _nsTextField4.setOpaque(true);
+ _nsTextField4.setText("");
+ _nsTextField4.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField4.setSelectable(true);
+ _nsTextField4.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _connect(_nsTextField3, _nsTextField4, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _setFontForComponent(_nsTextField3, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField3.setEditable(true);
+ _nsTextField3.setOpaque(true);
+ _nsTextField3.setText("");
+ _nsTextField3.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField3.setSelectable(true);
+ _nsTextField3.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _connect(_nsTextField2, _nsTextField3, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _setFontForComponent(_nsTextField2, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField2.setEditable(true);
+ _nsTextField2.setOpaque(true);
+ _nsTextField2.setText("");
+ _nsTextField2.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField2.setSelectable(true);
+ _nsTextField2.setEnabled(true);
+ }
+
+ _connect(_nsButton1, _nsSecureTextField0, "nextFocusableComponent");
+ _setFontForComponent(_nsButton1, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton1.setMargin(new Insets(0, 2, 0, 2));
+
+ if (_replacedObjects.objectForKey("_nsButton0") == null) {
+ _connect(_nsButton0, _nsButton1, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsButton0") == null) {
+ _setFontForComponent(_nsButton0, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton0.setMargin(new Insets(0, 2, 0, 2));
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _connect(_nsSecureTextField0, _nsButton0, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _setFontForComponent(_nsSecureTextField0, "Lucida Grande", 13, Font.PLAIN);
+ _nsSecureTextField0.setEditable(true);
+ _nsSecureTextField0.setOpaque(true);
+ _nsSecureTextField0.setText("");
+ _nsSecureTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsSecureTextField0.setEnabled(true);
+ }
+
+ _setFontForComponent(_nsTextField1, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField1.setEditable(false);
+ _nsTextField1.setOpaque(false);
+ _nsTextField1.setText("Password :");
+ _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField1.setSelectable(false);
+ _nsTextField1.setEnabled(true);
+ _nsTextField1.setBorder(null);
+ _setFontForComponent(_nsTextField0, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField0.setEditable(false);
+ _nsTextField0.setOpaque(false);
+ _nsTextField0.setText("Please enter your password for DB server ");
+ _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
+ _nsTextField0.setSelectable(false);
+ _nsTextField0.setEnabled(true);
+ _nsTextField0.setBorder(null);
+ if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); }
+ _nsTextField0.setSize(395, 17);
+ _nsTextField0.setLocation(11, 14);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView0.add(_nsTextField0);
+ _nsTextField1.setSize(73, 17);
+ _nsTextField1.setLocation(11, 51);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView0.add(_nsTextField1);
+ _nsSecureTextField0.setSize(314, 22);
+ _nsSecureTextField0.setLocation(89, 48);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsSecureTextField0, EOViewLayout.WidthSizable | EOViewLayout.MinYMargin);
+ _nsView0.add(_nsSecureTextField0);
+ _nsBox2.setSize(405, 5);
+ _nsBox2.setLocation(5, 37);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsBox2, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsBox2);
+ _nsButton0.setSize(77, 26);
+ _nsButton0.setLocation(329, 88);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton0);
+ _nsButton1.setSize(77, 26);
+ _nsButton1.setLocation(245, 88);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton1);
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _nsView0.setSize(415, 124);
+ _eoFrame0.setTitle("Password");
+ _eoFrame0.setLocation(95, 422);
+ _eoFrame0.setSize(415, 124);
+ }
+ }
+}
diff --git a/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib
new file mode 100644
index 00000000..e9dc7fa3
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib
@@ -0,0 +1,28 @@
+{
+ IBClasses = (
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {
+ askPassword = id;
+ doCancel = id;
+ doCreate = id;
+ doGo = id;
+ modifyInstance = id;
+ passwordClick = id;
+ };
+ CLASS = MCPConnectionWinCont;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ mCreateButton = NSButton;
+ mDatabaseField = NSTextField;
+ mHostField = NSTextField;
+ mLoginField = NSTextField;
+ mPasswordField = NSTextField;
+ mPasswordSheet = NSPanel;
+ mPortField = NSTextField;
+ };
+ SUPERCLASS = NSWindowController;
+ }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/info.nib b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/info.nib
new file mode 100644
index 00000000..10b70ee6
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>193 200 356 240 0 0 1280 832 </string>
+ <key>IBFramework Version</key>
+ <string>364.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>5</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>7F44</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib
new file mode 100644
index 00000000..d0ebc199
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib
Binary files differ
diff --git a/MCPKit_bundled.framework/Resources/Info.plist b/MCPKit_bundled.framework/Resources/Info.plist
new file mode 100644
index 00000000..c5731f54
--- /dev/null
+++ b/MCPKit_bundled.framework/Resources/Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>MCPKit_bundled</string>
+ <key>CFBundleIdentifier</key>
+ <string>net.chocolatnoir.MCPKit_bundled</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h
new file mode 100644
index 00000000..7044718d
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPAttribute.h
@@ -0,0 +1,104 @@
+//
+// MCPAttribute.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPRelation;
+@class MCPJoin;
+
+
+@interface MCPAttribute : NSObject < NSCoding > {
+@protected
+ MCPClassDescription *classDescription; // ClassDescription of which the attribute is attribute
+ NSString *name; // Name of the attribute (Obj-C side)
+ Class valueClass; // Class used by the attribute (or NULL if the internal type is not an object)
+ NSString *internalType; // Name of the class, or type used for the class definition
+ NSString *externalName; // Name of the corresponding column in the DB
+ NSString *externalType; // Type used to store the attribute (in the DB)
+ unsigned int width; // Width (for storing by the DB)
+ BOOL allowsNull; // Attribute can be null
+ BOOL autoGenerated; // Attribute is auto generated by the DB
+ BOOL isPartOfKey; // Attribute is part of theprimary key of the class description
+ BOOL isPartOfIdentity; // Attribute is part of the idclass description of the class description
+ BOOL hasAccessor; // Does this attribute have an accessor
+ id defaultValue; // Default value of the attribute
+ NSMutableArray *joins; // An array of the joins using this attribute
+// NSMutableArray *relations; // An array of the relations (MCPRelation) that use this attribue as join
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initForClassDescription:(MCPClassDescription *) iClassDescription withName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setValueClass:(Class) iValueClass;
+- (void) setInternalType:(NSString *) iInternalType;
+- (void) setExternalType:(NSString *) iExternalType;
+- (void) setExternalName:(NSString *) iExternalName;
+- (void) setWidth:(unsigned int) iWidth;
+- (void) setAllowsNull:(BOOL) iAllowsNull;
+- (void) setAutoGenerated:(BOOL) iAutoGenerated;
+- (void) setIsPartOfKey:(BOOL) iIsPartOfKey;
+- (void) setIsPartOfIdentity:(BOOL) iIsPartOfIdentity;
+- (void) setHasAccessor:(BOOL) iHasAccessor;
+- (void) setDefaultValue:(id) iDefaultValue;
+- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index;
+- (void) removeObjectFromJoinsAtIndex:(unsigned int) index;
+//- (void) addRelation:(MCPRelation *) iRelation;
+//- (void) removeRelation:(MCPRelation *) iRelation;
+
+#pragma mark Getters
+- (MCPClassDescription *) classDescription;
+- (NSString *) name;
+- (Class) valueClass;
+- (NSString *) valueClassName;
+- (NSString *) internalType;
+- (NSString *) externalName;
+- (NSString *) externalType;
+- (unsigned int) width;
+- (BOOL) allowsNull;
+- (BOOL) autoGenerated;
+- (BOOL) isPartOfKey;
+- (BOOL) isPartOfIdentity;
+- (BOOL) hasAccessor;
+- (id) defaultValue;
+- (unsigned int) countOfJoins;
+- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h
new file mode 100644
index 00000000..a41a4617
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription+MCPEntreprise.h
@@ -0,0 +1,42 @@
+//
+// MCPClassDescription+MCPEntreprise.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+#import "MCPClassDescription.h"
+
+@interface MCPClassDescription (MCPEntreprise)
+
+#pragma mark Pseudo getters (for NSClassDescription overload)
+- (NSArray *) attributeKeys;
+- (NSString *) inverseRelationshipKey:(NSString *) relationshipKey;
+- (NSArray *) toManyRelationshipKeys;
+- (NSArray *) toOneRelationshipKeys;
+
+#pragma mark Specifics for MCPObject
+- (NSArray *) primaryKeyAttributes;
+- (NSArray *) identityAttributes;
+- (MCPAttribute *) attributeWithName: (NSString *) iName;
+- (MCPRelation *) relationWithName:(NSString *) iRelationName;
+- (BOOL) singleIntAutoGenKey;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h
new file mode 100644
index 00000000..26ca382e
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPClassDescription.h
@@ -0,0 +1,91 @@
+//
+// MCPClassDescription.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPAttribute;
+@class MCPRelation;
+@class MCPRelation;
+
+@interface MCPClassDescription : NSClassDescription < NSCoding > {
+@protected
+ MCPModel *model; // The model where we stand
+ NSString *name; // Name of the class (can not use className, as it is already used by NSObject).
+ NSString *externalName; // Name of the table for storage
+ NSMutableArray *attributes; // array of the attributes of the class description
+ NSMutableArray *relations; // array of the relations of the class description (both origin and destination)
+ NSMutableArray *incomings; // array if the INCOMMING relation (just to be sure we are able to invalidate those if necessary)
+ Class representedClass; // the class object that the description represents.
+}
+
+#warning hasSingleIntAutoGenKey should be a method returning the obvious (from the name).
+// This correspond to the method singleIntAutoGenKey in the category MCPEntreprise... which name should I change...
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initInModel:(MCPModel *) iModel withName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Making new attributes and relations
+- (MCPAttribute *) addNewAttributeWithName:(NSString *) iName inPosition:(int) index;
+- (MCPRelation *) addNewRelationTo:(MCPClassDescription *) iTo name:(NSString *) iName inPostion:(int) index;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setExternalName:(NSString *) iExternalName;
+- (void) insertObject:(MCPAttribute *) iAttribute inAttributesAtIndex:(unsigned int) index;
+- (void) removeObjectFromAttributesAtIndex:(unsigned int) index;
+- (void) insertObject:(MCPRelation *) iRelation inRelationsAtIndex:(unsigned int) index;
+- (void) removeObjectFromRelationsAtIndex:(unsigned int) index;
+
+#pragma mark Getters
+- (MCPModel *) model;
+- (NSString *) name;
+- (NSString *) externalName;
+- (NSArray *) attributes;
+- (unsigned int) countOfAttributes;
+- (MCPAttribute *) objectInAttributesAtIndex:(unsigned int) index;
+- (unsigned int) indexOfAttribute:(id) iAttribute;
+- (NSArray *) relations;
+- (unsigned int) countOfRelations;
+- (MCPRelation *) objectInRelationsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfRelation:(id) iRelation;
+- (Class) representedClass;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+#pragma mark Output for logging
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+//- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+//- (NSString *) description;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h
new file mode 100644
index 00000000..5b2f2eaf
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPConnection.h
@@ -0,0 +1,158 @@
+//
+// MCPConnection.h
+// SMySQL
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPConnection.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+#import <Foundation/Foundation.h>
+#import "mysql.h"
+#import "MCPConstants.h"
+
+
+@class MCPResult;
+
+// Deafult connection option
+extern const unsigned int kMCPConnectionDefaultOption;
+
+// Default socket (from the mysql.h used at compile time)
+extern const char *kMCPConnectionDefaultSocket;
+
+// Added to mysql error code
+extern const unsigned int kMCPConnectionNotInited;
+
+// The length of the truncation if required:
+extern const unsigned int kLengthOfTruncationForLog;
+
+@interface MCPConnection : NSObject {
+@protected
+ MYSQL *mConnection; /*"The inited MySQL connection."*/
+ BOOL mConnected; /*"Reflect the fact that the connection is already in place or not."*/
+ NSStringEncoding mEncoding; /*"The encoding used by MySQL server, to ISO-1 default."*/
+ NSTimeZone *mTimeZone; /*"The time zone of the session."*/
+ unsigned int mConnectionFlags; /*"The flags to be used for the connection to the database."*/
+}
+/*"
+Getting default of MySQL
+"*/
++ (NSDictionary *) getMySQLLocales;
++ (NSStringEncoding) encodingForMySQLEncoding:(const char *) mysqlEncoding;
++ (NSStringEncoding) defaultMySQLEncoding;
+
+/*"
+Class maintenance
+"*/
++ (void) initialize;
++ (void) setLogQueries:(BOOL) iLogFlag;
++ (void) setTruncateLongFieldInLogs:(BOOL) iTruncFlag;
++ (BOOL) truncateLongField;
+
+/*"
+Initialisation
+"*/
+- (id) init;
+// Port to 0 to use the default port
+- (id) initToHost:(NSString *) host withLogin:(NSString *) login password:(NSString *) pass usingPort:(int) port;
+- (id) initToSocket:(NSString *) socket withLogin:(NSString *) login password:(NSString *) pass;
+
+- (BOOL) setConnectionOption:(int) option toValue:(BOOL) value;
+// Port to 0 to use the default port
+- (BOOL) connectWithLogin:(NSString *) login password:(NSString *) pass host:(NSString *) host port:(int) port socket:(NSString *) socket;
+
+- (BOOL) selectDB:(NSString *) dbName;
+
+/*"
+Errors information
+"*/
+
+- (NSString *) getLastErrorMessage;
+- (unsigned int) getLastErrorID;
+- (BOOL) isConnected;
+- (BOOL) checkConnection;
+
+/*"
+Queries
+"*/
+
+- (NSString *) prepareBinaryData:(NSData *) theData;
+- (NSString *) prepareString:(NSString *) theString;
+- (NSString *) quoteObject:(id) theObject;
+
+- (MCPResult *) queryString:(NSString *) query;
+
+- (my_ulonglong) affectedRows;
+- (my_ulonglong) insertId;
+
+
+/*"
+Getting description of the database structure
+"*/
+- (MCPResult *) listDBs;
+- (MCPResult *) listDBsLike:(NSString *) dbsName;
+- (MCPResult *) listTables;
+- (MCPResult *) listTablesLike:(NSString *) tablesName;
+// Next method uses SHOW TABLES FROM db to be sure that the db is not changed during this call.
+- (MCPResult *) listTablesFromDB:(NSString *) dbName like:(NSString *) tablesName;
+- (MCPResult *) listFieldsFromTable:(NSString *) tableName;
+- (MCPResult *) listFieldsFromTable:(NSString *) tableName like:(NSString *) fieldsName;
+
+
+/*"
+Server information and control
+"*/
+
+- (NSString *) clientInfo;
+- (NSString *) hostInfo;
+- (NSString *) serverInfo;
+- (NSNumber *) protoInfo;
+- (MCPResult *) listProcesses;
+- (BOOL) killProcess:(unsigned long) pid;
+
+//- (BOOL)createDBWithName:(NSString *)dbName;
+//- (BOOL)dropDBWithName:(NSString *)dbName;
+
+/*"
+Disconnection
+"*/
+- (void) disconnect;
+- (void) dealloc;
+
+/*"
+String encoding concerns (C string type to NSString).
+It's unlikely that users of the framework needs to use these methods which are used internally
+"*/
+- (void) setEncoding:(NSStringEncoding) theEncoding;
+- (NSStringEncoding) encoding;
+
+- (const char *) cStringFromString:(NSString *) theString;
+- (NSString *) stringWithCString:(const char *) theCString;
+
+/*"
+Text data convertion to string
+"*/
+- (NSString *) stringWithText:(NSData *) theTextData;
+
+/*" Time Zone handling ."*/
+- (void) setTimeZone:(NSTimeZone *) iTimeZone;
+- (NSTimeZone *) timeZone;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h
new file mode 100644
index 00000000..98195e9f
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPConnectionWinCont.h
@@ -0,0 +1,52 @@
+//
+// MCPConnectionWinCont.h
+// Vacations
+//
+// Created by Serge Cohen on Mon May 26 2003.
+// Copyright (c) 2003 ARP/wARP. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+// External classes, forward reference.
+@class MCPDocument;
+
+
+@interface MCPConnectionWinCont : NSWindowController
+{
+ IBOutlet NSTextField *mHostField;
+ IBOutlet NSTextField *mLoginField;
+ IBOutlet NSTextField *mDatabaseField;
+ IBOutlet NSTextField *mPortField;
+
+ IBOutlet NSPanel *mPasswordSheet;
+ IBOutlet NSTextField *mPasswordField;
+
+ IBOutlet NSButton *mCreateButton;
+// MCPDocument *mMCPDocument;
+}
+
+
+/*" Actions for Interface Builder "*/
+/*" For the clear text information. "*/
+- (IBAction) doGo:(id) sender;
+- (IBAction) doCancel:(id) sender;
+- (IBAction) doCreate:(id) sender;
+- (IBAction) modifyInstance:(id) sender;
+
+
+/*" For the password. "*/
+- (IBAction) passwordClick:(id) sender;
+- (IBAction) askPassword:(id) sender;
+- (NSString *) Password;
+
+
+/*" Overrides of NSWindowController method, to adapt to this Window Controller. "*/
+- (id) init;
+- (void) dealloc;
+- (void) windowDidLoad;
+
+/*" Getting the button for creating a DB. "*/
+- (NSButton*) getCreateButton;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h
new file mode 100644
index 00000000..cccdfe8c
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPConstants.h
@@ -0,0 +1,33 @@
+//
+// MCPConstants.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPConstants.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+typedef enum {
+ MCPTypeArray = 1,
+ MCPTypeDictionary = 2,
+ MCPTypeFlippedArray = 3,
+ MCPTypeFlippedDictionary = 4
+} MCPReturnType;
+
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h
new file mode 100644
index 00000000..28f375da
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPDocument.h
@@ -0,0 +1,95 @@
+//
+// MCPDocument.h
+// Vacations
+//
+// Created by Serge Cohen on Sat May 24 2003.
+// Copyright (c) 2003 ARP/wARP. All rights reserved.
+//
+
+
+#import <Cocoa/Cocoa.h>
+
+// External classes, forward reference.
+@class MCPConnection;
+@class MCPResult;
+
+
+@interface MCPDocument : NSDocument
+{
+ BOOL MCPConInfoNeeded, MCPPassNeeded;
+ NSString *MCPHost, *MCPLogin, *MCPDatabase;
+ unsigned int MCPPort;
+ MCPConnection *MCPConnect;
+
+// Handling of windows.
+ NSWindowController *MCPMainWinCont;
+ Class MCPConnectedWinCont; /*" Window controller used once the connection is established (As a class). "*/
+// Handling the DB creation state.
+ NSString *MCPModelName;
+ BOOL MCPWillCreateNewDB;
+}
+
+/*" Class Maintenance "*/
++ (void) initialize;
+
+// Standards
+/*" Initialisation and deallocation "*/
+- (id) init;
+- (void) dealloc;
+
+/*" Connection to the databse related "*/
+- (MCPResult *) MCPqueryString:(NSString *) query;
+- (unsigned int) MCPinsertRow:(NSString *) insert;
+- (MCPConnection *) MCPgetConnection;
+
+// Accessors
+/*" Accessors to the parameters of the connection "*/
+- (void) setMCPHost:(NSString *) theHost;
+- (void) setMCPLogin:(NSString *) theLogin;
+- (void) setMCPDatabase:(NSString *) theDatabase;
+- (void) setMCPPort:(unsigned int) thePort;
+- (void) setMCPConInfoNeeded:(BOOL) theConInfoNeeded;
+
+- (NSString *) MCPHost;
+- (NSString *) MCPLogin;
+- (NSString *) MCPDatabase;
+- (unsigned int) MCPPort;
+- (BOOL) MCPConInfoNeeded;
+- (BOOL) MCPPassNeeded;
+
+- (BOOL) MCPisConnected;
+- (MCPConnection *) MCPConnect;
+
+/*" Accessor to the window generated once the connection is established "*/
+- (void) setMCPConnectedWinCont:(Class) theConnectedWinCont;
+
+- (Class) MCPConnectedWinCont;
+
+/*" Accessors to the main window (connection or connected window), through their window controller. "*/
+- (NSWindowController *) MCPMainWinCont;
+
+/*" Accessors to the DB creation instances. "*/
+- (void) setMCPModelName:(NSString *) theModelName;
+- (void) setMCPWillCreateNewDB:(BOOL) theWillCreateNewDB;
+
+- (NSString *) MCPModelName;
+- (BOOL) MCPWillCreateNewDB;
+
+/*" Practical creation of the database, from a model file. "*/
+- (BOOL) createModelDB;
+
+/*" Overrides of NSDocument methods. "*/
+// Managing the document in file format
+- (NSData *) dataRepresentationOfType:(NSString *) aType;
+- (BOOL)loadDataRepresentation:(NSData *) data ofType:(NSString *)aType;
+
+// Managing NSWindowController(s)
+- (NSArray *) makeWindowControllers;
+- (void) windowControllerDidLoadNib:(NSWindowController *) aController;
+
+/*" Method to take care of the password sheet. "*/
+// Callback from sheet
+- (void) MCPPasswordSheetDidEnd:(NSWindow *) sheet returnCode:(int) returnCode contextInfo:(void *) contextInfo;
+
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h
new file mode 100644
index 00000000..824051e6
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPEntrepriseNotifications.h
@@ -0,0 +1,35 @@
+//
+// MCPEntrepriseNotifications.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+// The instance are defined in MMDocument.h
+
+#pragma mark Name for notification
+
+extern NSString *MCPModelChangedNotification;
+extern NSString *MCPClassDescriptionChangedNotification;
+extern NSString *MCPAttributeChangedNotification;
+extern NSString *MCPRelationChangedNotification;
+
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h
new file mode 100644
index 00000000..cea22a11
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPFastQueries.h
@@ -0,0 +1,47 @@
+//
+// MCPFastQueries.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPFastQueries.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+#import "MCPConnection.h"
+
+@interface MCPConnection (MCPFastQueries)
+/*"
+For insert queries, get directly the Id of the newly inserted row
+"*/
+- (my_ulonglong) insertQuery:(NSString *) aQuery;
+- (my_ulonglong) updateQuery:(NSString *) aQuery;
+
+
+/*"
+Returns directly a proper NS object, or a collection (NSArray, NSDictionary...).
+"*/
+- (id) getFirstFieldFromQuery:(NSString *) aQuery;
+- (id) getFirstRowFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType;
+- (id) getAllRowsFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType;
+- (NSArray *) getQuery:(NSString *) aQuery colWithIndex:(unsigned int) aCol;
+- (NSArray *) getQuery:(NSString *) aQuery colWithName:(NSString *) aColName;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h
new file mode 100644
index 00000000..4784a30b
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPJoin.h
@@ -0,0 +1,68 @@
+//
+// MCPJoin.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 18/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPAttribute;
+@class MCPRelation;
+@class MCPRelation;
+
+@interface MCPJoin : NSObject < NSCoding > {
+@protected
+// Note that NONE of these attributes are retained!!!
+// Instead all these objects are notified of the existence of the join
+// and are responsible to invalidate/delete it if necessary.
+ MCPRelation *relation;
+ MCPAttribute *origin;
+ MCPAttribute *destination;
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initForRelation:(MCPRelation *) iRelation from:(MCPAttribute *) iOrigin to:(MCPAttribute *) iDestination;
+- (void) invalidate;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Setters
+// No setter for relation : should be set at init time!
+- (void) setOrigin:(MCPAttribute *) iOrigin;
+- (void) setDestination:(MCPAttribute *) iDestination;
+
+#pragma mark Getters
+- (MCPRelation *) relation;
+- (MCPAttribute *) origin;
+- (MCPAttribute *) destination;
+- (unsigned int) index;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h
new file mode 100644
index 00000000..3242a9dd
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPKit_bundled.h
@@ -0,0 +1,38 @@
+/*
+ * MCPKit_bundled.h
+ * MCPKit
+ *
+ * Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+ * Copyright (c) 2001 Serge Cohen.
+ *
+ * This code 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 any later version.
+ *
+ * This code 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.
+ *
+ * For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+ * write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * More info at <http://mysql-cocoa.sourceforge.net/>
+ *
+ *
+ * $Id: MCPKit_bundled.h 335 2006-01-08 21:14:07Z serge $
+ * $Author: serge $
+ */
+
+#import <Foundation/Foundation.h>
+
+#import <MCPKit_bundled/MCPConstants.h>
+#import <MCPKit_bundled/MCPNull.h>
+#import <MCPKit_bundled/MCPResult.h>
+#import <MCPKit_bundled/MCPConnection.h>
+#import <MCPKit_bundled/MCPNumber.h>
+#import <MCPKit_bundled/MCPResultPlus.h>
+#import <MCPKit_bundled/MCPFastQueries.h>
+#import "mysql.h"
+//#import <SMySQL/mysql.h>
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h
new file mode 100644
index 00000000..069c9862
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPModel+MCPEntreprise.h
@@ -0,0 +1,32 @@
+//
+// MCPModel+MCPEntreprise.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPModel.h"
+
+@interface MCPModel (MCPEntreprise)
+
+#pragma mark Work as a class description server
+- (void) registerAsClassDescriptionServer;
+- (void) registerDescriptionForClass:(NSNotification *) notification;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h
new file mode 100644
index 00000000..362fed72
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPModel.h
@@ -0,0 +1,78 @@
+//
+// MCPModel.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+
+@class MCPClassDescription;
+@class MCPAttribute;
+@class MCPRelation;
+
+@interface MCPModel : NSObject < NSCoding > {
+@protected
+ NSString *name; // Name of the model ... useless.
+ NSMutableArray *classDescriptions; // Order of the class descriptions in the model.
+ BOOL usesInnoDBTables; // The database should use InnoDB tables.
+// Might add a string holding définition of tables.
+// Might also add some sort of template for generated files (at least the header).
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initWithName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Making new class description
+- (MCPClassDescription *) addNewClassDescriptionWithName:(NSString *) iName inPosition:(int) index;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setClassDescriptions:(NSArray *) iClassDescriptions;
+- (void) insertObject:(MCPClassDescription *) iClassDescription inClassDescriptionsAtIndex:(unsigned int) index;
+- (void) removeObjectFromClassDescriptionsAtIndex:(unsigned int) index;
+- (void) setUsesInnoDBTables:(BOOL) iUsesInnoDB;
+
+// Deprecated : non KVC
+//- (void) removeClassDescription:(MCPClassDescription *) iClassDescription;
+//- (void) addClassDescription:(MCPClassDescription *) iClassDescription;
+
+#pragma mark Getters
+- (NSString *) name;
+- (NSArray *) classDescriptions;
+- (unsigned int) countOfClassDescriptions;
+- (MCPClassDescription *) objectInClassDescriptionsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfClassDescription:(id) iClassDescription;
+- (BOOL) usesInnoDBTables;
+
+// Deprecated : non KVC
+//- (MCPClassDescription *) classDescriptionWithClassName:(NSString *) iClassDescriptionClassName;
+
+#pragma mark Output for logging
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h
new file mode 100644
index 00000000..1fa0babd
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPNull.h
@@ -0,0 +1,36 @@
+//
+// MCPNull.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Sun Jun 02 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPNull.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+
+@interface NSObject (MCPNSNullTest)
+
+/*"
+Addin to NSObject.
+"*/
+- (BOOL) isNSNull;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h
new file mode 100644
index 00000000..f4851e2a
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPNumber.h
@@ -0,0 +1,84 @@
+//
+// MCPNumber.h
+// NumberTest
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPNumber.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+
+@interface MCPNumber : NSNumber {
+ const char *typeCode;
+ NSNumber *number;
+}
+
+- (id) initWithChar:(char) value;
+- (id) initWithUnsignedChar:(unsigned char) value;
+- (id) initWithShort:(short) value;
+- (id) initWithUnsignedShort:(unsigned short) value;
+- (id) initWithInt:(int) value;
+- (id) initWithUnsignedInt:(unsigned int) value;
+- (id) initWithLong:(long) value;
+- (id) initWithUnsignedLong:(unsigned long) value;
+- (id) initWithLongLong:(long long) value;
+- (id) initWithUnsignedLongLong:(unsigned long long) value;
+- (id) initWithFloat:(float) value;
+- (id) initWithDouble:(double) value;
+- (id) initWithBool:(BOOL) value;
+
++ (MCPNumber *) numberWithChar:(char) value;
++ (MCPNumber *) numberWithUnsignedChar:(unsigned char) value;
++ (MCPNumber *) numberWithShort:(short) value;
++ (MCPNumber *) numberWithUnsignedShort:(unsigned short) value;
++ (MCPNumber *) numberWithInt:(int) value;
++ (MCPNumber *) numberWithUnsignedInt:(unsigned int) value;
++ (MCPNumber *) numberWithLong:(long) value;
++ (MCPNumber *) numberWithUnsignedLong:(unsigned long) value;
++ (MCPNumber *) numberWithLongLong:(long long) value;
++ (MCPNumber *) numberWithUnsignedLongLong:(unsigned long long) value;
++ (MCPNumber *) numberWithFloat:(float) value;
++ (MCPNumber *) numberWithDouble:(double) value;
++ (MCPNumber *) numberWithBool:(BOOL) value;
+
+- (void) dealloc;
+
+/*" Most important : NSNumber primitive methods: "*/
+- (const char *) objCType;
+- (void) getValue:(void *) buffer;
+
+//- (NSString *) descriptionWithLocale:(NSDictionary *) aLocale; // Not Primitive, but buggy...
+
+- (char) charValue;
+- (unsigned char) unsignedCharValue;
+- (short) shortValue;
+- (unsigned short) unsignedShortValue;
+- (int) intValue;
+- (unsigned int) unsignedIntValue;
+- (long) longValue;
+- (unsigned long) unsignedLongValue;
+- (long long) longLongValue;
+- (unsigned long long) unsignedLongLongValue;
+- (float) floatValue;
+- (double) doubleValue;
+- (BOOL) boolValue;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h
new file mode 100644
index 00000000..2496180a
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPObject.h
@@ -0,0 +1,106 @@
+//
+// MCPObject.h
+// MCPKit
+//
+// Created by Serge Cohen on Wed May 19 2004.
+// Copyright (c) 2004 Serge Cohen. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+/*" Possible return code on some operations of the database interaction. "*/
+typedef enum {
+ MCPDBReturnUnknown = 0, /*"Unknown state, should not happen."*/
+ MCPDBReturnDeleted = 1, /*"The entry have been successfuly deleted from DB."*/
+ MCPDBReturnUsed = 2, /*"The entry can not be removed, because some entries are still connected to it (some delete restrict/inhibit delete)."*/
+ MCPDBReturnNone = 3, /*"No entry exist with this Id."*/
+ MCPDBReturnNew = 4, /*"The entry was indeed new and inserted in the database."*/
+ MCPDBReturnUpdated = 5, /*"The entry was updated in the DB."*/
+ MCPDBReturnIncompleteKey = 6, /*"Part of the primary key is missing, action not taken."*/
+ MCPDBReturnMultiple = 7, /*"Multiple rows are found with a query supposed to return at most one row."*/
+ MCPDBReturnNoIdentity = 8, /*"The object does not have attributes that defines identity."*/
+ MCPDBReturnNoKey = 9, /*"There is no primary key defined for this entity."*/
+ MCPDBReturnNoConnection = 10, /*"The MCPObject is not having a connection."*/
+ MCPDBReturnWrongRelationOrigin = 11, /*"Looking for a relation not which origin is not of the specified class."*/
+ MCPDBReturnWrongRelationCardinality = 12, /*"Using a method assuming a cardinality of the relation while the relation as the other one."*/
+ MCPDBReturnNoSuchRelation = 13, /*"There is no relation with such a name starting from this class."*/
+ MCPDBReturnNotTarget = 14, /*"Tried to remove an object from a relation, while the objects does NOT belong to the relation."*/
+ MCPDBReturnOK = 100 /*"Everything went OK."*/
+} MCPDBReturnCode;
+
+@class MCPConnection;
+@class MCPClassDescription;
+@class MCPRelation;
+
+@interface MCPObject : NSObject {
+ MCPClassDescription *classDescription;
+ MCPConnection *connection;
+}
+
+#pragma mark Life of the Object
+/*" Life of the object "*/
+- (id) init;
+- (id) initWithDictionary:(NSDictionary *) dictionary;
+
+- (void) dealloc;
+
+- (void) setAttributesToDefault;
+
+#pragma mark Accessors
+/*" Accessor(s) "*/
+- (MCPClassDescription *) classDescription;
+- (MCPConnection *) connection;
+
+- (void) setConnection:(MCPConnection *) iConnection;
+
+#pragma mark Database interface
+/*" Database interface "*/
+- (id) readFromDBRow:(NSDictionary *) iDictionary withTableName:(NSString *) iTableName;
+- (MCPDBReturnCode) setPrimaryKey:(id) iDictionary andFetchFromDB:(MCPConnection *) iConnection;
+//- (MCPDBReturnCode) setPrimaryKey:(NSDictionary *) iDictionary andFetchFromDB:(MCPConnection *) iConnection;
+- (NSDictionary *) checkDBId; // the returned dictionary contains a MCPDBReturnCode key with the return code.
+- (NSDictionary *) saveInDB; // the returned dictionary contains a MCPDBReturnCode key with the return code.
+- (MCPDBReturnCode) getAutoGenerated;
+- (MCPDBReturnCode) updateInDB;
+- (MCPDBReturnCode) deleteInDB;
++ (MCPDBReturnCode) deleteInDBUsingConnection:(MCPConnection *) iConnection withId:(id) iId;
+
+#pragma mark Handling relations
+/*" Handling realtions "*/
+- (id) getTargetOfRelation:(MCPRelation *) iRelation;
+- (id) getTargetOfRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) setTarget:(id) iTarget forRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) setTarget:(id) iTarget forRelationNamed:(NSString *) iRelationName;
+- (unsigned int) countTargetForRelation:(MCPRelation *) iRelation;
+- (unsigned int) countTargetForRelationNamed:(NSString *) iRelationName;
+- (MCPObject *) getTargetOfRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex;
+- (MCPObject *) getTargetOfRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex;
+- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) removeTargetToRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex;
+- (MCPDBReturnCode) removeTargetToRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex;
+- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelation:(MCPRelation *) iRelation;
+- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelationNamed:(NSString *) iRelationName;
+
+#pragma mark Utilities
+/*" Utility methods "*/
+- (id) defaultValueForKey:(NSString *) iKey;
+- (NSDictionary *) primaryKey;
+
+/*" Testing equality (VERY important for relation management)"*/
+- (BOOL) isEqual:(id) iObject;
+
+#pragma mark Output
+/*" Output : "*/
+- (NSString *) description;
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+#pragma mark Ordering the array for relations
+- (NSString *) orderSQLForClassDescription:(MCPClassDescription *) iClassDescription;
+
+/*" Anti-crash method... "*/
+- (void) setNilValueForKey:(NSString *) iKey;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h
new file mode 100644
index 00000000..fa359e2e
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPRelation.h
@@ -0,0 +1,109 @@
+//
+// MCPRelation.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPAttribute;
+
+@class MCPJoin;
+
+typedef enum {
+ OnDeleteNullify = 1,
+ OnDeleteDeny = 2,
+ OnDeleteCascade = 3,
+ OnDeleteDefault = 4,
+ OnDeleteNoAction = 5
+} MCPRelationDeleteRule;
+
+
+@interface MCPRelation : NSObject < NSCoding > {
+@protected
+ NSString *name; // Name of the relation
+ MCPRelationDeleteRule deleteRule; // Delete rule : what to do of the destination when origin is deleted
+ MCPRelation *inverseRelation; // The inverse relation (or nil if no inverse present)
+ MCPClassDescription *origin; // The class description from which the relation originate
+ MCPClassDescription *destination; // The class description to which the relation arrives
+ NSMutableArray *joins; // Joining attributes (array of MCPJoin)
+ BOOL isToMany; // Is the relation to many (or to one)
+ BOOL isMandatory; // Is the relation mandatory for the class description (origin)
+ BOOL ownsDestination; // The origin class description owns the destination class description(ies)
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
++ (NSArray *) existingDeleteRules;
+- (NSArray *) existingDeleteRules;
+
+#pragma mark Life cycle
+- (id) initWithName:(NSString *) iName from:(MCPClassDescription *) iFrom to:(MCPClassDescription *) iTo;
+- (void) invalidateRelation;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Managing joins
+//- (MCPJoin *) addNewJoin;
+- (MCPJoin *) addJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo;
+- (void) removeJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo;
+//- (void) unjoinAttribute:(MCPAttribute *) iAttribute;
+
+#pragma mark Setters
+- (void) setDestination:(MCPClassDescription *) iDestination;
+- (void) setName:(NSString *) iName;
+- (void) setDeleteRule:(MCPRelationDeleteRule) iDeleteRule;
+- (void) setInverseRelation:(MCPRelation *) iInverseRelation;
+- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index;
+- (void) removeObjectFromJoinsAtIndex:(unsigned int) index;
+- (void) setIsToMany:(BOOL) iIsToMany;
+- (void) setIsMandatory:(BOOL) iIsMandatory;
+- (void) setOwnsDestintation:(BOOL) iOwnsDestination;
+
+#pragma mark Getters
+- (NSString *) name;
+- (MCPRelationDeleteRule) deleteRule;
+- (MCPRelation *) inverseRelation;
+- (MCPClassDescription *) origin;
+- (MCPClassDescription *) destination;
+- (NSArray *) joins;
+- (unsigned int) countOfJoins;
+- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin;
+- (BOOL) isToMany;
+- (BOOL) isMandatory;
+- (BOOL) ownsDestination;
+
+#pragma mark Some Usefull methods
+- (MCPAttribute *) destinationAttributeForOrigin:(MCPAttribute *) iFrom;
+- (MCPAttribute *) originAttributeForDestination:(MCPAttribute *) iTo;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h
new file mode 100644
index 00000000..91b69fb5
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPResult.h
@@ -0,0 +1,110 @@
+//
+// MCPResult.h
+// SMySQL
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPResult.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+#import <Foundation/Foundation.h>
+#import "mysql.h"
+#import "MCPConstants.h"
+
+
+@interface MCPResult : NSObject {
+@protected
+ MYSQL_RES *mResult; /*" The MYSQL_RES structure of the C API. "*/
+ NSArray *mNames; /*" An NSArray holding the name of the columns. "*/
+ NSDictionary *mMySQLLocales; /*" A Locales dictionary to define the locales of MySQL. "*/
+ NSStringEncoding mEncoding; /*" The encoding used by MySQL server, to ISO-1 default. "*/
+ unsigned int mNumOfFields; /*" The number of fields in the result. "*/
+ NSTimeZone *mTimeZone; /*" The time zone of the connection when the query was made. "*/
+}
+/*"
+Class maintenance
+ "*/
+
++ (void) initialize;
+
+ /*"
+ Init used #{only} by #{MCPConnection}
+ "*/
+
+- (id) initWithMySQLPtr:(MYSQL *) mySQLPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone;
+- (id) initWithResPtr:(MYSQL_RES *) mySQLResPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone;
+- (id) init;
+
+ /*"
+ General info on the result
+ "*/
+
+- (my_ulonglong) numOfRows;
+- (unsigned int) numOfFields;
+
+ /*"
+ Getting the rows
+ "*/
+
+- (void) dataSeek:(my_ulonglong) row;
+
+- (id) fetchRowAsType:(MCPReturnType) aType;
+- (NSArray *) fetchRowAsArray;
+- (NSDictionary *) fetchRowAsDictionary;
+
+ /*"
+ Getting information on columns
+ "*/
+
+- (NSArray *) fetchFieldNames;
+
+- (id) fetchTypesAsType:(MCPReturnType) aType;
+- (NSArray *) fetchTypesAsArray;
+- (NSDictionary *) fetchTypesAsDictionary;
+
+- (unsigned int) fetchFlagsAtIndex:(unsigned int) index;
+- (unsigned int) fetchFlagsForKey:(NSString *) key;
+
+- (BOOL) isBlobAtIndex:(unsigned int) index;
+- (BOOL) isBlobForKey:(NSString *) key;
+
+ /*"
+ Text data convertion to string
+ "*/
+- (NSString *) stringWithText:(NSData *) theTextData;
+
+ /*"
+ Utility method
+ "*/
+- (NSString *) description;
+
+ /*"
+ End of the scope...
+ "*/
+
+- (void) dealloc;
+
+ /*"
+ Private methods, internal use only
+ "*/
+- (const char *) cStringFromString:(NSString *) theString;
+- (NSString *) stringWithCString:(const char *) theCString;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h b/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h
new file mode 100644
index 00000000..28d6ff2f
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/MCPResultPlus.h
@@ -0,0 +1,43 @@
+//
+// MCPResultPlus.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPResultPlus.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+#import "MCPResult.h"
+
+@interface MCPResult (MCPResultPlus)
+
+/*"
+Getting a complete column as an array
+"*/
+- (NSArray *) fetchColAtIndex:(unsigned int) aCol;
+- (NSArray *) fetchColWithName:(NSString *) aColName;
+
+/*"
+Getting the complete result as 2D array
+"*/
+- (id) fetch2DResultAsType:(MCPReturnType) aType;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h b/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h
new file mode 100644
index 00000000..a3dd35d7
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/my_alloc.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typedef struct st_mem_root
+{
+ USED_MEM *free; /* blocks with free memory in it */
+ USED_MEM *used; /* blocks almost without free memory */
+ USED_MEM *pre_alloc; /* preallocated block */
+ /* if block have less memory it will be put in 'used' list */
+ unsigned int min_malloc;
+ unsigned int block_size; /* initial block size */
+ unsigned int block_num; /* allocated blocks counter */
+ /*
+ first free block in queue test counter (if it exceed
+ MAX_BLOCK_USAGE_BEFORE_DROP block will be droped in 'used' list)
+ */
+ unsigned int first_block_usage;
+
+ void (*error_handler)(void);
+} MEM_ROOT;
+#endif
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/my_list.h b/MCPKit_bundled.framework/Versions/A/Headers/my_list.h
new file mode 100644
index 00000000..f786621e
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/my_list.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+#ifndef _list_h_
+#define _list_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_list {
+ struct st_list *prev,*next;
+ void *data;
+} LIST;
+
+typedef int (*list_walk_action)(void *,void *);
+
+extern LIST *list_add(LIST *root,LIST *element);
+extern LIST *list_delete(LIST *root,LIST *element);
+extern LIST *list_cons(void *data,LIST *root);
+extern LIST *list_reverse(LIST *root);
+extern void list_free(LIST *root,unsigned int free_data);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,gptr argument);
+
+#define rest(a) ((a)->next)
+#define list_push(a,b) (a)=list_cons((b),(a))
+#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/mysql.h b/MCPKit_bundled.framework/Versions/A/Headers/mysql.h
new file mode 100644
index 00000000..d8a56126
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/mysql.h
@@ -0,0 +1,738 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ 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 */
+
+#ifndef _mysql_h
+#define _mysql_h
+
+#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
+#undef WIN
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _global_h /* If not standard header */
+#include <sys/types.h>
+#ifdef __LCC__
+#include <winsock.h> /* For windows */
+#endif
+typedef char my_bool;
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
+#define __WIN__
+#endif
+#if !defined(__WIN__)
+#define STDCALL
+#else
+#define STDCALL __stdcall
+#endif
+typedef char * gptr;
+
+#ifndef my_socket_defined
+#ifdef __WIN__
+#define my_socket SOCKET
+#else
+typedef int my_socket;
+#endif /* __WIN__ */
+#endif /* my_socket_defined */
+#endif /* _global_h */
+
+#include "mysql_com.h"
+#include "mysql_time.h"
+#include "mysql_version.h"
+#include "typelib.h"
+
+#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
+
+extern unsigned int mysql_port;
+extern char *mysql_unix_port;
+
+#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
+#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
+
+#ifdef __NETWARE__
+#pragma pack(push, 8) /* 8 byte alignment */
+#endif
+
+#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
+#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
+#define IS_BLOB(n) ((n) & BLOB_FLAG)
+#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
+#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
+#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
+
+
+typedef struct st_mysql_field {
+ char *name; /* Name of column */
+ char *org_name; /* Original column name, if an alias */
+ char *table; /* Table of column if column was a field */
+ char *org_table; /* Org table name, if table was an alias */
+ char *db; /* Database for table */
+ char *catalog; /* Catalog for table */
+ char *def; /* Default value (set by mysql_list_fields) */
+ unsigned long length; /* Width of column (create length) */
+ unsigned long max_length; /* Max width for selected set */
+ unsigned int name_length;
+ unsigned int org_name_length;
+ unsigned int table_length;
+ unsigned int org_table_length;
+ unsigned int db_length;
+ unsigned int catalog_length;
+ unsigned int def_length;
+ unsigned int flags; /* Div flags */
+ unsigned int decimals; /* Number of decimals in field */
+ unsigned int charsetnr; /* Character set */
+ enum enum_field_types type; /* Type of field. See mysql_com.h for types */
+} MYSQL_FIELD;
+
+typedef char **MYSQL_ROW; /* return data as array of strings */
+typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
+
+#ifndef _global_h
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+#endif
+
+#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
+
+typedef struct st_mysql_rows {
+ struct st_mysql_rows *next; /* list of rows */
+ MYSQL_ROW data;
+ unsigned long length;
+} MYSQL_ROWS;
+
+typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
+
+#include "my_alloc.h"
+
+typedef struct st_mysql_data {
+ my_ulonglong rows;
+ unsigned int fields;
+ MYSQL_ROWS *data;
+ MEM_ROOT alloc;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ MYSQL_ROWS **prev_ptr;
+#endif
+} MYSQL_DATA;
+
+enum mysql_option
+{
+ MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
+ MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
+ MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
+ MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
+ MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
+ MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
+ MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH
+};
+
+struct st_mysql_options {
+ unsigned int connect_timeout, read_timeout, write_timeout;
+ unsigned int port, protocol;
+ unsigned long client_flag;
+ char *host,*user,*password,*unix_socket,*db;
+ struct st_dynamic_array *init_commands;
+ char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+ char *ssl_key; /* PEM key file */
+ char *ssl_cert; /* PEM cert file */
+ char *ssl_ca; /* PEM CA file */
+ char *ssl_capath; /* PEM directory of CA-s? */
+ char *ssl_cipher; /* cipher to use */
+ char *shared_memory_base_name;
+ unsigned long max_allowed_packet;
+ my_bool use_ssl; /* if to use SSL or not */
+ my_bool compress,named_pipe;
+ /*
+ On connect, find out the replication role of the server, and
+ establish connections to all the peers
+ */
+ my_bool rpl_probe;
+ /*
+ Each call to mysql_real_query() will parse it to tell if it is a read
+ or a write, and direct it to the slave or the master
+ */
+ my_bool rpl_parse;
+ /*
+ If set, never read from a master, only from slave, when doing
+ a read that is replication-aware
+ */
+ my_bool no_master_reads;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ my_bool separate_thread;
+#endif
+ enum mysql_option methods_to_use;
+ char *client_ip;
+ /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
+ my_bool secure_auth;
+
+ /* function pointers for local infile support */
+ int (*local_infile_init)(void **, const char *, void *);
+ int (*local_infile_read)(void *, char *, unsigned int);
+ void (*local_infile_end)(void *);
+ int (*local_infile_error)(void *, char *, unsigned int);
+ void *local_infile_userdata;
+};
+
+enum mysql_status
+{
+ MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
+};
+
+enum mysql_protocol_type
+{
+ MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
+ MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
+};
+/*
+ There are three types of queries - the ones that have to go to
+ the master, the ones that go to a slave, and the adminstrative
+ type which must happen on the pivot connectioin
+*/
+enum mysql_rpl_type
+{
+ MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
+};
+
+struct st_mysql_methods;
+
+typedef struct st_mysql
+{
+ NET net; /* Communication parameters */
+ gptr connector_fd; /* ConnectorFd for SSL */
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
+ char *db;
+ struct charset_info_st *charset;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
+ my_ulonglong extra_info; /* Used by mysqlshow */
+ unsigned long thread_id; /* Id for connection in server */
+ unsigned long packet_length;
+ unsigned int port;
+ unsigned long client_flag,server_capabilities;
+ unsigned int protocol_version;
+ unsigned int field_count;
+ unsigned int server_status;
+ unsigned int server_language;
+ unsigned int warning_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me; /* If free in mysql_close */
+ my_bool reconnect; /* set to 1 if automatic reconnect */
+
+ /* session-wide random string */
+ char scramble[SCRAMBLE_LENGTH+1];
+
+ /*
+ Set if this is the original connection, not a master or a slave we have
+ added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
+ */
+ my_bool rpl_pivot;
+ /*
+ Pointers to the master, and the next slave connections, points to
+ itself if lone connection.
+ */
+ struct st_mysql* master, *next_slave;
+
+ struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
+ /* needed for send/read/store/use result to work correctly with replication */
+ struct st_mysql* last_used_con;
+
+ LIST *stmts; /* list of all statements */
+ const struct st_mysql_methods *methods;
+ void *thd;
+ /*
+ Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
+ from mysql_stmt_close if close had to cancel result set of this object.
+ */
+ my_bool *unbuffered_fetch_owner;
+} MYSQL;
+
+typedef struct st_mysql_res {
+ my_ulonglong row_count;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA *data;
+ MYSQL_ROWS *data_cursor;
+ unsigned long *lengths; /* column lengths of current row */
+ MYSQL *handle; /* for unbuffered reads */
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
+ MYSQL_ROW row; /* If unbuffered read */
+ MYSQL_ROW current_row; /* buffer to current row */
+ my_bool eof; /* Used by mysql_fetch_row */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ const struct st_mysql_methods *methods;
+} MYSQL_RES;
+
+#define MAX_MYSQL_MANAGER_ERR 256
+#define MAX_MYSQL_MANAGER_MSG 256
+
+#define MANAGER_OK 200
+#define MANAGER_INFO 250
+#define MANAGER_ACCESS 401
+#define MANAGER_CLIENT_ERR 450
+#define MANAGER_INTERNAL_ERR 500
+
+#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
+#define MYSQL_CLIENT
+#endif
+
+
+typedef struct st_mysql_manager
+{
+ NET net;
+ char *host,*user,*passwd;
+ unsigned int port;
+ my_bool free_me;
+ my_bool eof;
+ int cmd_status;
+ int last_errno;
+ char* net_buf,*net_buf_pos,*net_data_end;
+ int net_buf_size;
+ char last_error[MAX_MYSQL_MANAGER_ERR];
+} MYSQL_MANAGER;
+
+typedef struct st_mysql_parameters
+{
+ unsigned long *p_max_allowed_packet;
+ unsigned long *p_net_buffer_length;
+} MYSQL_PARAMETERS;
+
+#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
+#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
+#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
+#endif
+
+/*
+ Set up and bring down the server; to ensure that applications will
+ work when linked against either the standard client library or the
+ embedded server library, these functions should be called.
+*/
+int STDCALL mysql_server_init(int argc, char **argv, char **groups);
+void STDCALL mysql_server_end(void);
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
+
+MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
+
+/*
+ Set up and bring down a thread; these function should be called
+ for each thread in an application which opens at least one MySQL
+ connection. All uses of the connection(s) should be between these
+ function calls.
+*/
+my_bool STDCALL mysql_thread_init(void);
+void STDCALL mysql_thread_end(void);
+
+/*
+ Functions to get information from the MYSQL and MYSQL_RES structures
+ Should definitely be used if one uses shared libraries.
+*/
+
+my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
+unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
+my_bool STDCALL mysql_eof(MYSQL_RES *res);
+MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
+ unsigned int fieldnr);
+MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
+MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
+
+unsigned int STDCALL mysql_field_count(MYSQL *mysql);
+my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
+my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
+unsigned int STDCALL mysql_errno(MYSQL *mysql);
+const char * STDCALL mysql_error(MYSQL *mysql);
+const char *STDCALL mysql_sqlstate(MYSQL *mysql);
+unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
+const char * STDCALL mysql_info(MYSQL *mysql);
+unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
+const char * STDCALL mysql_character_set_name(MYSQL *mysql);
+
+MYSQL * STDCALL mysql_init(MYSQL *mysql);
+my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
+ const char *cert, const char *ca,
+ const char *capath, const char *cipher);
+my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
+ const char *passwd, const char *db);
+MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
+ const char *user,
+ const char *passwd,
+ const char *db,
+ unsigned int port,
+ const char *unix_socket,
+ unsigned long clientflag);
+int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
+int STDCALL mysql_query(MYSQL *mysql, const char *q);
+int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
+
+/* perform query on master */
+my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+/* perform query on slave */
+my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+
+/* local infile support */
+
+#define LOCAL_INFILE_ERROR_LEN 512
+
+void
+mysql_set_local_infile_handler(MYSQL *mysql,
+ int (*local_infile_init)(void **, const char *,
+ void *),
+ int (*local_infile_read)(void *, char *,
+ unsigned int),
+ void (*local_infile_end)(void *),
+ int (*local_infile_error)(void *, char*,
+ unsigned int),
+ void *);
+
+void
+mysql_set_local_infile_default(MYSQL *mysql);
+
+
+/*
+ enable/disable parsing of all queries to decide if they go on master or
+ slave
+*/
+void STDCALL mysql_enable_rpl_parse(MYSQL* mysql);
+void STDCALL mysql_disable_rpl_parse(MYSQL* mysql);
+/* get the value of the parse flag */
+int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql);
+
+/* enable/disable reads from master */
+void STDCALL mysql_enable_reads_from_master(MYSQL* mysql);
+void STDCALL mysql_disable_reads_from_master(MYSQL* mysql);
+/* get the value of the master read flag */
+my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql);
+
+enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len);
+
+/* discover the master and its slaves */
+my_bool STDCALL mysql_rpl_probe(MYSQL* mysql);
+
+/* set the master, close/free the old one, if it is not a pivot */
+int STDCALL mysql_set_master(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+int STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+
+int STDCALL mysql_shutdown(MYSQL *mysql,
+ enum mysql_enum_shutdown_level
+ shutdown_level);
+int STDCALL mysql_dump_debug_info(MYSQL *mysql);
+int STDCALL mysql_refresh(MYSQL *mysql,
+ unsigned int refresh_options);
+int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid);
+int STDCALL mysql_set_server_option(MYSQL *mysql,
+ enum enum_mysql_set_option
+ option);
+int STDCALL mysql_ping(MYSQL *mysql);
+const char * STDCALL mysql_stat(MYSQL *mysql);
+const char * STDCALL mysql_get_server_info(MYSQL *mysql);
+const char * STDCALL mysql_get_client_info(void);
+unsigned long STDCALL mysql_get_client_version(void);
+const char * STDCALL mysql_get_host_info(MYSQL *mysql);
+unsigned long STDCALL mysql_get_server_version(MYSQL *mysql);
+unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
+int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
+ const char *arg);
+void STDCALL mysql_free_result(MYSQL_RES *result);
+void STDCALL mysql_data_seek(MYSQL_RES *result,
+ my_ulonglong offset);
+MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
+ MYSQL_FIELD_OFFSET offset);
+MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
+unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
+MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
+unsigned long STDCALL mysql_escape_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
+ char *to,const char *from,
+ unsigned long length);
+void STDCALL mysql_debug(const char *debug);
+char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
+ char *to,
+ unsigned long to_length,
+ const char *from,
+ unsigned long from_length,
+ void *param,
+ char *
+ (*extend_buffer)
+ (void *, char *to,
+ unsigned long *length));
+void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
+unsigned int STDCALL mysql_thread_safe(void);
+my_bool STDCALL mysql_embedded(void);
+MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con);
+MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
+ const char* host,
+ const char* user,
+ const char* passwd,
+ unsigned int port);
+void STDCALL mysql_manager_close(MYSQL_MANAGER* con);
+int STDCALL mysql_manager_command(MYSQL_MANAGER* con,
+ const char* cmd, int cmd_len);
+int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con,
+ char* res_buf,
+ int res_buf_size);
+my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
+
+
+/*
+ The following definitions are added for the enhanced
+ client-server protocol
+*/
+
+/* statement state */
+enum enum_mysql_stmt_state
+{
+ MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
+ MYSQL_STMT_FETCH_DONE
+};
+
+
+/* bind structure */
+typedef struct st_mysql_bind
+{
+ unsigned long *length; /* output length pointer */
+ my_bool *is_null; /* Pointer to null indicator */
+ void *buffer; /* buffer to get/put data */
+ enum enum_field_types buffer_type; /* buffer type */
+ unsigned long buffer_length; /* buffer length, must be set for str/binary */
+
+ /* Following are for internal use. Set by mysql_stmt_bind_param */
+ unsigned char *inter_buffer; /* for the current data position */
+ unsigned long offset; /* offset position for char/binary fetch */
+ unsigned long internal_length; /* Used if length is 0 */
+ unsigned int param_number; /* For null count and error messages */
+ unsigned int pack_length; /* Internal length for packed data */
+ my_bool is_unsigned; /* set if integer type is unsigned */
+ my_bool long_data_used; /* If used with mysql_send_long_data */
+ my_bool internal_is_null; /* Used if is_null is 0 */
+ void (*store_param_func)(NET *net, struct st_mysql_bind *param);
+ void (*fetch_result)(struct st_mysql_bind *, unsigned char **row);
+ void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+} MYSQL_BIND;
+
+
+/* statement handler */
+typedef struct st_mysql_stmt
+{
+ MEM_ROOT mem_root; /* root allocations */
+ LIST list; /* list to keep track of all stmts */
+ MYSQL *mysql; /* connection handle */
+ MYSQL_BIND *params; /* input parameters */
+ MYSQL_BIND *bind; /* output parameters */
+ MYSQL_FIELD *fields; /* result set metadata */
+ MYSQL_DATA result; /* cached result set */
+ MYSQL_ROWS *data_cursor; /* current row in cached result */
+ /* copy of mysql->affected_rows after statement execution */
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* copy of mysql->insert_id */
+ /*
+ mysql_stmt_fetch() calls this function to fetch one row (it's different
+ for buffered, unbuffered and cursor fetch).
+ */
+ int (*read_row_func)(struct st_mysql_stmt *stmt,
+ unsigned char **row);
+ unsigned long stmt_id; /* Id for prepared statement */
+ unsigned int last_errno; /* error code */
+ unsigned int param_count; /* input parameter count */
+ unsigned int field_count; /* number of columns in result set */
+ enum enum_mysql_stmt_state state; /* statement state */
+ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
+ char sqlstate[SQLSTATE_LENGTH+1];
+ /* Types of input parameters should be sent to server */
+ my_bool send_types_to_server;
+ my_bool bind_param_done; /* input buffers were supplied */
+ my_bool bind_result_done; /* output buffers were supplied */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ /*
+ Is set to true if we need to calculate field->max_length for
+ metadata fields when doing mysql_stmt_store_result.
+ */
+ my_bool update_max_length;
+} MYSQL_STMT;
+
+enum enum_stmt_attr_type
+{
+ /*
+ When doing mysql_stmt_store_result calculate max_length attribute
+ of statement metadata. This is to be consistent with the old API,
+ where this was done automatically.
+ In the new API we do that only by request because it slows down
+ mysql_stmt_store_result sufficiently.
+ */
+ STMT_ATTR_UPDATE_MAX_LENGTH
+};
+
+
+typedef struct st_mysql_methods
+{
+ my_bool (*read_query_result)(MYSQL *mysql);
+ my_bool (*advanced_command)(MYSQL *mysql,
+ enum enum_server_command command,
+ const char *header,
+ unsigned long header_length,
+ const char *arg,
+ unsigned long arg_length,
+ my_bool skip_check);
+ MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ unsigned int fields);
+ MYSQL_RES * (*use_result)(MYSQL *mysql);
+ void (*fetch_lengths)(unsigned long *to,
+ MYSQL_ROW column, unsigned int field_count);
+ void (*flush_use_result)(MYSQL *mysql);
+#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
+ MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
+ my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
+ int (*stmt_execute)(MYSQL_STMT *stmt);
+ int (*read_binary_rows)(MYSQL_STMT *stmt);
+ int (*unbuffered_fetch)(MYSQL *mysql, char **row);
+ void (*free_embedded_thd)(MYSQL *mysql);
+ const char *(*read_statistics)(MYSQL *mysql);
+ my_bool (*next_result)(MYSQL *mysql);
+ int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
+#endif
+} MYSQL_METHODS;
+
+
+MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
+int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
+ unsigned long length);
+int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
+ unsigned int column,
+ unsigned long offset);
+int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
+unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ const void *attr);
+my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ void *attr);
+my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
+my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
+ unsigned int param_number,
+ const char *data,
+ unsigned long length);
+MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
+MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
+void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
+my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
+
+my_bool STDCALL mysql_commit(MYSQL * mysql);
+my_bool STDCALL mysql_rollback(MYSQL * mysql);
+my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
+my_bool STDCALL mysql_more_results(MYSQL *mysql);
+int STDCALL mysql_next_result(MYSQL *mysql);
+void STDCALL mysql_close(MYSQL *sock);
+
+
+/* status return codes */
+#define MYSQL_NO_DATA 100
+
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+
+#ifdef USE_OLD_FUNCTIONS
+MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
+ const char *user, const char *passwd);
+int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
+int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+#endif
+#define HAVE_MYSQL_REAL_CONNECT
+
+/*
+ The following functions are mainly exported because of mysqlbinlog;
+ They are not for general usage
+*/
+
+#define simple_command(mysql, command, arg, length, skip_check) \
+ (*(mysql)->methods->advanced_command)(mysql, command, \
+ NullS, 0, arg, length, skip_check)
+unsigned long net_safe_read(MYSQL* mysql);
+
+#ifdef __NETWARE__
+#pragma pack(pop) /* restore alignment */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _mysql_h */
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h b/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h
new file mode 100644
index 00000000..56c7f7d2
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/mysql_com.h
@@ -0,0 +1,397 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/*
+** Common definition between mysql server & client
+*/
+
+#ifndef _mysql_com_h
+#define _mysql_com_h
+
+#define NAME_LEN 64 /* Field/table name length */
+#define HOSTNAME_LENGTH 60
+#define USERNAME_LENGTH 16
+#define SERVER_VERSION_LENGTH 60
+#define SQLSTATE_LENGTH 5
+
+#define LOCAL_HOST "localhost"
+#define LOCAL_HOST_NAMEDPIPE "."
+
+
+#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
+#define MYSQL_NAMEDPIPE "MySQL"
+#define MYSQL_SERVICENAME "MySQL"
+#endif /* __WIN__ */
+
+enum enum_server_command
+{
+ COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
+ COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
+ COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
+ COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
+ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
+ COM_PREPARE, COM_EXECUTE, COM_LONG_DATA, COM_CLOSE_STMT,
+ COM_RESET_STMT, COM_SET_OPTION,
+ /* don't forget to update const char *command_name[] in sql_parse.cc */
+
+ /* Must be last */
+ COM_END
+};
+
+
+/*
+ Length of random string sent by server on handshake; this is also length of
+ obfuscated password, recieved from client
+*/
+#define SCRAMBLE_LENGTH 20
+#define SCRAMBLE_LENGTH_323 8
+/* length of password stored in the db: new passwords are preceeded with '*' */
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
+
+
+#define NOT_NULL_FLAG 1 /* Field can't be NULL */
+#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
+#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
+#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
+#define BLOB_FLAG 16 /* Field is a blob */
+#define UNSIGNED_FLAG 32 /* Field is unsigned */
+#define ZEROFILL_FLAG 64 /* Field is zerofill */
+#define BINARY_FLAG 128 /* Field is binary */
+
+/* The following are only sent to new clients */
+#define ENUM_FLAG 256 /* field is an enum */
+#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
+#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
+#define SET_FLAG 2048 /* field is a set */
+#define NUM_FLAG 32768 /* Field is num (for clients) */
+#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
+#define GROUP_FLAG 32768 /* Intern: Group field */
+#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
+#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
+
+#define REFRESH_GRANT 1 /* Refresh grant tables */
+#define REFRESH_LOG 2 /* Start on new log file */
+#define REFRESH_TABLES 4 /* close all tables */
+#define REFRESH_HOSTS 8 /* Flush host cache */
+#define REFRESH_STATUS 16 /* Flush status variables */
+#define REFRESH_THREADS 32 /* Flush thread cache */
+#define REFRESH_SLAVE 64 /* Reset master info and restart slave
+ thread */
+#define REFRESH_MASTER 128 /* Remove all bin logs in the index
+ and truncate the index */
+
+/* The following can't be set with mysql_refresh() */
+#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
+#define REFRESH_FAST 32768 /* Intern flag */
+
+/* RESET (remove all queries) from query cache */
+#define REFRESH_QUERY_CACHE 65536
+#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
+#define REFRESH_DES_KEY_FILE 0x40000L
+#define REFRESH_USER_RESOURCES 0x80000L
+
+#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
+#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
+#define CLIENT_LONG_FLAG 4 /* Get all column flags */
+#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
+#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
+#define CLIENT_COMPRESS 32 /* Can use compression protocol */
+#define CLIENT_ODBC 64 /* Odbc client */
+#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
+#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
+#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
+#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
+#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
+#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */
+#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */
+#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31)
+
+#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
+#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
+#define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */
+#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
+#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
+#define SERVER_QUERY_NO_INDEX_USED 32
+#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
+
+#define MYSQL_ERRMSG_SIZE 512
+#define NET_READ_TIMEOUT 30 /* Timeout on read */
+#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
+#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
+
+struct st_vio; /* Only C */
+typedef struct st_vio Vio;
+
+#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */
+#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */
+#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */
+#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
+#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
+#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
+#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
+
+typedef struct st_net {
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
+ Vio* vio;
+ unsigned char *buff,*buff_end,*write_pos,*read_pos;
+ my_socket fd; /* For Perl DBI/dbd */
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
+ my_bool compress;
+ /*
+ The following variable is set if we are doing several queries in one
+ command ( as in LOAD TABLE ... FROM MASTER ),
+ and do not want to confuse the client with OK at the wrong time
+ */
+ unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned int *return_status;
+ unsigned char reading_or_writing;
+ char save_char;
+ my_bool no_send_ok;
+ /*
+ Pointer to query object in query cache, do not equal NULL (0) for
+ queries in cache that have not stored its results yet
+ */
+#endif
+ char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
+ unsigned int last_errno;
+ unsigned char error;
+ gptr query_cache_query;
+ my_bool report_error; /* We should report error (we have unreported error) */
+ my_bool return_errno;
+} NET;
+
+#define packet_error (~(unsigned long) 0)
+
+enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
+ MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
+ MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
+ MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
+ MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
+ MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
+ MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
+ MYSQL_TYPE_NEWDATE,
+ MYSQL_TYPE_ENUM=247,
+ MYSQL_TYPE_SET=248,
+ MYSQL_TYPE_TINY_BLOB=249,
+ MYSQL_TYPE_MEDIUM_BLOB=250,
+ MYSQL_TYPE_LONG_BLOB=251,
+ MYSQL_TYPE_BLOB=252,
+ MYSQL_TYPE_VAR_STRING=253,
+ MYSQL_TYPE_STRING=254,
+ MYSQL_TYPE_GEOMETRY=255
+
+};
+
+/* For backward compatibility */
+#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
+#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
+#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
+#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
+#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
+#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
+#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
+#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
+#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
+#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
+#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
+#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
+#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
+#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
+#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
+#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
+#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
+#define FIELD_TYPE_SET MYSQL_TYPE_SET
+#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
+#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
+#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
+#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
+#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
+#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
+#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
+#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
+#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
+
+
+/* Shutdown/kill enums and constants */
+
+/* Bits for THD::killable. */
+#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
+#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
+#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
+#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
+
+enum mysql_enum_shutdown_level {
+ /*
+ We want levels to be in growing order of hardness (because we use number
+ comparisons). Note that DEFAULT does not respect the growing property, but
+ it's ok.
+ */
+ SHUTDOWN_DEFAULT = 0,
+ /* wait for existing connections to finish */
+ SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT,
+ /* wait for existing trans to finish */
+ SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS,
+ /* wait for existing updates to finish (=> no partial MyISAM update) */
+ SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE,
+ /* flush InnoDB buffers and other storage engines' buffers*/
+ SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1),
+ /* don't flush InnoDB buffers, flush other storage engines' buffers*/
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
+ /* Now the 2 levels of the KILL command */
+#if MYSQL_VERSION_ID >= 50000
+ KILL_QUERY= 254,
+#endif
+ KILL_CONNECTION= 255
+};
+
+/* options for mysql_set_option */
+enum enum_mysql_set_option
+{
+ MYSQL_OPTION_MULTI_STATEMENTS_ON,
+ MYSQL_OPTION_MULTI_STATEMENTS_OFF
+};
+
+#define net_new_transaction(net) ((net)->pkt_nr=0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+my_bool my_net_init(NET *net, Vio* vio);
+void my_net_local_init(NET *net);
+void net_end(NET *net);
+void net_clear(NET *net);
+my_bool net_realloc(NET *net, unsigned long length);
+my_bool net_flush(NET *net);
+my_bool my_net_write(NET *net,const char *packet,unsigned long len);
+my_bool net_write_command(NET *net,unsigned char command,
+ const char *header, unsigned long head_len,
+ const char *packet, unsigned long len);
+int net_real_write(NET *net,const char *packet,unsigned long len);
+unsigned long my_net_read(NET *net);
+
+/*
+ The following function is not meant for normal usage
+ Currently it's used internally by manager.c
+*/
+struct sockaddr;
+int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
+ unsigned int timeout);
+
+struct rand_struct {
+ unsigned long seed1,seed2,max_value;
+ double max_value_dbl;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+ /* The following is for user defined functions */
+
+enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
+
+typedef struct st_udf_args
+{
+ unsigned int arg_count; /* Number of arguments */
+ enum Item_result *arg_type; /* Pointer to item_results */
+ char **args; /* Pointer to argument */
+ unsigned long *lengths; /* Length of string arguments */
+ char *maybe_null; /* Set to 1 for all maybe_null args */
+} UDF_ARGS;
+
+ /* This holds information about the result */
+
+typedef struct st_udf_init
+{
+ my_bool maybe_null; /* 1 if function can return NULL */
+ unsigned int decimals; /* for real functions */
+ unsigned long max_length; /* For string functions */
+ char *ptr; /* free pointer for function data */
+ my_bool const_item; /* 0 if result is independent of arguments */
+} UDF_INIT;
+
+ /* Constants when using compression */
+#define NET_HEADER_SIZE 4 /* standard header size */
+#define COMP_HEADER_SIZE 3 /* compression header extra size */
+
+ /* Prototypes to password functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ These functions are used for authentication by client and server and
+ implemented in sql/password.c
+*/
+
+void randominit(struct rand_struct *, unsigned long seed1,
+ unsigned long seed2);
+double my_rnd(struct rand_struct *);
+void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
+
+void hash_password(unsigned long *to, const char *password, unsigned int password_len);
+void make_scrambled_password_323(char *to, const char *password);
+void scramble_323(char *to, const char *message, const char *password);
+my_bool check_scramble_323(const char *, const char *message,
+ unsigned long *salt);
+void get_salt_from_password_323(unsigned long *res, const char *password);
+void make_password_from_salt_323(char *to, const unsigned long *salt);
+
+void make_scrambled_password(char *to, const char *password);
+void scramble(char *to, const char *message, const char *password);
+my_bool check_scramble(const char *reply, const char *message,
+ const unsigned char *hash_stage2);
+void get_salt_from_password(unsigned char *res, const char *password);
+void make_password_from_salt(char *to, const unsigned char *hash_stage2);
+
+/* end of password.c */
+
+char *get_tty_password(char *opt_message);
+const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
+
+/* Some other useful functions */
+
+my_bool my_init(void);
+int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
+my_bool my_thread_init(void);
+void my_thread_end(void);
+
+#ifdef _global_h
+ulong STDCALL net_field_length(uchar **packet);
+my_ulonglong net_field_length_ll(uchar **packet);
+char *net_store_length(char *pkg, ulonglong length);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
+#define MYSQL_STMT_HEADER 4
+#define MYSQL_LONG_DATA_HEADER 6
+
+#endif
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h b/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h
new file mode 100644
index 00000000..603af8e8
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/mysql_embed.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/* Defines that are unique to the embedded version of MySQL */
+
+#ifdef EMBEDDED_LIBRARY
+
+/* Things we don't need in the embedded version of MySQL */
+/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
+
+#undef HAVE_PSTACK /* No stacktrace */
+#undef HAVE_DLOPEN /* No udf functions */
+#undef HAVE_OPENSSL
+#undef HAVE_ISAM
+#undef HAVE_SMEM /* No shared memory */
+#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
+
+#define DONT_USE_RAID
+
+#endif /* EMBEDDED_LIBRARY */
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h b/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h
new file mode 100644
index 00000000..5f4fc12c
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/mysql_time.h
@@ -0,0 +1,56 @@
+/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+
+ 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 */
+
+#ifndef _mysql_time_h_
+#define _mysql_time_h_
+
+/*
+ Time declarations shared between the server and client API:
+ you should not add anything to this header unless it's used
+ (and hence should be visible) in mysql.h.
+ If you're looking for a place to add new time-related declaration,
+ it's most likely my_time.h. See also "C API Handling of Date
+ and Time Values" chapter in documentation.
+*/
+
+enum enum_mysql_timestamp_type
+{
+ MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
+ MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+};
+
+
+/*
+ Structure which is used to represent datetime values inside MySQL.
+
+ We assume that values in this structure are normalized, i.e. year <= 9999,
+ month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
+ in server such as my_system_gmt_sec() or make_time() family of functions
+ rely on this (actually now usage of make_*() family relies on a bit weaker
+ restriction). Also functions that produce MYSQL_TIME as result ensure this.
+ There is one exception to this rule though if this structure holds time
+ value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
+ bigger values.
+*/
+typedef struct st_mysql_time
+{
+ unsigned int year, month, day, hour, minute, second;
+ unsigned long second_part;
+ my_bool neg;
+ enum enum_mysql_timestamp_type time_type;
+} MYSQL_TIME;
+
+#endif /* _mysql_time_h_ */
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h b/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h
new file mode 100644
index 00000000..9f38c100
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/mysql_version.h
@@ -0,0 +1,29 @@
+/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
+ This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mysql_version_h
+#define _mysql_version_h
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define PROTOCOL_VERSION 10
+#define MYSQL_SERVER_VERSION "4.1.12"
+#define MYSQL_BASE_VERSION "mysqld-4.1"
+#define MYSQL_SERVER_SUFFIX_DEF ""
+#define FRM_VER 6
+#define MYSQL_VERSION_ID 40112
+#define MYSQL_PORT 3306
+#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
+#define MYSQL_CONFIG_NAME "my"
+#define MYSQL_COMPILATION_COMMENT "Source distribution"
+
+/* mysqld compile time options */
+#endif /* _CUSTOMCONFIG_ */
+
+#ifndef LICENSE
+#define LICENSE GPL
+#endif /* LICENSE */
+
+#endif /* _mysql_version_h */
diff --git a/MCPKit_bundled.framework/Versions/A/Headers/typelib.h b/MCPKit_bundled.framework/Versions/A/Headers/typelib.h
new file mode 100644
index 00000000..4d6a90ad
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Headers/typelib.h
@@ -0,0 +1,34 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+
+#ifndef _typelib_h
+#define _typelib_h
+
+typedef struct st_typelib { /* Different types saved here */
+ unsigned int count; /* How many types */
+ const char *name; /* Name of typelib */
+ const char **type_names;
+ unsigned int *type_lengths;
+} TYPELIB;
+
+extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
+extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
+extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+
+extern TYPELIB sql_protocol_typelib;
+
+#endif /* _typelib_h */
diff --git a/MCPKit_bundled.framework/Versions/A/MCPKit_bundled b/MCPKit_bundled.framework/Versions/A/MCPKit_bundled
new file mode 100755
index 00000000..16b016f0
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/MCPKit_bundled
Binary files differ
diff --git a/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h b/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h
new file mode 100644
index 00000000..2426b16a
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPAttribute+Private.h
@@ -0,0 +1,35 @@
+//
+// MCPAttribute+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPAttribute.h"
+
+@interface MCPAttribute (Private)
+
+
+#pragma mark Setters
+- (void) setValueClassName:(NSString *) iClassName;
+
+#pragma mark Pseudo-getters
+
+@end
+
diff --git a/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h b/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h
new file mode 100644
index 00000000..fa4ffab3
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPClassDescription+Private.h
@@ -0,0 +1,41 @@
+//
+// MCPClassDescription+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import "MCPClassDescription.h"
+
+@interface MCPClassDescription (Private)
+
+#pragma mark Setters
+- (void) setAttributes:(NSArray *) iAttributes;
+- (void) setRelations:(NSArray *) iRelations;
+- (void) insertObject:(MCPRelation *) iRelation inIncomingsAtIndex:(unsigned int) index;
+- (void) removeObjectFromIncomingsAtIndex:(unsigned int) index;
+
+#pragma mark Getters
+- (NSArray *) incomings;
+- (unsigned int) countOfIncomings;
+- (MCPRelation *) objectInIncomingsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfIncoming:(id) iRelation;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h b/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h
new file mode 100644
index 00000000..aa286787
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/PrivateHeaders/MCPRelation+Private.h
@@ -0,0 +1,41 @@
+//
+// MCPRelation+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPRelation.h"
+
+@interface MCPRelation (Private)
+
+#pragma mark Making some work
+- (void) invalidateJoins; // Check that the joins are realistics.
+
+#pragma mark Setters
+- (void) setOrigin:(MCPClassDescription *) iOrigin;
+//- (void) setJoins:(NSArray *) iJoins;
+
+#pragma mark Getters
+- (MCPModel *) model;
+
+#pragma mark Fro the controller layer and the UI
+- (void) addNewDefaultJoin;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings
new file mode 100644
index 00000000..8177d470
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist
new file mode 100644
index 00000000..e0a16f9b
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>JavaSourceSubpath</key>
+ <string>_MCPConnectionWindow_EOArchive_English.java</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java
new file mode 100644
index 00000000..5ba619a6
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java
@@ -0,0 +1,424 @@
+// _MCPConnectionWindow_EOArchive_English.java
+// Generated by EnterpriseObjects palette at vendredi 14 mai 2004 11 h 08 Europe/Amsterdam
+
+import com.webobjects.eoapplication.*;
+import com.webobjects.eocontrol.*;
+import com.webobjects.eointerface.*;
+import com.webobjects.eointerface.swing.*;
+import com.webobjects.foundation.*;
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import javax.swing.text.*;
+
+public class _MCPConnectionWindow_EOArchive_English extends com.webobjects.eoapplication.EOArchive {
+ IBHelpConnector _iBHelpConnector0, _iBHelpConnector1, _iBHelpConnector2, _iBHelpConnector3;
+ com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1;
+ com.webobjects.eointerface.swing.EOTextField _nsTextField0, _nsTextField1, _nsTextField2, _nsTextField3, _nsTextField4, _nsTextField5, _nsTextField6, _nsTextField7, _nsTextField8, _nsTextField9;
+ com.webobjects.eointerface.swing.EOView _nsBox0, _nsBox1, _nsBox2, _nsBox3;
+ javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4;
+ javax.swing.JPanel _nsView0, _nsView1;
+ javax.swing.JPasswordField _nsSecureTextField0;
+
+ public _MCPConnectionWindow_EOArchive_English(Object owner, NSDisposableRegistry registry) {
+ super(owner, registry);
+ }
+
+ protected void _construct() {
+ Object owner = _owner();
+ EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null;
+ Object replacement;
+
+ super._construct();
+
+ _nsBox3 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView");
+ _nsBox2 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mCreateButton")) != null)) {
+ _nsButton4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsButton4");
+ } else {
+ _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Create DB"), "NSButton2");
+ }
+
+ _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+ _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Go"), "NSButton");
+ _nsBox1 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView");
+ _nsBox0 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1");
+ _nsTextField9 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField23");
+ _nsTextField8 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField22");
+ _nsTextField7 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField6 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "window")) != null)) {
+ _eoFrame1 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_eoFrame1");
+ } else {
+ _eoFrame1 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Window");
+ }
+
+ _nsView1 = (JPanel)_eoFrame1.getContentPane();
+ _iBHelpConnector3 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector2 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector1 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector0 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField5 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField5");
+ } else {
+ _nsTextField5 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField4");
+ } else {
+ _nsTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField11");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent")) != null)) {
+ _nsTextField3 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField3");
+ } else {
+ _nsTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField2 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField2");
+ } else {
+ _nsTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ }
+
+ _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField.nextFocusableComponent")) != null)) {
+ _nsButton0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsButton0");
+ } else {
+ _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("OK"), "NSButton");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField")) != null)) {
+ _nsSecureTextField0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JPasswordField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsSecureTextField0");
+ } else {
+ _nsSecureTextField0 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField");
+ }
+
+ _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordSheet")) != null)) {
+ _eoFrame0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_eoFrame0");
+ } else {
+ _eoFrame0 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Panel");
+ }
+
+ _nsView0 = (JPanel)_eoFrame0.getContentPane();
+ }
+
+ protected void _awaken() {
+ super._awaken();
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _connect(_eoFrame0, _owner(), "delegate");
+ }
+
+ _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton0), ""));
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _connect(_owner(), _eoFrame0, "mPasswordSheet");
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _connect(_owner(), _nsSecureTextField0, "mPasswordField");
+ }
+
+ if (_replacedObjects.objectForKey("_nsButton4") == null) {
+ _connect(_owner(), _nsButton4, "mCreateButton");
+ }
+
+ _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCreate", _nsButton4), ""));
+ _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCancel", _nsButton3), ""));
+ _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doGo", _nsButton2), ""));
+
+ if (_replacedObjects.objectForKey("_eoFrame1") == null) {
+ _connect(_owner(), _eoFrame1, "window");
+ }
+
+ _nsTextField2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField2), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _connect(_owner(), _nsTextField3, "mLoginField");
+ }
+
+ _nsTextField3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField3), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _connect(_owner(), _nsTextField4, "mDatabaseField");
+ }
+
+ _nsTextField4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField4), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _connect(_owner(), _nsTextField5, "mPortField");
+ }
+
+ _nsTextField5.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField5), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _connect(_owner(), _nsTextField2, "mHostField");
+ }
+
+ _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton1), ""));
+ }
+
+ protected void _init() {
+ super._init();
+ if (!(_nsBox2.getLayout() instanceof EOViewLayout)) { _nsBox2.setLayout(new EOViewLayout()); }
+ _nsBox3.setSize(401, 1);
+ _nsBox3.setLocation(2, 2);
+ ((EOViewLayout)_nsBox2.getLayout()).setAutosizingMask(_nsBox3, EOViewLayout.MinYMargin);
+ _nsBox2.add(_nsBox3);
+ _nsBox2.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN));
+
+ if (_replacedObjects.objectForKey("_nsButton4") == null) {
+ _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton4.setMargin(new Insets(0, 2, 0, 2));
+ }
+
+ _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton3.setMargin(new Insets(0, 2, 0, 2));
+ _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton2.setMargin(new Insets(0, 2, 0, 2));
+ if (!(_nsBox0.getLayout() instanceof EOViewLayout)) { _nsBox0.setLayout(new EOViewLayout()); }
+ _nsBox1.setSize(328, 1);
+ _nsBox1.setLocation(2, 2);
+ ((EOViewLayout)_nsBox0.getLayout()).setAutosizingMask(_nsBox1, EOViewLayout.MinYMargin);
+ _nsBox0.add(_nsBox1);
+ _nsBox0.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN));
+ _setFontForComponent(_nsTextField9, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField9.setEditable(false);
+ _nsTextField9.setOpaque(false);
+ _nsTextField9.setText("Port :");
+ _nsTextField9.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField9.setSelectable(true);
+ _nsTextField9.setEnabled(true);
+ _nsTextField9.setBorder(null);
+ _setFontForComponent(_nsTextField8, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField8.setEditable(false);
+ _nsTextField8.setOpaque(false);
+ _nsTextField8.setText("Database :");
+ _nsTextField8.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField8.setSelectable(true);
+ _nsTextField8.setEnabled(true);
+ _nsTextField8.setBorder(null);
+ _setFontForComponent(_nsTextField7, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField7.setEditable(false);
+ _nsTextField7.setOpaque(false);
+ _nsTextField7.setText("Login :");
+ _nsTextField7.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField7.setSelectable(true);
+ _nsTextField7.setEnabled(true);
+ _nsTextField7.setBorder(null);
+ _setFontForComponent(_nsTextField6, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField6.setEditable(false);
+ _nsTextField6.setOpaque(false);
+ _nsTextField6.setText("Host :");
+ _nsTextField6.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField6.setSelectable(true);
+ _nsTextField6.setEnabled(true);
+ _nsTextField6.setBorder(null);
+ if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); }
+ _nsTextField6.setSize(72, 17);
+ _nsTextField6.setLocation(11, 17);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField6, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField6);
+ _nsTextField7.setSize(72, 17);
+ _nsTextField7.setLocation(11, 47);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField7, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField7);
+ _nsTextField8.setSize(72, 17);
+ _nsTextField8.setLocation(11, 77);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField8, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField8);
+ _nsTextField9.setSize(72, 17);
+ _nsTextField9.setLocation(11, 107);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField9, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField9);
+ _nsTextField2.setSize(242, 22);
+ _nsTextField2.setLocation(88, 14);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField2, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField2);
+ _nsTextField3.setSize(242, 22);
+ _nsTextField3.setLocation(88, 44);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField3, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField3);
+ _nsTextField4.setSize(242, 22);
+ _nsTextField4.setLocation(88, 74);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField4, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField4);
+ _nsTextField5.setSize(242, 22);
+ _nsTextField5.setLocation(88, 104);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField5, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField5);
+ _nsBox0.setSize(332, 5);
+ _nsBox0.setLocation(5, 130);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsBox0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsBox0);
+ _nsButton2.setSize(77, 26);
+ _nsButton2.setLocation(256, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton2);
+ _nsButton3.setSize(77, 26);
+ _nsButton3.setLocation(172, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton3);
+ _nsButton4.setSize(96, 26);
+ _nsButton4.setLocation(12, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton4);
+
+ if (_replacedObjects.objectForKey("_eoFrame1") == null) {
+ _nsView1.setSize(342, 180);
+ _eoFrame1.setTitle("New Connection Parameters");
+ _eoFrame1.setLocation(111, 492);
+ _eoFrame1.setSize(342, 180);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _connect(_nsTextField5, _nsTextField2, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _setFontForComponent(_nsTextField5, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField5.setEditable(true);
+ _nsTextField5.setOpaque(true);
+ _nsTextField5.setText("");
+ _nsTextField5.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField5.setSelectable(true);
+ _nsTextField5.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _connect(_nsTextField4, _nsTextField5, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _setFontForComponent(_nsTextField4, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField4.setEditable(true);
+ _nsTextField4.setOpaque(true);
+ _nsTextField4.setText("");
+ _nsTextField4.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField4.setSelectable(true);
+ _nsTextField4.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _connect(_nsTextField3, _nsTextField4, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _setFontForComponent(_nsTextField3, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField3.setEditable(true);
+ _nsTextField3.setOpaque(true);
+ _nsTextField3.setText("");
+ _nsTextField3.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField3.setSelectable(true);
+ _nsTextField3.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _connect(_nsTextField2, _nsTextField3, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _setFontForComponent(_nsTextField2, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField2.setEditable(true);
+ _nsTextField2.setOpaque(true);
+ _nsTextField2.setText("");
+ _nsTextField2.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField2.setSelectable(true);
+ _nsTextField2.setEnabled(true);
+ }
+
+ _connect(_nsButton1, _nsSecureTextField0, "nextFocusableComponent");
+ _setFontForComponent(_nsButton1, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton1.setMargin(new Insets(0, 2, 0, 2));
+
+ if (_replacedObjects.objectForKey("_nsButton0") == null) {
+ _connect(_nsButton0, _nsButton1, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsButton0") == null) {
+ _setFontForComponent(_nsButton0, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton0.setMargin(new Insets(0, 2, 0, 2));
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _connect(_nsSecureTextField0, _nsButton0, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _setFontForComponent(_nsSecureTextField0, "Lucida Grande", 13, Font.PLAIN);
+ _nsSecureTextField0.setEditable(true);
+ _nsSecureTextField0.setOpaque(true);
+ _nsSecureTextField0.setText("");
+ _nsSecureTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsSecureTextField0.setEnabled(true);
+ }
+
+ _setFontForComponent(_nsTextField1, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField1.setEditable(false);
+ _nsTextField1.setOpaque(false);
+ _nsTextField1.setText("Password :");
+ _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField1.setSelectable(false);
+ _nsTextField1.setEnabled(true);
+ _nsTextField1.setBorder(null);
+ _setFontForComponent(_nsTextField0, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField0.setEditable(false);
+ _nsTextField0.setOpaque(false);
+ _nsTextField0.setText("Please enter your password for DB server ");
+ _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
+ _nsTextField0.setSelectable(false);
+ _nsTextField0.setEnabled(true);
+ _nsTextField0.setBorder(null);
+ if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); }
+ _nsTextField0.setSize(395, 17);
+ _nsTextField0.setLocation(11, 14);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView0.add(_nsTextField0);
+ _nsTextField1.setSize(73, 17);
+ _nsTextField1.setLocation(11, 51);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView0.add(_nsTextField1);
+ _nsSecureTextField0.setSize(314, 22);
+ _nsSecureTextField0.setLocation(89, 48);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsSecureTextField0, EOViewLayout.WidthSizable | EOViewLayout.MinYMargin);
+ _nsView0.add(_nsSecureTextField0);
+ _nsBox2.setSize(405, 5);
+ _nsBox2.setLocation(5, 37);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsBox2, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsBox2);
+ _nsButton0.setSize(77, 26);
+ _nsButton0.setLocation(329, 88);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton0);
+ _nsButton1.setSize(77, 26);
+ _nsButton1.setLocation(245, 88);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton1);
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _nsView0.setSize(415, 124);
+ _eoFrame0.setTitle("Password");
+ _eoFrame0.setLocation(95, 422);
+ _eoFrame0.setSize(415, 124);
+ }
+ }
+}
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib
new file mode 100644
index 00000000..e9dc7fa3
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib
@@ -0,0 +1,28 @@
+{
+ IBClasses = (
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {
+ askPassword = id;
+ doCancel = id;
+ doCreate = id;
+ doGo = id;
+ modifyInstance = id;
+ passwordClick = id;
+ };
+ CLASS = MCPConnectionWinCont;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ mCreateButton = NSButton;
+ mDatabaseField = NSTextField;
+ mHostField = NSTextField;
+ mLoginField = NSTextField;
+ mPasswordField = NSTextField;
+ mPasswordSheet = NSPanel;
+ mPortField = NSTextField;
+ };
+ SUPERCLASS = NSWindowController;
+ }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib
new file mode 100644
index 00000000..10b70ee6
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>193 200 356 240 0 0 1280 832 </string>
+ <key>IBFramework Version</key>
+ <string>364.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>5</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>7F44</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib
new file mode 100644
index 00000000..d0ebc199
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib
Binary files differ
diff --git a/MCPKit_bundled.framework/Versions/A/Resources/Info.plist b/MCPKit_bundled.framework/Versions/A/Resources/Info.plist
new file mode 100644
index 00000000..c5731f54
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/A/Resources/Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>MCPKit_bundled</string>
+ <key>CFBundleIdentifier</key>
+ <string>net.chocolatnoir.MCPKit_bundled</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPAttribute.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPAttribute.h
new file mode 100644
index 00000000..7044718d
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPAttribute.h
@@ -0,0 +1,104 @@
+//
+// MCPAttribute.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPRelation;
+@class MCPJoin;
+
+
+@interface MCPAttribute : NSObject < NSCoding > {
+@protected
+ MCPClassDescription *classDescription; // ClassDescription of which the attribute is attribute
+ NSString *name; // Name of the attribute (Obj-C side)
+ Class valueClass; // Class used by the attribute (or NULL if the internal type is not an object)
+ NSString *internalType; // Name of the class, or type used for the class definition
+ NSString *externalName; // Name of the corresponding column in the DB
+ NSString *externalType; // Type used to store the attribute (in the DB)
+ unsigned int width; // Width (for storing by the DB)
+ BOOL allowsNull; // Attribute can be null
+ BOOL autoGenerated; // Attribute is auto generated by the DB
+ BOOL isPartOfKey; // Attribute is part of theprimary key of the class description
+ BOOL isPartOfIdentity; // Attribute is part of the idclass description of the class description
+ BOOL hasAccessor; // Does this attribute have an accessor
+ id defaultValue; // Default value of the attribute
+ NSMutableArray *joins; // An array of the joins using this attribute
+// NSMutableArray *relations; // An array of the relations (MCPRelation) that use this attribue as join
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initForClassDescription:(MCPClassDescription *) iClassDescription withName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setValueClass:(Class) iValueClass;
+- (void) setInternalType:(NSString *) iInternalType;
+- (void) setExternalType:(NSString *) iExternalType;
+- (void) setExternalName:(NSString *) iExternalName;
+- (void) setWidth:(unsigned int) iWidth;
+- (void) setAllowsNull:(BOOL) iAllowsNull;
+- (void) setAutoGenerated:(BOOL) iAutoGenerated;
+- (void) setIsPartOfKey:(BOOL) iIsPartOfKey;
+- (void) setIsPartOfIdentity:(BOOL) iIsPartOfIdentity;
+- (void) setHasAccessor:(BOOL) iHasAccessor;
+- (void) setDefaultValue:(id) iDefaultValue;
+- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index;
+- (void) removeObjectFromJoinsAtIndex:(unsigned int) index;
+//- (void) addRelation:(MCPRelation *) iRelation;
+//- (void) removeRelation:(MCPRelation *) iRelation;
+
+#pragma mark Getters
+- (MCPClassDescription *) classDescription;
+- (NSString *) name;
+- (Class) valueClass;
+- (NSString *) valueClassName;
+- (NSString *) internalType;
+- (NSString *) externalName;
+- (NSString *) externalType;
+- (unsigned int) width;
+- (BOOL) allowsNull;
+- (BOOL) autoGenerated;
+- (BOOL) isPartOfKey;
+- (BOOL) isPartOfIdentity;
+- (BOOL) hasAccessor;
+- (id) defaultValue;
+- (unsigned int) countOfJoins;
+- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription+MCPEntreprise.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription+MCPEntreprise.h
new file mode 100644
index 00000000..a41a4617
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription+MCPEntreprise.h
@@ -0,0 +1,42 @@
+//
+// MCPClassDescription+MCPEntreprise.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+#import "MCPClassDescription.h"
+
+@interface MCPClassDescription (MCPEntreprise)
+
+#pragma mark Pseudo getters (for NSClassDescription overload)
+- (NSArray *) attributeKeys;
+- (NSString *) inverseRelationshipKey:(NSString *) relationshipKey;
+- (NSArray *) toManyRelationshipKeys;
+- (NSArray *) toOneRelationshipKeys;
+
+#pragma mark Specifics for MCPObject
+- (NSArray *) primaryKeyAttributes;
+- (NSArray *) identityAttributes;
+- (MCPAttribute *) attributeWithName: (NSString *) iName;
+- (MCPRelation *) relationWithName:(NSString *) iRelationName;
+- (BOOL) singleIntAutoGenKey;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription.h
new file mode 100644
index 00000000..26ca382e
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPClassDescription.h
@@ -0,0 +1,91 @@
+//
+// MCPClassDescription.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPAttribute;
+@class MCPRelation;
+@class MCPRelation;
+
+@interface MCPClassDescription : NSClassDescription < NSCoding > {
+@protected
+ MCPModel *model; // The model where we stand
+ NSString *name; // Name of the class (can not use className, as it is already used by NSObject).
+ NSString *externalName; // Name of the table for storage
+ NSMutableArray *attributes; // array of the attributes of the class description
+ NSMutableArray *relations; // array of the relations of the class description (both origin and destination)
+ NSMutableArray *incomings; // array if the INCOMMING relation (just to be sure we are able to invalidate those if necessary)
+ Class representedClass; // the class object that the description represents.
+}
+
+#warning hasSingleIntAutoGenKey should be a method returning the obvious (from the name).
+// This correspond to the method singleIntAutoGenKey in the category MCPEntreprise... which name should I change...
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initInModel:(MCPModel *) iModel withName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Making new attributes and relations
+- (MCPAttribute *) addNewAttributeWithName:(NSString *) iName inPosition:(int) index;
+- (MCPRelation *) addNewRelationTo:(MCPClassDescription *) iTo name:(NSString *) iName inPostion:(int) index;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setExternalName:(NSString *) iExternalName;
+- (void) insertObject:(MCPAttribute *) iAttribute inAttributesAtIndex:(unsigned int) index;
+- (void) removeObjectFromAttributesAtIndex:(unsigned int) index;
+- (void) insertObject:(MCPRelation *) iRelation inRelationsAtIndex:(unsigned int) index;
+- (void) removeObjectFromRelationsAtIndex:(unsigned int) index;
+
+#pragma mark Getters
+- (MCPModel *) model;
+- (NSString *) name;
+- (NSString *) externalName;
+- (NSArray *) attributes;
+- (unsigned int) countOfAttributes;
+- (MCPAttribute *) objectInAttributesAtIndex:(unsigned int) index;
+- (unsigned int) indexOfAttribute:(id) iAttribute;
+- (NSArray *) relations;
+- (unsigned int) countOfRelations;
+- (MCPRelation *) objectInRelationsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfRelation:(id) iRelation;
+- (Class) representedClass;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+#pragma mark Output for logging
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+//- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+//- (NSString *) description;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPConnection.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPConnection.h
new file mode 100644
index 00000000..5b2f2eaf
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPConnection.h
@@ -0,0 +1,158 @@
+//
+// MCPConnection.h
+// SMySQL
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPConnection.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+#import <Foundation/Foundation.h>
+#import "mysql.h"
+#import "MCPConstants.h"
+
+
+@class MCPResult;
+
+// Deafult connection option
+extern const unsigned int kMCPConnectionDefaultOption;
+
+// Default socket (from the mysql.h used at compile time)
+extern const char *kMCPConnectionDefaultSocket;
+
+// Added to mysql error code
+extern const unsigned int kMCPConnectionNotInited;
+
+// The length of the truncation if required:
+extern const unsigned int kLengthOfTruncationForLog;
+
+@interface MCPConnection : NSObject {
+@protected
+ MYSQL *mConnection; /*"The inited MySQL connection."*/
+ BOOL mConnected; /*"Reflect the fact that the connection is already in place or not."*/
+ NSStringEncoding mEncoding; /*"The encoding used by MySQL server, to ISO-1 default."*/
+ NSTimeZone *mTimeZone; /*"The time zone of the session."*/
+ unsigned int mConnectionFlags; /*"The flags to be used for the connection to the database."*/
+}
+/*"
+Getting default of MySQL
+"*/
++ (NSDictionary *) getMySQLLocales;
++ (NSStringEncoding) encodingForMySQLEncoding:(const char *) mysqlEncoding;
++ (NSStringEncoding) defaultMySQLEncoding;
+
+/*"
+Class maintenance
+"*/
++ (void) initialize;
++ (void) setLogQueries:(BOOL) iLogFlag;
++ (void) setTruncateLongFieldInLogs:(BOOL) iTruncFlag;
++ (BOOL) truncateLongField;
+
+/*"
+Initialisation
+"*/
+- (id) init;
+// Port to 0 to use the default port
+- (id) initToHost:(NSString *) host withLogin:(NSString *) login password:(NSString *) pass usingPort:(int) port;
+- (id) initToSocket:(NSString *) socket withLogin:(NSString *) login password:(NSString *) pass;
+
+- (BOOL) setConnectionOption:(int) option toValue:(BOOL) value;
+// Port to 0 to use the default port
+- (BOOL) connectWithLogin:(NSString *) login password:(NSString *) pass host:(NSString *) host port:(int) port socket:(NSString *) socket;
+
+- (BOOL) selectDB:(NSString *) dbName;
+
+/*"
+Errors information
+"*/
+
+- (NSString *) getLastErrorMessage;
+- (unsigned int) getLastErrorID;
+- (BOOL) isConnected;
+- (BOOL) checkConnection;
+
+/*"
+Queries
+"*/
+
+- (NSString *) prepareBinaryData:(NSData *) theData;
+- (NSString *) prepareString:(NSString *) theString;
+- (NSString *) quoteObject:(id) theObject;
+
+- (MCPResult *) queryString:(NSString *) query;
+
+- (my_ulonglong) affectedRows;
+- (my_ulonglong) insertId;
+
+
+/*"
+Getting description of the database structure
+"*/
+- (MCPResult *) listDBs;
+- (MCPResult *) listDBsLike:(NSString *) dbsName;
+- (MCPResult *) listTables;
+- (MCPResult *) listTablesLike:(NSString *) tablesName;
+// Next method uses SHOW TABLES FROM db to be sure that the db is not changed during this call.
+- (MCPResult *) listTablesFromDB:(NSString *) dbName like:(NSString *) tablesName;
+- (MCPResult *) listFieldsFromTable:(NSString *) tableName;
+- (MCPResult *) listFieldsFromTable:(NSString *) tableName like:(NSString *) fieldsName;
+
+
+/*"
+Server information and control
+"*/
+
+- (NSString *) clientInfo;
+- (NSString *) hostInfo;
+- (NSString *) serverInfo;
+- (NSNumber *) protoInfo;
+- (MCPResult *) listProcesses;
+- (BOOL) killProcess:(unsigned long) pid;
+
+//- (BOOL)createDBWithName:(NSString *)dbName;
+//- (BOOL)dropDBWithName:(NSString *)dbName;
+
+/*"
+Disconnection
+"*/
+- (void) disconnect;
+- (void) dealloc;
+
+/*"
+String encoding concerns (C string type to NSString).
+It's unlikely that users of the framework needs to use these methods which are used internally
+"*/
+- (void) setEncoding:(NSStringEncoding) theEncoding;
+- (NSStringEncoding) encoding;
+
+- (const char *) cStringFromString:(NSString *) theString;
+- (NSString *) stringWithCString:(const char *) theCString;
+
+/*"
+Text data convertion to string
+"*/
+- (NSString *) stringWithText:(NSData *) theTextData;
+
+/*" Time Zone handling ."*/
+- (void) setTimeZone:(NSTimeZone *) iTimeZone;
+- (NSTimeZone *) timeZone;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPConnectionWinCont.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPConnectionWinCont.h
new file mode 100644
index 00000000..98195e9f
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPConnectionWinCont.h
@@ -0,0 +1,52 @@
+//
+// MCPConnectionWinCont.h
+// Vacations
+//
+// Created by Serge Cohen on Mon May 26 2003.
+// Copyright (c) 2003 ARP/wARP. All rights reserved.
+//
+
+#import <AppKit/AppKit.h>
+
+// External classes, forward reference.
+@class MCPDocument;
+
+
+@interface MCPConnectionWinCont : NSWindowController
+{
+ IBOutlet NSTextField *mHostField;
+ IBOutlet NSTextField *mLoginField;
+ IBOutlet NSTextField *mDatabaseField;
+ IBOutlet NSTextField *mPortField;
+
+ IBOutlet NSPanel *mPasswordSheet;
+ IBOutlet NSTextField *mPasswordField;
+
+ IBOutlet NSButton *mCreateButton;
+// MCPDocument *mMCPDocument;
+}
+
+
+/*" Actions for Interface Builder "*/
+/*" For the clear text information. "*/
+- (IBAction) doGo:(id) sender;
+- (IBAction) doCancel:(id) sender;
+- (IBAction) doCreate:(id) sender;
+- (IBAction) modifyInstance:(id) sender;
+
+
+/*" For the password. "*/
+- (IBAction) passwordClick:(id) sender;
+- (IBAction) askPassword:(id) sender;
+- (NSString *) Password;
+
+
+/*" Overrides of NSWindowController method, to adapt to this Window Controller. "*/
+- (id) init;
+- (void) dealloc;
+- (void) windowDidLoad;
+
+/*" Getting the button for creating a DB. "*/
+- (NSButton*) getCreateButton;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPConstants.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPConstants.h
new file mode 100644
index 00000000..cccdfe8c
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPConstants.h
@@ -0,0 +1,33 @@
+//
+// MCPConstants.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPConstants.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+typedef enum {
+ MCPTypeArray = 1,
+ MCPTypeDictionary = 2,
+ MCPTypeFlippedArray = 3,
+ MCPTypeFlippedDictionary = 4
+} MCPReturnType;
+
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPDocument.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPDocument.h
new file mode 100644
index 00000000..28f375da
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPDocument.h
@@ -0,0 +1,95 @@
+//
+// MCPDocument.h
+// Vacations
+//
+// Created by Serge Cohen on Sat May 24 2003.
+// Copyright (c) 2003 ARP/wARP. All rights reserved.
+//
+
+
+#import <Cocoa/Cocoa.h>
+
+// External classes, forward reference.
+@class MCPConnection;
+@class MCPResult;
+
+
+@interface MCPDocument : NSDocument
+{
+ BOOL MCPConInfoNeeded, MCPPassNeeded;
+ NSString *MCPHost, *MCPLogin, *MCPDatabase;
+ unsigned int MCPPort;
+ MCPConnection *MCPConnect;
+
+// Handling of windows.
+ NSWindowController *MCPMainWinCont;
+ Class MCPConnectedWinCont; /*" Window controller used once the connection is established (As a class). "*/
+// Handling the DB creation state.
+ NSString *MCPModelName;
+ BOOL MCPWillCreateNewDB;
+}
+
+/*" Class Maintenance "*/
++ (void) initialize;
+
+// Standards
+/*" Initialisation and deallocation "*/
+- (id) init;
+- (void) dealloc;
+
+/*" Connection to the databse related "*/
+- (MCPResult *) MCPqueryString:(NSString *) query;
+- (unsigned int) MCPinsertRow:(NSString *) insert;
+- (MCPConnection *) MCPgetConnection;
+
+// Accessors
+/*" Accessors to the parameters of the connection "*/
+- (void) setMCPHost:(NSString *) theHost;
+- (void) setMCPLogin:(NSString *) theLogin;
+- (void) setMCPDatabase:(NSString *) theDatabase;
+- (void) setMCPPort:(unsigned int) thePort;
+- (void) setMCPConInfoNeeded:(BOOL) theConInfoNeeded;
+
+- (NSString *) MCPHost;
+- (NSString *) MCPLogin;
+- (NSString *) MCPDatabase;
+- (unsigned int) MCPPort;
+- (BOOL) MCPConInfoNeeded;
+- (BOOL) MCPPassNeeded;
+
+- (BOOL) MCPisConnected;
+- (MCPConnection *) MCPConnect;
+
+/*" Accessor to the window generated once the connection is established "*/
+- (void) setMCPConnectedWinCont:(Class) theConnectedWinCont;
+
+- (Class) MCPConnectedWinCont;
+
+/*" Accessors to the main window (connection or connected window), through their window controller. "*/
+- (NSWindowController *) MCPMainWinCont;
+
+/*" Accessors to the DB creation instances. "*/
+- (void) setMCPModelName:(NSString *) theModelName;
+- (void) setMCPWillCreateNewDB:(BOOL) theWillCreateNewDB;
+
+- (NSString *) MCPModelName;
+- (BOOL) MCPWillCreateNewDB;
+
+/*" Practical creation of the database, from a model file. "*/
+- (BOOL) createModelDB;
+
+/*" Overrides of NSDocument methods. "*/
+// Managing the document in file format
+- (NSData *) dataRepresentationOfType:(NSString *) aType;
+- (BOOL)loadDataRepresentation:(NSData *) data ofType:(NSString *)aType;
+
+// Managing NSWindowController(s)
+- (NSArray *) makeWindowControllers;
+- (void) windowControllerDidLoadNib:(NSWindowController *) aController;
+
+/*" Method to take care of the password sheet. "*/
+// Callback from sheet
+- (void) MCPPasswordSheetDidEnd:(NSWindow *) sheet returnCode:(int) returnCode contextInfo:(void *) contextInfo;
+
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPEntrepriseNotifications.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPEntrepriseNotifications.h
new file mode 100644
index 00000000..824051e6
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPEntrepriseNotifications.h
@@ -0,0 +1,35 @@
+//
+// MCPEntrepriseNotifications.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+// The instance are defined in MMDocument.h
+
+#pragma mark Name for notification
+
+extern NSString *MCPModelChangedNotification;
+extern NSString *MCPClassDescriptionChangedNotification;
+extern NSString *MCPAttributeChangedNotification;
+extern NSString *MCPRelationChangedNotification;
+
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPFastQueries.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPFastQueries.h
new file mode 100644
index 00000000..cea22a11
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPFastQueries.h
@@ -0,0 +1,47 @@
+//
+// MCPFastQueries.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPFastQueries.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+#import "MCPConnection.h"
+
+@interface MCPConnection (MCPFastQueries)
+/*"
+For insert queries, get directly the Id of the newly inserted row
+"*/
+- (my_ulonglong) insertQuery:(NSString *) aQuery;
+- (my_ulonglong) updateQuery:(NSString *) aQuery;
+
+
+/*"
+Returns directly a proper NS object, or a collection (NSArray, NSDictionary...).
+"*/
+- (id) getFirstFieldFromQuery:(NSString *) aQuery;
+- (id) getFirstRowFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType;
+- (id) getAllRowsFromQuery:(NSString *) aQuery asType:(MCPReturnType) aType;
+- (NSArray *) getQuery:(NSString *) aQuery colWithIndex:(unsigned int) aCol;
+- (NSArray *) getQuery:(NSString *) aQuery colWithName:(NSString *) aColName;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPJoin.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPJoin.h
new file mode 100644
index 00000000..4784a30b
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPJoin.h
@@ -0,0 +1,68 @@
+//
+// MCPJoin.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 18/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPAttribute;
+@class MCPRelation;
+@class MCPRelation;
+
+@interface MCPJoin : NSObject < NSCoding > {
+@protected
+// Note that NONE of these attributes are retained!!!
+// Instead all these objects are notified of the existence of the join
+// and are responsible to invalidate/delete it if necessary.
+ MCPRelation *relation;
+ MCPAttribute *origin;
+ MCPAttribute *destination;
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initForRelation:(MCPRelation *) iRelation from:(MCPAttribute *) iOrigin to:(MCPAttribute *) iDestination;
+- (void) invalidate;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Setters
+// No setter for relation : should be set at init time!
+- (void) setOrigin:(MCPAttribute *) iOrigin;
+- (void) setDestination:(MCPAttribute *) iDestination;
+
+#pragma mark Getters
+- (MCPRelation *) relation;
+- (MCPAttribute *) origin;
+- (MCPAttribute *) destination;
+- (unsigned int) index;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPKit_bundled.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPKit_bundled.h
new file mode 100644
index 00000000..3242a9dd
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPKit_bundled.h
@@ -0,0 +1,38 @@
+/*
+ * MCPKit_bundled.h
+ * MCPKit
+ *
+ * Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+ * Copyright (c) 2001 Serge Cohen.
+ *
+ * This code 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 any later version.
+ *
+ * This code 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.
+ *
+ * For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+ * write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * More info at <http://mysql-cocoa.sourceforge.net/>
+ *
+ *
+ * $Id: MCPKit_bundled.h 335 2006-01-08 21:14:07Z serge $
+ * $Author: serge $
+ */
+
+#import <Foundation/Foundation.h>
+
+#import <MCPKit_bundled/MCPConstants.h>
+#import <MCPKit_bundled/MCPNull.h>
+#import <MCPKit_bundled/MCPResult.h>
+#import <MCPKit_bundled/MCPConnection.h>
+#import <MCPKit_bundled/MCPNumber.h>
+#import <MCPKit_bundled/MCPResultPlus.h>
+#import <MCPKit_bundled/MCPFastQueries.h>
+#import "mysql.h"
+//#import <SMySQL/mysql.h>
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPModel+MCPEntreprise.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPModel+MCPEntreprise.h
new file mode 100644
index 00000000..069c9862
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPModel+MCPEntreprise.h
@@ -0,0 +1,32 @@
+//
+// MCPModel+MCPEntreprise.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 01/11/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPModel.h"
+
+@interface MCPModel (MCPEntreprise)
+
+#pragma mark Work as a class description server
+- (void) registerAsClassDescriptionServer;
+- (void) registerDescriptionForClass:(NSNotification *) notification;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPModel.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPModel.h
new file mode 100644
index 00000000..362fed72
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPModel.h
@@ -0,0 +1,78 @@
+//
+// MCPModel.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import <Foundation/Foundation.h>
+
+@class MCPClassDescription;
+@class MCPAttribute;
+@class MCPRelation;
+
+@interface MCPModel : NSObject < NSCoding > {
+@protected
+ NSString *name; // Name of the model ... useless.
+ NSMutableArray *classDescriptions; // Order of the class descriptions in the model.
+ BOOL usesInnoDBTables; // The database should use InnoDB tables.
+// Might add a string holding définition of tables.
+// Might also add some sort of template for generated files (at least the header).
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
+#pragma mark Life cycle
+- (id) initWithName:(NSString *) iName;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Making new class description
+- (MCPClassDescription *) addNewClassDescriptionWithName:(NSString *) iName inPosition:(int) index;
+
+#pragma mark Setters
+- (void) setName:(NSString *) iName;
+- (void) setClassDescriptions:(NSArray *) iClassDescriptions;
+- (void) insertObject:(MCPClassDescription *) iClassDescription inClassDescriptionsAtIndex:(unsigned int) index;
+- (void) removeObjectFromClassDescriptionsAtIndex:(unsigned int) index;
+- (void) setUsesInnoDBTables:(BOOL) iUsesInnoDB;
+
+// Deprecated : non KVC
+//- (void) removeClassDescription:(MCPClassDescription *) iClassDescription;
+//- (void) addClassDescription:(MCPClassDescription *) iClassDescription;
+
+#pragma mark Getters
+- (NSString *) name;
+- (NSArray *) classDescriptions;
+- (unsigned int) countOfClassDescriptions;
+- (MCPClassDescription *) objectInClassDescriptionsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfClassDescription:(id) iClassDescription;
+- (BOOL) usesInnoDBTables;
+
+// Deprecated : non KVC
+//- (MCPClassDescription *) classDescriptionWithClassName:(NSString *) iClassDescriptionClassName;
+
+#pragma mark Output for logging
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPNull.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPNull.h
new file mode 100644
index 00000000..1fa0babd
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPNull.h
@@ -0,0 +1,36 @@
+//
+// MCPNull.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Sun Jun 02 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPNull.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+
+@interface NSObject (MCPNSNullTest)
+
+/*"
+Addin to NSObject.
+"*/
+- (BOOL) isNSNull;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPNumber.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPNumber.h
new file mode 100644
index 00000000..f4851e2a
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPNumber.h
@@ -0,0 +1,84 @@
+//
+// MCPNumber.h
+// NumberTest
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPNumber.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+
+@interface MCPNumber : NSNumber {
+ const char *typeCode;
+ NSNumber *number;
+}
+
+- (id) initWithChar:(char) value;
+- (id) initWithUnsignedChar:(unsigned char) value;
+- (id) initWithShort:(short) value;
+- (id) initWithUnsignedShort:(unsigned short) value;
+- (id) initWithInt:(int) value;
+- (id) initWithUnsignedInt:(unsigned int) value;
+- (id) initWithLong:(long) value;
+- (id) initWithUnsignedLong:(unsigned long) value;
+- (id) initWithLongLong:(long long) value;
+- (id) initWithUnsignedLongLong:(unsigned long long) value;
+- (id) initWithFloat:(float) value;
+- (id) initWithDouble:(double) value;
+- (id) initWithBool:(BOOL) value;
+
++ (MCPNumber *) numberWithChar:(char) value;
++ (MCPNumber *) numberWithUnsignedChar:(unsigned char) value;
++ (MCPNumber *) numberWithShort:(short) value;
++ (MCPNumber *) numberWithUnsignedShort:(unsigned short) value;
++ (MCPNumber *) numberWithInt:(int) value;
++ (MCPNumber *) numberWithUnsignedInt:(unsigned int) value;
++ (MCPNumber *) numberWithLong:(long) value;
++ (MCPNumber *) numberWithUnsignedLong:(unsigned long) value;
++ (MCPNumber *) numberWithLongLong:(long long) value;
++ (MCPNumber *) numberWithUnsignedLongLong:(unsigned long long) value;
++ (MCPNumber *) numberWithFloat:(float) value;
++ (MCPNumber *) numberWithDouble:(double) value;
++ (MCPNumber *) numberWithBool:(BOOL) value;
+
+- (void) dealloc;
+
+/*" Most important : NSNumber primitive methods: "*/
+- (const char *) objCType;
+- (void) getValue:(void *) buffer;
+
+//- (NSString *) descriptionWithLocale:(NSDictionary *) aLocale; // Not Primitive, but buggy...
+
+- (char) charValue;
+- (unsigned char) unsignedCharValue;
+- (short) shortValue;
+- (unsigned short) unsignedShortValue;
+- (int) intValue;
+- (unsigned int) unsignedIntValue;
+- (long) longValue;
+- (unsigned long) unsignedLongValue;
+- (long long) longLongValue;
+- (unsigned long long) unsignedLongLongValue;
+- (float) floatValue;
+- (double) doubleValue;
+- (BOOL) boolValue;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPObject.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPObject.h
new file mode 100644
index 00000000..2496180a
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPObject.h
@@ -0,0 +1,106 @@
+//
+// MCPObject.h
+// MCPKit
+//
+// Created by Serge Cohen on Wed May 19 2004.
+// Copyright (c) 2004 Serge Cohen. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+/*" Possible return code on some operations of the database interaction. "*/
+typedef enum {
+ MCPDBReturnUnknown = 0, /*"Unknown state, should not happen."*/
+ MCPDBReturnDeleted = 1, /*"The entry have been successfuly deleted from DB."*/
+ MCPDBReturnUsed = 2, /*"The entry can not be removed, because some entries are still connected to it (some delete restrict/inhibit delete)."*/
+ MCPDBReturnNone = 3, /*"No entry exist with this Id."*/
+ MCPDBReturnNew = 4, /*"The entry was indeed new and inserted in the database."*/
+ MCPDBReturnUpdated = 5, /*"The entry was updated in the DB."*/
+ MCPDBReturnIncompleteKey = 6, /*"Part of the primary key is missing, action not taken."*/
+ MCPDBReturnMultiple = 7, /*"Multiple rows are found with a query supposed to return at most one row."*/
+ MCPDBReturnNoIdentity = 8, /*"The object does not have attributes that defines identity."*/
+ MCPDBReturnNoKey = 9, /*"There is no primary key defined for this entity."*/
+ MCPDBReturnNoConnection = 10, /*"The MCPObject is not having a connection."*/
+ MCPDBReturnWrongRelationOrigin = 11, /*"Looking for a relation not which origin is not of the specified class."*/
+ MCPDBReturnWrongRelationCardinality = 12, /*"Using a method assuming a cardinality of the relation while the relation as the other one."*/
+ MCPDBReturnNoSuchRelation = 13, /*"There is no relation with such a name starting from this class."*/
+ MCPDBReturnNotTarget = 14, /*"Tried to remove an object from a relation, while the objects does NOT belong to the relation."*/
+ MCPDBReturnOK = 100 /*"Everything went OK."*/
+} MCPDBReturnCode;
+
+@class MCPConnection;
+@class MCPClassDescription;
+@class MCPRelation;
+
+@interface MCPObject : NSObject {
+ MCPClassDescription *classDescription;
+ MCPConnection *connection;
+}
+
+#pragma mark Life of the Object
+/*" Life of the object "*/
+- (id) init;
+- (id) initWithDictionary:(NSDictionary *) dictionary;
+
+- (void) dealloc;
+
+- (void) setAttributesToDefault;
+
+#pragma mark Accessors
+/*" Accessor(s) "*/
+- (MCPClassDescription *) classDescription;
+- (MCPConnection *) connection;
+
+- (void) setConnection:(MCPConnection *) iConnection;
+
+#pragma mark Database interface
+/*" Database interface "*/
+- (id) readFromDBRow:(NSDictionary *) iDictionary withTableName:(NSString *) iTableName;
+- (MCPDBReturnCode) setPrimaryKey:(id) iDictionary andFetchFromDB:(MCPConnection *) iConnection;
+//- (MCPDBReturnCode) setPrimaryKey:(NSDictionary *) iDictionary andFetchFromDB:(MCPConnection *) iConnection;
+- (NSDictionary *) checkDBId; // the returned dictionary contains a MCPDBReturnCode key with the return code.
+- (NSDictionary *) saveInDB; // the returned dictionary contains a MCPDBReturnCode key with the return code.
+- (MCPDBReturnCode) getAutoGenerated;
+- (MCPDBReturnCode) updateInDB;
+- (MCPDBReturnCode) deleteInDB;
++ (MCPDBReturnCode) deleteInDBUsingConnection:(MCPConnection *) iConnection withId:(id) iId;
+
+#pragma mark Handling relations
+/*" Handling realtions "*/
+- (id) getTargetOfRelation:(MCPRelation *) iRelation;
+- (id) getTargetOfRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) setTarget:(id) iTarget forRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) setTarget:(id) iTarget forRelationNamed:(NSString *) iRelationName;
+- (unsigned int) countTargetForRelation:(MCPRelation *) iRelation;
+- (unsigned int) countTargetForRelationNamed:(NSString *) iRelationName;
+- (MCPObject *) getTargetOfRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex;
+- (MCPObject *) getTargetOfRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex;
+- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) addTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelation:(MCPRelation *) iRelation;
+- (MCPDBReturnCode) removeTarget:(MCPObject *) iTarget toRelationNamed:(NSString *) iRelationName;
+- (MCPDBReturnCode) removeTargetToRelation:(MCPRelation *) iRelation atIndex:(unsigned int) iIndex;
+- (MCPDBReturnCode) removeTargetToRelationNamed:(NSString *) iRelationName atIndex:(unsigned int) iIndex;
+- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelation:(MCPRelation *) iRelation;
+- (unsigned int) indexOfTarget:(MCPObject *) iTarget inRelationNamed:(NSString *) iRelationName;
+
+#pragma mark Utilities
+/*" Utility methods "*/
+- (id) defaultValueForKey:(NSString *) iKey;
+- (NSDictionary *) primaryKey;
+
+/*" Testing equality (VERY important for relation management)"*/
+- (BOOL) isEqual:(id) iObject;
+
+#pragma mark Output
+/*" Output : "*/
+- (NSString *) description;
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+#pragma mark Ordering the array for relations
+- (NSString *) orderSQLForClassDescription:(MCPClassDescription *) iClassDescription;
+
+/*" Anti-crash method... "*/
+- (void) setNilValueForKey:(NSString *) iKey;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPRelation.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPRelation.h
new file mode 100644
index 00000000..fa359e2e
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPRelation.h
@@ -0,0 +1,109 @@
+//
+// MCPRelation.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import <Foundation/Foundation.h>
+
+@class MCPModel;
+@class MCPClassDescription;
+@class MCPAttribute;
+
+@class MCPJoin;
+
+typedef enum {
+ OnDeleteNullify = 1,
+ OnDeleteDeny = 2,
+ OnDeleteCascade = 3,
+ OnDeleteDefault = 4,
+ OnDeleteNoAction = 5
+} MCPRelationDeleteRule;
+
+
+@interface MCPRelation : NSObject < NSCoding > {
+@protected
+ NSString *name; // Name of the relation
+ MCPRelationDeleteRule deleteRule; // Delete rule : what to do of the destination when origin is deleted
+ MCPRelation *inverseRelation; // The inverse relation (or nil if no inverse present)
+ MCPClassDescription *origin; // The class description from which the relation originate
+ MCPClassDescription *destination; // The class description to which the relation arrives
+ NSMutableArray *joins; // Joining attributes (array of MCPJoin)
+ BOOL isToMany; // Is the relation to many (or to one)
+ BOOL isMandatory; // Is the relation mandatory for the class description (origin)
+ BOOL ownsDestination; // The origin class description owns the destination class description(ies)
+}
+
+#pragma mark Class methods
++ (void) initialize;
+
++ (NSArray *) existingDeleteRules;
+- (NSArray *) existingDeleteRules;
+
+#pragma mark Life cycle
+- (id) initWithName:(NSString *) iName from:(MCPClassDescription *) iFrom to:(MCPClassDescription *) iTo;
+- (void) invalidateRelation;
+- (void) dealloc;
+
+#pragma mark NSCoding protocol
+- (id) initWithCoder:(NSCoder *) decoder;
+- (void) encodeWithCoder:(NSCoder *) encoder;
+
+#pragma mark Managing joins
+//- (MCPJoin *) addNewJoin;
+- (MCPJoin *) addJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo;
+- (void) removeJoinFrom:(MCPAttribute *) iFrom to:(MCPAttribute *) iTo;
+//- (void) unjoinAttribute:(MCPAttribute *) iAttribute;
+
+#pragma mark Setters
+- (void) setDestination:(MCPClassDescription *) iDestination;
+- (void) setName:(NSString *) iName;
+- (void) setDeleteRule:(MCPRelationDeleteRule) iDeleteRule;
+- (void) setInverseRelation:(MCPRelation *) iInverseRelation;
+- (void) insertObject:(MCPJoin *) iJoin inJoinsAtIndex:(unsigned int) index;
+- (void) removeObjectFromJoinsAtIndex:(unsigned int) index;
+- (void) setIsToMany:(BOOL) iIsToMany;
+- (void) setIsMandatory:(BOOL) iIsMandatory;
+- (void) setOwnsDestintation:(BOOL) iOwnsDestination;
+
+#pragma mark Getters
+- (NSString *) name;
+- (MCPRelationDeleteRule) deleteRule;
+- (MCPRelation *) inverseRelation;
+- (MCPClassDescription *) origin;
+- (MCPClassDescription *) destination;
+- (NSArray *) joins;
+- (unsigned int) countOfJoins;
+- (MCPJoin *) objectInJoinsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfJoinIdenticalTo:(id) iJoin;
+- (BOOL) isToMany;
+- (BOOL) isMandatory;
+- (BOOL) ownsDestination;
+
+#pragma mark Some Usefull methods
+- (MCPAttribute *) destinationAttributeForOrigin:(MCPAttribute *) iFrom;
+- (MCPAttribute *) originAttributeForDestination:(MCPAttribute *) iTo;
+
+#pragma mark Some general methods:
+- (BOOL) isEqual:(id) iObject;
+- (NSString *) descriptionWithLocale:(NSDictionary *) locale;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPResult.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPResult.h
new file mode 100644
index 00000000..91b69fb5
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPResult.h
@@ -0,0 +1,110 @@
+//
+// MCPResult.h
+// SMySQL
+//
+// Created by serge cohen (serge.cohen@m4x.org) on Sat Dec 08 2001.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPResult.h 335 2006-01-08 21:14:07Z serge $
+// $Author: serge $
+
+
+#import <Foundation/Foundation.h>
+#import "mysql.h"
+#import "MCPConstants.h"
+
+
+@interface MCPResult : NSObject {
+@protected
+ MYSQL_RES *mResult; /*" The MYSQL_RES structure of the C API. "*/
+ NSArray *mNames; /*" An NSArray holding the name of the columns. "*/
+ NSDictionary *mMySQLLocales; /*" A Locales dictionary to define the locales of MySQL. "*/
+ NSStringEncoding mEncoding; /*" The encoding used by MySQL server, to ISO-1 default. "*/
+ unsigned int mNumOfFields; /*" The number of fields in the result. "*/
+ NSTimeZone *mTimeZone; /*" The time zone of the connection when the query was made. "*/
+}
+/*"
+Class maintenance
+ "*/
+
++ (void) initialize;
+
+ /*"
+ Init used #{only} by #{MCPConnection}
+ "*/
+
+- (id) initWithMySQLPtr:(MYSQL *) mySQLPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone;
+- (id) initWithResPtr:(MYSQL_RES *) mySQLResPtr encoding:(NSStringEncoding) theEncoding timeZone:(NSTimeZone *) iTimeZone;
+- (id) init;
+
+ /*"
+ General info on the result
+ "*/
+
+- (my_ulonglong) numOfRows;
+- (unsigned int) numOfFields;
+
+ /*"
+ Getting the rows
+ "*/
+
+- (void) dataSeek:(my_ulonglong) row;
+
+- (id) fetchRowAsType:(MCPReturnType) aType;
+- (NSArray *) fetchRowAsArray;
+- (NSDictionary *) fetchRowAsDictionary;
+
+ /*"
+ Getting information on columns
+ "*/
+
+- (NSArray *) fetchFieldNames;
+
+- (id) fetchTypesAsType:(MCPReturnType) aType;
+- (NSArray *) fetchTypesAsArray;
+- (NSDictionary *) fetchTypesAsDictionary;
+
+- (unsigned int) fetchFlagsAtIndex:(unsigned int) index;
+- (unsigned int) fetchFlagsForKey:(NSString *) key;
+
+- (BOOL) isBlobAtIndex:(unsigned int) index;
+- (BOOL) isBlobForKey:(NSString *) key;
+
+ /*"
+ Text data convertion to string
+ "*/
+- (NSString *) stringWithText:(NSData *) theTextData;
+
+ /*"
+ Utility method
+ "*/
+- (NSString *) description;
+
+ /*"
+ End of the scope...
+ "*/
+
+- (void) dealloc;
+
+ /*"
+ Private methods, internal use only
+ "*/
+- (const char *) cStringFromString:(NSString *) theString;
+- (NSString *) stringWithCString:(const char *) theCString;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/MCPResultPlus.h b/MCPKit_bundled.framework/Versions/Current/Headers/MCPResultPlus.h
new file mode 100644
index 00000000..28d6ff2f
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/MCPResultPlus.h
@@ -0,0 +1,43 @@
+//
+// MCPResultPlus.h
+// SMySQL
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on Mon Jun 03 2002.
+// Copyright (c) 2001 Serge Cohen.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+// $Id: MCPResultPlus.h 334 2006-01-08 20:32:38Z serge $
+// $Author: serge $
+
+#import <Foundation/Foundation.h>
+
+#import "MCPResult.h"
+
+@interface MCPResult (MCPResultPlus)
+
+/*"
+Getting a complete column as an array
+"*/
+- (NSArray *) fetchColAtIndex:(unsigned int) aCol;
+- (NSArray *) fetchColWithName:(NSString *) aColName;
+
+/*"
+Getting the complete result as 2D array
+"*/
+- (id) fetch2DResultAsType:(MCPReturnType) aType;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/my_alloc.h b/MCPKit_bundled.framework/Versions/Current/Headers/my_alloc.h
new file mode 100644
index 00000000..a3dd35d7
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/my_alloc.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/*
+ Data structures for mysys/my_alloc.c (root memory allocator)
+*/
+
+#ifndef _my_alloc_h
+#define _my_alloc_h
+
+#define ALLOC_MAX_BLOCK_TO_DROP 4096
+#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
+
+typedef struct st_used_mem
+{ /* struct for once_alloc (block) */
+ struct st_used_mem *next; /* Next block in use */
+ unsigned int left; /* memory left in block */
+ unsigned int size; /* size of block */
+} USED_MEM;
+
+
+typedef struct st_mem_root
+{
+ USED_MEM *free; /* blocks with free memory in it */
+ USED_MEM *used; /* blocks almost without free memory */
+ USED_MEM *pre_alloc; /* preallocated block */
+ /* if block have less memory it will be put in 'used' list */
+ unsigned int min_malloc;
+ unsigned int block_size; /* initial block size */
+ unsigned int block_num; /* allocated blocks counter */
+ /*
+ first free block in queue test counter (if it exceed
+ MAX_BLOCK_USAGE_BEFORE_DROP block will be droped in 'used' list)
+ */
+ unsigned int first_block_usage;
+
+ void (*error_handler)(void);
+} MEM_ROOT;
+#endif
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/my_list.h b/MCPKit_bundled.framework/Versions/Current/Headers/my_list.h
new file mode 100644
index 00000000..f786621e
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/my_list.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+#ifndef _list_h_
+#define _list_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct st_list {
+ struct st_list *prev,*next;
+ void *data;
+} LIST;
+
+typedef int (*list_walk_action)(void *,void *);
+
+extern LIST *list_add(LIST *root,LIST *element);
+extern LIST *list_delete(LIST *root,LIST *element);
+extern LIST *list_cons(void *data,LIST *root);
+extern LIST *list_reverse(LIST *root);
+extern void list_free(LIST *root,unsigned int free_data);
+extern unsigned int list_length(LIST *);
+extern int list_walk(LIST *,list_walk_action action,gptr argument);
+
+#define rest(a) ((a)->next)
+#define list_push(a,b) (a)=list_cons((b),(a))
+#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/mysql.h b/MCPKit_bundled.framework/Versions/Current/Headers/mysql.h
new file mode 100644
index 00000000..d8a56126
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/mysql.h
@@ -0,0 +1,738 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ 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 */
+
+#ifndef _mysql_h
+#define _mysql_h
+
+#ifdef __CYGWIN__ /* CYGWIN implements a UNIX API */
+#undef WIN
+#undef _WIN
+#undef _WIN32
+#undef _WIN64
+#undef __WIN__
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _global_h /* If not standard header */
+#include <sys/types.h>
+#ifdef __LCC__
+#include <winsock.h> /* For windows */
+#endif
+typedef char my_bool;
+#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
+#define __WIN__
+#endif
+#if !defined(__WIN__)
+#define STDCALL
+#else
+#define STDCALL __stdcall
+#endif
+typedef char * gptr;
+
+#ifndef my_socket_defined
+#ifdef __WIN__
+#define my_socket SOCKET
+#else
+typedef int my_socket;
+#endif /* __WIN__ */
+#endif /* my_socket_defined */
+#endif /* _global_h */
+
+#include "mysql_com.h"
+#include "mysql_time.h"
+#include "mysql_version.h"
+#include "typelib.h"
+
+#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
+
+extern unsigned int mysql_port;
+extern char *mysql_unix_port;
+
+#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
+#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
+
+#ifdef __NETWARE__
+#pragma pack(push, 8) /* 8 byte alignment */
+#endif
+
+#define IS_PRI_KEY(n) ((n) & PRI_KEY_FLAG)
+#define IS_NOT_NULL(n) ((n) & NOT_NULL_FLAG)
+#define IS_BLOB(n) ((n) & BLOB_FLAG)
+#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
+#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
+#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
+
+
+typedef struct st_mysql_field {
+ char *name; /* Name of column */
+ char *org_name; /* Original column name, if an alias */
+ char *table; /* Table of column if column was a field */
+ char *org_table; /* Org table name, if table was an alias */
+ char *db; /* Database for table */
+ char *catalog; /* Catalog for table */
+ char *def; /* Default value (set by mysql_list_fields) */
+ unsigned long length; /* Width of column (create length) */
+ unsigned long max_length; /* Max width for selected set */
+ unsigned int name_length;
+ unsigned int org_name_length;
+ unsigned int table_length;
+ unsigned int org_table_length;
+ unsigned int db_length;
+ unsigned int catalog_length;
+ unsigned int def_length;
+ unsigned int flags; /* Div flags */
+ unsigned int decimals; /* Number of decimals in field */
+ unsigned int charsetnr; /* Character set */
+ enum enum_field_types type; /* Type of field. See mysql_com.h for types */
+} MYSQL_FIELD;
+
+typedef char **MYSQL_ROW; /* return data as array of strings */
+typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
+
+#ifndef _global_h
+#if defined(NO_CLIENT_LONG_LONG)
+typedef unsigned long my_ulonglong;
+#elif defined (__WIN__)
+typedef unsigned __int64 my_ulonglong;
+#else
+typedef unsigned long long my_ulonglong;
+#endif
+#endif
+
+#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
+
+typedef struct st_mysql_rows {
+ struct st_mysql_rows *next; /* list of rows */
+ MYSQL_ROW data;
+ unsigned long length;
+} MYSQL_ROWS;
+
+typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
+
+#include "my_alloc.h"
+
+typedef struct st_mysql_data {
+ my_ulonglong rows;
+ unsigned int fields;
+ MYSQL_ROWS *data;
+ MEM_ROOT alloc;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ MYSQL_ROWS **prev_ptr;
+#endif
+} MYSQL_DATA;
+
+enum mysql_option
+{
+ MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
+ MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
+ MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
+ MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
+ MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
+ MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
+ MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH
+};
+
+struct st_mysql_options {
+ unsigned int connect_timeout, read_timeout, write_timeout;
+ unsigned int port, protocol;
+ unsigned long client_flag;
+ char *host,*user,*password,*unix_socket,*db;
+ struct st_dynamic_array *init_commands;
+ char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
+ char *ssl_key; /* PEM key file */
+ char *ssl_cert; /* PEM cert file */
+ char *ssl_ca; /* PEM CA file */
+ char *ssl_capath; /* PEM directory of CA-s? */
+ char *ssl_cipher; /* cipher to use */
+ char *shared_memory_base_name;
+ unsigned long max_allowed_packet;
+ my_bool use_ssl; /* if to use SSL or not */
+ my_bool compress,named_pipe;
+ /*
+ On connect, find out the replication role of the server, and
+ establish connections to all the peers
+ */
+ my_bool rpl_probe;
+ /*
+ Each call to mysql_real_query() will parse it to tell if it is a read
+ or a write, and direct it to the slave or the master
+ */
+ my_bool rpl_parse;
+ /*
+ If set, never read from a master, only from slave, when doing
+ a read that is replication-aware
+ */
+ my_bool no_master_reads;
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
+ my_bool separate_thread;
+#endif
+ enum mysql_option methods_to_use;
+ char *client_ip;
+ /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
+ my_bool secure_auth;
+
+ /* function pointers for local infile support */
+ int (*local_infile_init)(void **, const char *, void *);
+ int (*local_infile_read)(void *, char *, unsigned int);
+ void (*local_infile_end)(void *);
+ int (*local_infile_error)(void *, char *, unsigned int);
+ void *local_infile_userdata;
+};
+
+enum mysql_status
+{
+ MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
+};
+
+enum mysql_protocol_type
+{
+ MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
+ MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
+};
+/*
+ There are three types of queries - the ones that have to go to
+ the master, the ones that go to a slave, and the adminstrative
+ type which must happen on the pivot connectioin
+*/
+enum mysql_rpl_type
+{
+ MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
+};
+
+struct st_mysql_methods;
+
+typedef struct st_mysql
+{
+ NET net; /* Communication parameters */
+ gptr connector_fd; /* ConnectorFd for SSL */
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
+ char *db;
+ struct charset_info_st *charset;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
+ my_ulonglong extra_info; /* Used by mysqlshow */
+ unsigned long thread_id; /* Id for connection in server */
+ unsigned long packet_length;
+ unsigned int port;
+ unsigned long client_flag,server_capabilities;
+ unsigned int protocol_version;
+ unsigned int field_count;
+ unsigned int server_status;
+ unsigned int server_language;
+ unsigned int warning_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me; /* If free in mysql_close */
+ my_bool reconnect; /* set to 1 if automatic reconnect */
+
+ /* session-wide random string */
+ char scramble[SCRAMBLE_LENGTH+1];
+
+ /*
+ Set if this is the original connection, not a master or a slave we have
+ added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
+ */
+ my_bool rpl_pivot;
+ /*
+ Pointers to the master, and the next slave connections, points to
+ itself if lone connection.
+ */
+ struct st_mysql* master, *next_slave;
+
+ struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
+ /* needed for send/read/store/use result to work correctly with replication */
+ struct st_mysql* last_used_con;
+
+ LIST *stmts; /* list of all statements */
+ const struct st_mysql_methods *methods;
+ void *thd;
+ /*
+ Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
+ from mysql_stmt_close if close had to cancel result set of this object.
+ */
+ my_bool *unbuffered_fetch_owner;
+} MYSQL;
+
+typedef struct st_mysql_res {
+ my_ulonglong row_count;
+ MYSQL_FIELD *fields;
+ MYSQL_DATA *data;
+ MYSQL_ROWS *data_cursor;
+ unsigned long *lengths; /* column lengths of current row */
+ MYSQL *handle; /* for unbuffered reads */
+ MEM_ROOT field_alloc;
+ unsigned int field_count, current_field;
+ MYSQL_ROW row; /* If unbuffered read */
+ MYSQL_ROW current_row; /* buffer to current row */
+ my_bool eof; /* Used by mysql_fetch_row */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ const struct st_mysql_methods *methods;
+} MYSQL_RES;
+
+#define MAX_MYSQL_MANAGER_ERR 256
+#define MAX_MYSQL_MANAGER_MSG 256
+
+#define MANAGER_OK 200
+#define MANAGER_INFO 250
+#define MANAGER_ACCESS 401
+#define MANAGER_CLIENT_ERR 450
+#define MANAGER_INTERNAL_ERR 500
+
+#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
+#define MYSQL_CLIENT
+#endif
+
+
+typedef struct st_mysql_manager
+{
+ NET net;
+ char *host,*user,*passwd;
+ unsigned int port;
+ my_bool free_me;
+ my_bool eof;
+ int cmd_status;
+ int last_errno;
+ char* net_buf,*net_buf_pos,*net_data_end;
+ int net_buf_size;
+ char last_error[MAX_MYSQL_MANAGER_ERR];
+} MYSQL_MANAGER;
+
+typedef struct st_mysql_parameters
+{
+ unsigned long *p_max_allowed_packet;
+ unsigned long *p_net_buffer_length;
+} MYSQL_PARAMETERS;
+
+#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
+#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
+#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
+#endif
+
+/*
+ Set up and bring down the server; to ensure that applications will
+ work when linked against either the standard client library or the
+ embedded server library, these functions should be called.
+*/
+int STDCALL mysql_server_init(int argc, char **argv, char **groups);
+void STDCALL mysql_server_end(void);
+/*
+ mysql_server_init/end need to be called when using libmysqld or
+ libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
+ you don't need to call it explicitely; but you need to call
+ mysql_server_end() to free memory). The names are a bit misleading
+ (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
+ names which suit well whether you're using libmysqld or libmysqlclient. We
+ intend to promote these aliases over the mysql_server* ones.
+*/
+#define mysql_library_init mysql_server_init
+#define mysql_library_end mysql_server_end
+
+MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
+
+/*
+ Set up and bring down a thread; these function should be called
+ for each thread in an application which opens at least one MySQL
+ connection. All uses of the connection(s) should be between these
+ function calls.
+*/
+my_bool STDCALL mysql_thread_init(void);
+void STDCALL mysql_thread_end(void);
+
+/*
+ Functions to get information from the MYSQL and MYSQL_RES structures
+ Should definitely be used if one uses shared libraries.
+*/
+
+my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
+unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
+my_bool STDCALL mysql_eof(MYSQL_RES *res);
+MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
+ unsigned int fieldnr);
+MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
+MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
+
+unsigned int STDCALL mysql_field_count(MYSQL *mysql);
+my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
+my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
+unsigned int STDCALL mysql_errno(MYSQL *mysql);
+const char * STDCALL mysql_error(MYSQL *mysql);
+const char *STDCALL mysql_sqlstate(MYSQL *mysql);
+unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
+const char * STDCALL mysql_info(MYSQL *mysql);
+unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
+const char * STDCALL mysql_character_set_name(MYSQL *mysql);
+
+MYSQL * STDCALL mysql_init(MYSQL *mysql);
+my_bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
+ const char *cert, const char *ca,
+ const char *capath, const char *cipher);
+my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
+ const char *passwd, const char *db);
+MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
+ const char *user,
+ const char *passwd,
+ const char *db,
+ unsigned int port,
+ const char *unix_socket,
+ unsigned long clientflag);
+int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
+int STDCALL mysql_query(MYSQL *mysql, const char *q);
+int STDCALL mysql_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+int STDCALL mysql_real_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
+
+/* perform query on master */
+my_bool STDCALL mysql_master_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+/* perform query on slave */
+my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
+ unsigned long length);
+
+/* local infile support */
+
+#define LOCAL_INFILE_ERROR_LEN 512
+
+void
+mysql_set_local_infile_handler(MYSQL *mysql,
+ int (*local_infile_init)(void **, const char *,
+ void *),
+ int (*local_infile_read)(void *, char *,
+ unsigned int),
+ void (*local_infile_end)(void *),
+ int (*local_infile_error)(void *, char*,
+ unsigned int),
+ void *);
+
+void
+mysql_set_local_infile_default(MYSQL *mysql);
+
+
+/*
+ enable/disable parsing of all queries to decide if they go on master or
+ slave
+*/
+void STDCALL mysql_enable_rpl_parse(MYSQL* mysql);
+void STDCALL mysql_disable_rpl_parse(MYSQL* mysql);
+/* get the value of the parse flag */
+int STDCALL mysql_rpl_parse_enabled(MYSQL* mysql);
+
+/* enable/disable reads from master */
+void STDCALL mysql_enable_reads_from_master(MYSQL* mysql);
+void STDCALL mysql_disable_reads_from_master(MYSQL* mysql);
+/* get the value of the master read flag */
+my_bool STDCALL mysql_reads_from_master_enabled(MYSQL* mysql);
+
+enum mysql_rpl_type STDCALL mysql_rpl_query_type(const char* q, int len);
+
+/* discover the master and its slaves */
+my_bool STDCALL mysql_rpl_probe(MYSQL* mysql);
+
+/* set the master, close/free the old one, if it is not a pivot */
+int STDCALL mysql_set_master(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+int STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
+ unsigned int port,
+ const char* user,
+ const char* passwd);
+
+int STDCALL mysql_shutdown(MYSQL *mysql,
+ enum mysql_enum_shutdown_level
+ shutdown_level);
+int STDCALL mysql_dump_debug_info(MYSQL *mysql);
+int STDCALL mysql_refresh(MYSQL *mysql,
+ unsigned int refresh_options);
+int STDCALL mysql_kill(MYSQL *mysql,unsigned long pid);
+int STDCALL mysql_set_server_option(MYSQL *mysql,
+ enum enum_mysql_set_option
+ option);
+int STDCALL mysql_ping(MYSQL *mysql);
+const char * STDCALL mysql_stat(MYSQL *mysql);
+const char * STDCALL mysql_get_server_info(MYSQL *mysql);
+const char * STDCALL mysql_get_client_info(void);
+unsigned long STDCALL mysql_get_client_version(void);
+const char * STDCALL mysql_get_host_info(MYSQL *mysql);
+unsigned long STDCALL mysql_get_server_version(MYSQL *mysql);
+unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
+MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
+MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
+int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
+ const char *arg);
+void STDCALL mysql_free_result(MYSQL_RES *result);
+void STDCALL mysql_data_seek(MYSQL_RES *result,
+ my_ulonglong offset);
+MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
+ MYSQL_FIELD_OFFSET offset);
+MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
+unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
+MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
+MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
+ const char *wild);
+unsigned long STDCALL mysql_escape_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_hex_string(char *to,const char *from,
+ unsigned long from_length);
+unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
+ char *to,const char *from,
+ unsigned long length);
+void STDCALL mysql_debug(const char *debug);
+char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
+ char *to,
+ unsigned long to_length,
+ const char *from,
+ unsigned long from_length,
+ void *param,
+ char *
+ (*extend_buffer)
+ (void *, char *to,
+ unsigned long *length));
+void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
+unsigned int STDCALL mysql_thread_safe(void);
+my_bool STDCALL mysql_embedded(void);
+MYSQL_MANAGER* STDCALL mysql_manager_init(MYSQL_MANAGER* con);
+MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
+ const char* host,
+ const char* user,
+ const char* passwd,
+ unsigned int port);
+void STDCALL mysql_manager_close(MYSQL_MANAGER* con);
+int STDCALL mysql_manager_command(MYSQL_MANAGER* con,
+ const char* cmd, int cmd_len);
+int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con,
+ char* res_buf,
+ int res_buf_size);
+my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
+
+
+/*
+ The following definitions are added for the enhanced
+ client-server protocol
+*/
+
+/* statement state */
+enum enum_mysql_stmt_state
+{
+ MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
+ MYSQL_STMT_FETCH_DONE
+};
+
+
+/* bind structure */
+typedef struct st_mysql_bind
+{
+ unsigned long *length; /* output length pointer */
+ my_bool *is_null; /* Pointer to null indicator */
+ void *buffer; /* buffer to get/put data */
+ enum enum_field_types buffer_type; /* buffer type */
+ unsigned long buffer_length; /* buffer length, must be set for str/binary */
+
+ /* Following are for internal use. Set by mysql_stmt_bind_param */
+ unsigned char *inter_buffer; /* for the current data position */
+ unsigned long offset; /* offset position for char/binary fetch */
+ unsigned long internal_length; /* Used if length is 0 */
+ unsigned int param_number; /* For null count and error messages */
+ unsigned int pack_length; /* Internal length for packed data */
+ my_bool is_unsigned; /* set if integer type is unsigned */
+ my_bool long_data_used; /* If used with mysql_send_long_data */
+ my_bool internal_is_null; /* Used if is_null is 0 */
+ void (*store_param_func)(NET *net, struct st_mysql_bind *param);
+ void (*fetch_result)(struct st_mysql_bind *, unsigned char **row);
+ void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
+ unsigned char **row);
+} MYSQL_BIND;
+
+
+/* statement handler */
+typedef struct st_mysql_stmt
+{
+ MEM_ROOT mem_root; /* root allocations */
+ LIST list; /* list to keep track of all stmts */
+ MYSQL *mysql; /* connection handle */
+ MYSQL_BIND *params; /* input parameters */
+ MYSQL_BIND *bind; /* output parameters */
+ MYSQL_FIELD *fields; /* result set metadata */
+ MYSQL_DATA result; /* cached result set */
+ MYSQL_ROWS *data_cursor; /* current row in cached result */
+ /* copy of mysql->affected_rows after statement execution */
+ my_ulonglong affected_rows;
+ my_ulonglong insert_id; /* copy of mysql->insert_id */
+ /*
+ mysql_stmt_fetch() calls this function to fetch one row (it's different
+ for buffered, unbuffered and cursor fetch).
+ */
+ int (*read_row_func)(struct st_mysql_stmt *stmt,
+ unsigned char **row);
+ unsigned long stmt_id; /* Id for prepared statement */
+ unsigned int last_errno; /* error code */
+ unsigned int param_count; /* input parameter count */
+ unsigned int field_count; /* number of columns in result set */
+ enum enum_mysql_stmt_state state; /* statement state */
+ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
+ char sqlstate[SQLSTATE_LENGTH+1];
+ /* Types of input parameters should be sent to server */
+ my_bool send_types_to_server;
+ my_bool bind_param_done; /* input buffers were supplied */
+ my_bool bind_result_done; /* output buffers were supplied */
+ /* mysql_stmt_close() had to cancel this result */
+ my_bool unbuffered_fetch_cancelled;
+ /*
+ Is set to true if we need to calculate field->max_length for
+ metadata fields when doing mysql_stmt_store_result.
+ */
+ my_bool update_max_length;
+} MYSQL_STMT;
+
+enum enum_stmt_attr_type
+{
+ /*
+ When doing mysql_stmt_store_result calculate max_length attribute
+ of statement metadata. This is to be consistent with the old API,
+ where this was done automatically.
+ In the new API we do that only by request because it slows down
+ mysql_stmt_store_result sufficiently.
+ */
+ STMT_ATTR_UPDATE_MAX_LENGTH
+};
+
+
+typedef struct st_mysql_methods
+{
+ my_bool (*read_query_result)(MYSQL *mysql);
+ my_bool (*advanced_command)(MYSQL *mysql,
+ enum enum_server_command command,
+ const char *header,
+ unsigned long header_length,
+ const char *arg,
+ unsigned long arg_length,
+ my_bool skip_check);
+ MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
+ unsigned int fields);
+ MYSQL_RES * (*use_result)(MYSQL *mysql);
+ void (*fetch_lengths)(unsigned long *to,
+ MYSQL_ROW column, unsigned int field_count);
+ void (*flush_use_result)(MYSQL *mysql);
+#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
+ MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
+ my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
+ int (*stmt_execute)(MYSQL_STMT *stmt);
+ int (*read_binary_rows)(MYSQL_STMT *stmt);
+ int (*unbuffered_fetch)(MYSQL *mysql, char **row);
+ void (*free_embedded_thd)(MYSQL *mysql);
+ const char *(*read_statistics)(MYSQL *mysql);
+ my_bool (*next_result)(MYSQL *mysql);
+ int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
+#endif
+} MYSQL_METHODS;
+
+
+MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
+int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
+ unsigned long length);
+int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
+int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
+ unsigned int column,
+ unsigned long offset);
+int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
+unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ const void *attr);
+my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
+ enum enum_stmt_attr_type attr_type,
+ void *attr);
+my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
+my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
+my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
+my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
+ unsigned int param_number,
+ const char *data,
+ unsigned long length);
+MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
+MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
+const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
+ MYSQL_ROW_OFFSET offset);
+MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
+void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
+my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
+my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
+unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
+
+my_bool STDCALL mysql_commit(MYSQL * mysql);
+my_bool STDCALL mysql_rollback(MYSQL * mysql);
+my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
+my_bool STDCALL mysql_more_results(MYSQL *mysql);
+int STDCALL mysql_next_result(MYSQL *mysql);
+void STDCALL mysql_close(MYSQL *sock);
+
+
+/* status return codes */
+#define MYSQL_NO_DATA 100
+
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+
+#ifdef USE_OLD_FUNCTIONS
+MYSQL * STDCALL mysql_connect(MYSQL *mysql, const char *host,
+ const char *user, const char *passwd);
+int STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
+int STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
+#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
+#endif
+#define HAVE_MYSQL_REAL_CONNECT
+
+/*
+ The following functions are mainly exported because of mysqlbinlog;
+ They are not for general usage
+*/
+
+#define simple_command(mysql, command, arg, length, skip_check) \
+ (*(mysql)->methods->advanced_command)(mysql, command, \
+ NullS, 0, arg, length, skip_check)
+unsigned long net_safe_read(MYSQL* mysql);
+
+#ifdef __NETWARE__
+#pragma pack(pop) /* restore alignment */
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _mysql_h */
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/mysql_com.h b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_com.h
new file mode 100644
index 00000000..56c7f7d2
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_com.h
@@ -0,0 +1,397 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/*
+** Common definition between mysql server & client
+*/
+
+#ifndef _mysql_com_h
+#define _mysql_com_h
+
+#define NAME_LEN 64 /* Field/table name length */
+#define HOSTNAME_LENGTH 60
+#define USERNAME_LENGTH 16
+#define SERVER_VERSION_LENGTH 60
+#define SQLSTATE_LENGTH 5
+
+#define LOCAL_HOST "localhost"
+#define LOCAL_HOST_NAMEDPIPE "."
+
+
+#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
+#define MYSQL_NAMEDPIPE "MySQL"
+#define MYSQL_SERVICENAME "MySQL"
+#endif /* __WIN__ */
+
+enum enum_server_command
+{
+ COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
+ COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
+ COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
+ COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
+ COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
+ COM_PREPARE, COM_EXECUTE, COM_LONG_DATA, COM_CLOSE_STMT,
+ COM_RESET_STMT, COM_SET_OPTION,
+ /* don't forget to update const char *command_name[] in sql_parse.cc */
+
+ /* Must be last */
+ COM_END
+};
+
+
+/*
+ Length of random string sent by server on handshake; this is also length of
+ obfuscated password, recieved from client
+*/
+#define SCRAMBLE_LENGTH 20
+#define SCRAMBLE_LENGTH_323 8
+/* length of password stored in the db: new passwords are preceeded with '*' */
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
+#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
+
+
+#define NOT_NULL_FLAG 1 /* Field can't be NULL */
+#define PRI_KEY_FLAG 2 /* Field is part of a primary key */
+#define UNIQUE_KEY_FLAG 4 /* Field is part of a unique key */
+#define MULTIPLE_KEY_FLAG 8 /* Field is part of a key */
+#define BLOB_FLAG 16 /* Field is a blob */
+#define UNSIGNED_FLAG 32 /* Field is unsigned */
+#define ZEROFILL_FLAG 64 /* Field is zerofill */
+#define BINARY_FLAG 128 /* Field is binary */
+
+/* The following are only sent to new clients */
+#define ENUM_FLAG 256 /* field is an enum */
+#define AUTO_INCREMENT_FLAG 512 /* field is a autoincrement field */
+#define TIMESTAMP_FLAG 1024 /* Field is a timestamp */
+#define SET_FLAG 2048 /* field is a set */
+#define NUM_FLAG 32768 /* Field is num (for clients) */
+#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
+#define GROUP_FLAG 32768 /* Intern: Group field */
+#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
+#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
+
+#define REFRESH_GRANT 1 /* Refresh grant tables */
+#define REFRESH_LOG 2 /* Start on new log file */
+#define REFRESH_TABLES 4 /* close all tables */
+#define REFRESH_HOSTS 8 /* Flush host cache */
+#define REFRESH_STATUS 16 /* Flush status variables */
+#define REFRESH_THREADS 32 /* Flush thread cache */
+#define REFRESH_SLAVE 64 /* Reset master info and restart slave
+ thread */
+#define REFRESH_MASTER 128 /* Remove all bin logs in the index
+ and truncate the index */
+
+/* The following can't be set with mysql_refresh() */
+#define REFRESH_READ_LOCK 16384 /* Lock tables for read */
+#define REFRESH_FAST 32768 /* Intern flag */
+
+/* RESET (remove all queries) from query cache */
+#define REFRESH_QUERY_CACHE 65536
+#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
+#define REFRESH_DES_KEY_FILE 0x40000L
+#define REFRESH_USER_RESOURCES 0x80000L
+
+#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
+#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
+#define CLIENT_LONG_FLAG 4 /* Get all column flags */
+#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
+#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
+#define CLIENT_COMPRESS 32 /* Can use compression protocol */
+#define CLIENT_ODBC 64 /* Odbc client */
+#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */
+#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
+#define CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
+#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */
+#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
+#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
+#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */
+#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
+#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
+#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */
+#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */
+#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31)
+
+#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
+#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
+#define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */
+#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
+#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
+#define SERVER_QUERY_NO_INDEX_USED 32
+#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
+
+#define MYSQL_ERRMSG_SIZE 512
+#define NET_READ_TIMEOUT 30 /* Timeout on read */
+#define NET_WRITE_TIMEOUT 60 /* Timeout on write */
+#define NET_WAIT_TIMEOUT 8*60*60 /* Wait for new query */
+
+struct st_vio; /* Only C */
+typedef struct st_vio Vio;
+
+#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */
+#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */
+#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */
+#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
+#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
+#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
+#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
+
+typedef struct st_net {
+#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
+ Vio* vio;
+ unsigned char *buff,*buff_end,*write_pos,*read_pos;
+ my_socket fd; /* For Perl DBI/dbd */
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
+ my_bool compress;
+ /*
+ The following variable is set if we are doing several queries in one
+ command ( as in LOAD TABLE ... FROM MASTER ),
+ and do not want to confuse the client with OK at the wrong time
+ */
+ unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned int *return_status;
+ unsigned char reading_or_writing;
+ char save_char;
+ my_bool no_send_ok;
+ /*
+ Pointer to query object in query cache, do not equal NULL (0) for
+ queries in cache that have not stored its results yet
+ */
+#endif
+ char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
+ unsigned int last_errno;
+ unsigned char error;
+ gptr query_cache_query;
+ my_bool report_error; /* We should report error (we have unreported error) */
+ my_bool return_errno;
+} NET;
+
+#define packet_error (~(unsigned long) 0)
+
+enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
+ MYSQL_TYPE_SHORT, MYSQL_TYPE_LONG,
+ MYSQL_TYPE_FLOAT, MYSQL_TYPE_DOUBLE,
+ MYSQL_TYPE_NULL, MYSQL_TYPE_TIMESTAMP,
+ MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
+ MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
+ MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
+ MYSQL_TYPE_NEWDATE,
+ MYSQL_TYPE_ENUM=247,
+ MYSQL_TYPE_SET=248,
+ MYSQL_TYPE_TINY_BLOB=249,
+ MYSQL_TYPE_MEDIUM_BLOB=250,
+ MYSQL_TYPE_LONG_BLOB=251,
+ MYSQL_TYPE_BLOB=252,
+ MYSQL_TYPE_VAR_STRING=253,
+ MYSQL_TYPE_STRING=254,
+ MYSQL_TYPE_GEOMETRY=255
+
+};
+
+/* For backward compatibility */
+#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
+#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
+#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
+#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
+#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
+#define FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT
+#define FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE
+#define FIELD_TYPE_NULL MYSQL_TYPE_NULL
+#define FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP
+#define FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG
+#define FIELD_TYPE_INT24 MYSQL_TYPE_INT24
+#define FIELD_TYPE_DATE MYSQL_TYPE_DATE
+#define FIELD_TYPE_TIME MYSQL_TYPE_TIME
+#define FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME
+#define FIELD_TYPE_YEAR MYSQL_TYPE_YEAR
+#define FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE
+#define FIELD_TYPE_ENUM MYSQL_TYPE_ENUM
+#define FIELD_TYPE_SET MYSQL_TYPE_SET
+#define FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB
+#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
+#define FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB
+#define FIELD_TYPE_BLOB MYSQL_TYPE_BLOB
+#define FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING
+#define FIELD_TYPE_STRING MYSQL_TYPE_STRING
+#define FIELD_TYPE_CHAR MYSQL_TYPE_TINY
+#define FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM
+#define FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY
+
+
+/* Shutdown/kill enums and constants */
+
+/* Bits for THD::killable. */
+#define MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0)
+#define MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1)
+#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
+#define MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3)
+
+enum mysql_enum_shutdown_level {
+ /*
+ We want levels to be in growing order of hardness (because we use number
+ comparisons). Note that DEFAULT does not respect the growing property, but
+ it's ok.
+ */
+ SHUTDOWN_DEFAULT = 0,
+ /* wait for existing connections to finish */
+ SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT,
+ /* wait for existing trans to finish */
+ SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS,
+ /* wait for existing updates to finish (=> no partial MyISAM update) */
+ SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE,
+ /* flush InnoDB buffers and other storage engines' buffers*/
+ SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1),
+ /* don't flush InnoDB buffers, flush other storage engines' buffers*/
+ SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
+ /* Now the 2 levels of the KILL command */
+#if MYSQL_VERSION_ID >= 50000
+ KILL_QUERY= 254,
+#endif
+ KILL_CONNECTION= 255
+};
+
+/* options for mysql_set_option */
+enum enum_mysql_set_option
+{
+ MYSQL_OPTION_MULTI_STATEMENTS_ON,
+ MYSQL_OPTION_MULTI_STATEMENTS_OFF
+};
+
+#define net_new_transaction(net) ((net)->pkt_nr=0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+my_bool my_net_init(NET *net, Vio* vio);
+void my_net_local_init(NET *net);
+void net_end(NET *net);
+void net_clear(NET *net);
+my_bool net_realloc(NET *net, unsigned long length);
+my_bool net_flush(NET *net);
+my_bool my_net_write(NET *net,const char *packet,unsigned long len);
+my_bool net_write_command(NET *net,unsigned char command,
+ const char *header, unsigned long head_len,
+ const char *packet, unsigned long len);
+int net_real_write(NET *net,const char *packet,unsigned long len);
+unsigned long my_net_read(NET *net);
+
+/*
+ The following function is not meant for normal usage
+ Currently it's used internally by manager.c
+*/
+struct sockaddr;
+int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
+ unsigned int timeout);
+
+struct rand_struct {
+ unsigned long seed1,seed2,max_value;
+ double max_value_dbl;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+ /* The following is for user defined functions */
+
+enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
+
+typedef struct st_udf_args
+{
+ unsigned int arg_count; /* Number of arguments */
+ enum Item_result *arg_type; /* Pointer to item_results */
+ char **args; /* Pointer to argument */
+ unsigned long *lengths; /* Length of string arguments */
+ char *maybe_null; /* Set to 1 for all maybe_null args */
+} UDF_ARGS;
+
+ /* This holds information about the result */
+
+typedef struct st_udf_init
+{
+ my_bool maybe_null; /* 1 if function can return NULL */
+ unsigned int decimals; /* for real functions */
+ unsigned long max_length; /* For string functions */
+ char *ptr; /* free pointer for function data */
+ my_bool const_item; /* 0 if result is independent of arguments */
+} UDF_INIT;
+
+ /* Constants when using compression */
+#define NET_HEADER_SIZE 4 /* standard header size */
+#define COMP_HEADER_SIZE 3 /* compression header extra size */
+
+ /* Prototypes to password functions */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ These functions are used for authentication by client and server and
+ implemented in sql/password.c
+*/
+
+void randominit(struct rand_struct *, unsigned long seed1,
+ unsigned long seed2);
+double my_rnd(struct rand_struct *);
+void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
+
+void hash_password(unsigned long *to, const char *password, unsigned int password_len);
+void make_scrambled_password_323(char *to, const char *password);
+void scramble_323(char *to, const char *message, const char *password);
+my_bool check_scramble_323(const char *, const char *message,
+ unsigned long *salt);
+void get_salt_from_password_323(unsigned long *res, const char *password);
+void make_password_from_salt_323(char *to, const unsigned long *salt);
+
+void make_scrambled_password(char *to, const char *password);
+void scramble(char *to, const char *message, const char *password);
+my_bool check_scramble(const char *reply, const char *message,
+ const unsigned char *hash_stage2);
+void get_salt_from_password(unsigned char *res, const char *password);
+void make_password_from_salt(char *to, const unsigned char *hash_stage2);
+
+/* end of password.c */
+
+char *get_tty_password(char *opt_message);
+const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
+
+/* Some other useful functions */
+
+my_bool my_init(void);
+int load_defaults(const char *conf_file, const char **groups,
+ int *argc, char ***argv);
+my_bool my_thread_init(void);
+void my_thread_end(void);
+
+#ifdef _global_h
+ulong STDCALL net_field_length(uchar **packet);
+my_ulonglong net_field_length_ll(uchar **packet);
+char *net_store_length(char *pkg, ulonglong length);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
+#define MYSQL_STMT_HEADER 4
+#define MYSQL_LONG_DATA_HEADER 6
+
+#endif
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/mysql_embed.h b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_embed.h
new file mode 100644
index 00000000..603af8e8
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_embed.h
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+/* Defines that are unique to the embedded version of MySQL */
+
+#ifdef EMBEDDED_LIBRARY
+
+/* Things we don't need in the embedded version of MySQL */
+/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
+
+#undef HAVE_PSTACK /* No stacktrace */
+#undef HAVE_DLOPEN /* No udf functions */
+#undef HAVE_OPENSSL
+#undef HAVE_ISAM
+#undef HAVE_SMEM /* No shared memory */
+#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
+
+#define DONT_USE_RAID
+
+#endif /* EMBEDDED_LIBRARY */
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/mysql_time.h b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_time.h
new file mode 100644
index 00000000..5f4fc12c
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_time.h
@@ -0,0 +1,56 @@
+/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+
+ 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 */
+
+#ifndef _mysql_time_h_
+#define _mysql_time_h_
+
+/*
+ Time declarations shared between the server and client API:
+ you should not add anything to this header unless it's used
+ (and hence should be visible) in mysql.h.
+ If you're looking for a place to add new time-related declaration,
+ it's most likely my_time.h. See also "C API Handling of Date
+ and Time Values" chapter in documentation.
+*/
+
+enum enum_mysql_timestamp_type
+{
+ MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
+ MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
+};
+
+
+/*
+ Structure which is used to represent datetime values inside MySQL.
+
+ We assume that values in this structure are normalized, i.e. year <= 9999,
+ month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
+ in server such as my_system_gmt_sec() or make_time() family of functions
+ rely on this (actually now usage of make_*() family relies on a bit weaker
+ restriction). Also functions that produce MYSQL_TIME as result ensure this.
+ There is one exception to this rule though if this structure holds time
+ value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
+ bigger values.
+*/
+typedef struct st_mysql_time
+{
+ unsigned int year, month, day, hour, minute, second;
+ unsigned long second_part;
+ my_bool neg;
+ enum enum_mysql_timestamp_type time_type;
+} MYSQL_TIME;
+
+#endif /* _mysql_time_h_ */
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/mysql_version.h b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_version.h
new file mode 100644
index 00000000..9f38c100
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/mysql_version.h
@@ -0,0 +1,29 @@
+/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
+ This file is public domain and comes with NO WARRANTY of any kind */
+
+/* Version numbers for protocol & mysqld */
+
+#ifndef _mysql_version_h
+#define _mysql_version_h
+#ifdef _CUSTOMCONFIG_
+#include <custom_conf.h>
+#else
+#define PROTOCOL_VERSION 10
+#define MYSQL_SERVER_VERSION "4.1.12"
+#define MYSQL_BASE_VERSION "mysqld-4.1"
+#define MYSQL_SERVER_SUFFIX_DEF ""
+#define FRM_VER 6
+#define MYSQL_VERSION_ID 40112
+#define MYSQL_PORT 3306
+#define MYSQL_UNIX_ADDR "/tmp/mysql.sock"
+#define MYSQL_CONFIG_NAME "my"
+#define MYSQL_COMPILATION_COMMENT "Source distribution"
+
+/* mysqld compile time options */
+#endif /* _CUSTOMCONFIG_ */
+
+#ifndef LICENSE
+#define LICENSE GPL
+#endif /* LICENSE */
+
+#endif /* _mysql_version_h */
diff --git a/MCPKit_bundled.framework/Versions/Current/Headers/typelib.h b/MCPKit_bundled.framework/Versions/Current/Headers/typelib.h
new file mode 100644
index 00000000..4d6a90ad
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Headers/typelib.h
@@ -0,0 +1,34 @@
+/* Copyright (C) 2000 MySQL AB
+
+ 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 */
+
+
+#ifndef _typelib_h
+#define _typelib_h
+
+typedef struct st_typelib { /* Different types saved here */
+ unsigned int count; /* How many types */
+ const char *name; /* Name of typelib */
+ const char **type_names;
+ unsigned int *type_lengths;
+} TYPELIB;
+
+extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
+extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
+extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+
+extern TYPELIB sql_protocol_typelib;
+
+#endif /* _typelib_h */
diff --git a/MCPKit_bundled.framework/Versions/Current/MCPKit_bundled b/MCPKit_bundled.framework/Versions/Current/MCPKit_bundled
new file mode 100755
index 00000000..16b016f0
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/MCPKit_bundled
Binary files differ
diff --git a/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPAttribute+Private.h b/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPAttribute+Private.h
new file mode 100644
index 00000000..2426b16a
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPAttribute+Private.h
@@ -0,0 +1,35 @@
+//
+// MCPAttribute+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPAttribute.h"
+
+@interface MCPAttribute (Private)
+
+
+#pragma mark Setters
+- (void) setValueClassName:(NSString *) iClassName;
+
+#pragma mark Pseudo-getters
+
+@end
+
diff --git a/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPClassDescription+Private.h b/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPClassDescription+Private.h
new file mode 100644
index 00000000..fa4ffab3
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPClassDescription+Private.h
@@ -0,0 +1,41 @@
+//
+// MCPClassDescription+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 09/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+
+#import "MCPClassDescription.h"
+
+@interface MCPClassDescription (Private)
+
+#pragma mark Setters
+- (void) setAttributes:(NSArray *) iAttributes;
+- (void) setRelations:(NSArray *) iRelations;
+- (void) insertObject:(MCPRelation *) iRelation inIncomingsAtIndex:(unsigned int) index;
+- (void) removeObjectFromIncomingsAtIndex:(unsigned int) index;
+
+#pragma mark Getters
+- (NSArray *) incomings;
+- (unsigned int) countOfIncomings;
+- (MCPRelation *) objectInIncomingsAtIndex:(unsigned int) index;
+- (unsigned int) indexOfIncoming:(id) iRelation;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPRelation+Private.h b/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPRelation+Private.h
new file mode 100644
index 00000000..aa286787
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/PrivateHeaders/MCPRelation+Private.h
@@ -0,0 +1,41 @@
+//
+// MCPRelation+Private.h
+// MCPModeler
+//
+// Created by Serge Cohen (serge.cohen@m4x.org) on 11/08/04.
+// Copyright 2004 Serge Cohen. All rights reserved.
+//
+// This code 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 any later version.
+//
+// This code 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.
+//
+// For a copy of the GNU General Public License, visit <http://www.gnu.org/> or
+// write to the Free Software Foundation, Inc., 59 Temple Place--Suite 330,
+// Boston, MA 02111-1307, USA.
+//
+// More info at <http://mysql-cocoa.sourceforge.net/>
+//
+
+#import "MCPRelation.h"
+
+@interface MCPRelation (Private)
+
+#pragma mark Making some work
+- (void) invalidateJoins; // Check that the joins are realistics.
+
+#pragma mark Setters
+- (void) setOrigin:(MCPClassDescription *) iOrigin;
+//- (void) setJoins:(NSArray *) iJoins;
+
+#pragma mark Getters
+- (MCPModel *) model;
+
+#pragma mark Fro the controller layer and the UI
+- (void) addNewDefaultJoin;
+
+@end
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings
new file mode 100644
index 00000000..8177d470
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist
new file mode 100644
index 00000000..e0a16f9b
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/JavaCompiling.plist
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>JavaSourceSubpath</key>
+ <string>_MCPConnectionWindow_EOArchive_English.java</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java
new file mode 100644
index 00000000..5ba619a6
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/_MCPConnectionWindow_EOArchive_English.java
@@ -0,0 +1,424 @@
+// _MCPConnectionWindow_EOArchive_English.java
+// Generated by EnterpriseObjects palette at vendredi 14 mai 2004 11 h 08 Europe/Amsterdam
+
+import com.webobjects.eoapplication.*;
+import com.webobjects.eocontrol.*;
+import com.webobjects.eointerface.*;
+import com.webobjects.eointerface.swing.*;
+import com.webobjects.foundation.*;
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.border.*;
+import javax.swing.table.*;
+import javax.swing.text.*;
+
+public class _MCPConnectionWindow_EOArchive_English extends com.webobjects.eoapplication.EOArchive {
+ IBHelpConnector _iBHelpConnector0, _iBHelpConnector1, _iBHelpConnector2, _iBHelpConnector3;
+ com.webobjects.eointerface.swing.EOFrame _eoFrame0, _eoFrame1;
+ com.webobjects.eointerface.swing.EOTextField _nsTextField0, _nsTextField1, _nsTextField2, _nsTextField3, _nsTextField4, _nsTextField5, _nsTextField6, _nsTextField7, _nsTextField8, _nsTextField9;
+ com.webobjects.eointerface.swing.EOView _nsBox0, _nsBox1, _nsBox2, _nsBox3;
+ javax.swing.JButton _nsButton0, _nsButton1, _nsButton2, _nsButton3, _nsButton4;
+ javax.swing.JPanel _nsView0, _nsView1;
+ javax.swing.JPasswordField _nsSecureTextField0;
+
+ public _MCPConnectionWindow_EOArchive_English(Object owner, NSDisposableRegistry registry) {
+ super(owner, registry);
+ }
+
+ protected void _construct() {
+ Object owner = _owner();
+ EOArchive._ObjectInstantiationDelegate delegate = (owner instanceof EOArchive._ObjectInstantiationDelegate) ? (EOArchive._ObjectInstantiationDelegate)owner : null;
+ Object replacement;
+
+ super._construct();
+
+ _nsBox3 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView");
+ _nsBox2 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mCreateButton")) != null)) {
+ _nsButton4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsButton4");
+ } else {
+ _nsButton4 = (javax.swing.JButton)_registered(new javax.swing.JButton("Create DB"), "NSButton2");
+ }
+
+ _nsButton3 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+ _nsButton2 = (javax.swing.JButton)_registered(new javax.swing.JButton("Go"), "NSButton");
+ _nsBox1 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSView");
+ _nsBox0 = (com.webobjects.eointerface.swing.EOView)_registered(new com.webobjects.eointerface.swing.EOView(), "NSBox1");
+ _nsTextField9 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField23");
+ _nsTextField8 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField22");
+ _nsTextField7 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField6 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "window")) != null)) {
+ _eoFrame1 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_eoFrame1");
+ } else {
+ _eoFrame1 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Window");
+ }
+
+ _nsView1 = (JPanel)_eoFrame1.getContentPane();
+ _iBHelpConnector3 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector2 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector1 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+ _iBHelpConnector0 = (IBHelpConnector)_registered(new IBHelpConnector(), "");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField5 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField5");
+ } else {
+ _nsTextField5 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField12");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField4 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField4");
+ } else {
+ _nsTextField4 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField11");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent")) != null)) {
+ _nsTextField3 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField3");
+ } else {
+ _nsTextField3 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField1");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mHostField.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent.nextFocusableComponent")) != null)) {
+ _nsTextField2 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOTextField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsTextField2");
+ } else {
+ _nsTextField2 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField");
+ }
+
+ _nsButton1 = (javax.swing.JButton)_registered(new javax.swing.JButton("Cancel"), "NSButton1");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField.nextFocusableComponent")) != null)) {
+ _nsButton0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JButton)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsButton0");
+ } else {
+ _nsButton0 = (javax.swing.JButton)_registered(new javax.swing.JButton("OK"), "NSButton");
+ }
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordField")) != null)) {
+ _nsSecureTextField0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (javax.swing.JPasswordField)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_nsSecureTextField0");
+ } else {
+ _nsSecureTextField0 = (javax.swing.JPasswordField)_registered(new javax.swing.JPasswordField(), "NSTextField");
+ }
+
+ _nsTextField1 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField21");
+ _nsTextField0 = (com.webobjects.eointerface.swing.EOTextField)_registered(new com.webobjects.eointerface.swing.EOTextField(), "NSTextField2");
+
+ if ((delegate != null) && ((replacement = delegate.objectForOutletPath(this, "mPasswordSheet")) != null)) {
+ _eoFrame0 = (replacement == EOArchive._ObjectInstantiationDelegate.NullObject) ? null : (com.webobjects.eointerface.swing.EOFrame)replacement;
+ _replacedObjects.setObjectForKey(replacement, "_eoFrame0");
+ } else {
+ _eoFrame0 = (com.webobjects.eointerface.swing.EOFrame)_registered(new com.webobjects.eointerface.swing.EOFrame(), "Panel");
+ }
+
+ _nsView0 = (JPanel)_eoFrame0.getContentPane();
+ }
+
+ protected void _awaken() {
+ super._awaken();
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _connect(_eoFrame0, _owner(), "delegate");
+ }
+
+ _nsButton0.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton0), ""));
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _connect(_owner(), _eoFrame0, "mPasswordSheet");
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _connect(_owner(), _nsSecureTextField0, "mPasswordField");
+ }
+
+ if (_replacedObjects.objectForKey("_nsButton4") == null) {
+ _connect(_owner(), _nsButton4, "mCreateButton");
+ }
+
+ _nsButton4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCreate", _nsButton4), ""));
+ _nsButton3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doCancel", _nsButton3), ""));
+ _nsButton2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "doGo", _nsButton2), ""));
+
+ if (_replacedObjects.objectForKey("_eoFrame1") == null) {
+ _connect(_owner(), _eoFrame1, "window");
+ }
+
+ _nsTextField2.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField2), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _connect(_owner(), _nsTextField3, "mLoginField");
+ }
+
+ _nsTextField3.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField3), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _connect(_owner(), _nsTextField4, "mDatabaseField");
+ }
+
+ _nsTextField4.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField4), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _connect(_owner(), _nsTextField5, "mPortField");
+ }
+
+ _nsTextField5.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "modifyInstance", _nsTextField5), ""));
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _connect(_owner(), _nsTextField2, "mHostField");
+ }
+
+ _nsButton1.addActionListener((com.webobjects.eointerface.swing.EOControlActionAdapter)_registered(new com.webobjects.eointerface.swing.EOControlActionAdapter(_owner(), "passwordClick", _nsButton1), ""));
+ }
+
+ protected void _init() {
+ super._init();
+ if (!(_nsBox2.getLayout() instanceof EOViewLayout)) { _nsBox2.setLayout(new EOViewLayout()); }
+ _nsBox3.setSize(401, 1);
+ _nsBox3.setLocation(2, 2);
+ ((EOViewLayout)_nsBox2.getLayout()).setAutosizingMask(_nsBox3, EOViewLayout.MinYMargin);
+ _nsBox2.add(_nsBox3);
+ _nsBox2.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN));
+
+ if (_replacedObjects.objectForKey("_nsButton4") == null) {
+ _setFontForComponent(_nsButton4, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton4.setMargin(new Insets(0, 2, 0, 2));
+ }
+
+ _setFontForComponent(_nsButton3, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton3.setMargin(new Insets(0, 2, 0, 2));
+ _setFontForComponent(_nsButton2, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton2.setMargin(new Insets(0, 2, 0, 2));
+ if (!(_nsBox0.getLayout() instanceof EOViewLayout)) { _nsBox0.setLayout(new EOViewLayout()); }
+ _nsBox1.setSize(328, 1);
+ _nsBox1.setLocation(2, 2);
+ ((EOViewLayout)_nsBox0.getLayout()).setAutosizingMask(_nsBox1, EOViewLayout.MinYMargin);
+ _nsBox0.add(_nsBox1);
+ _nsBox0.setBorder(new com.webobjects.eointerface.swing._EODefaultBorder("", true, "Lucida Grande", 13, Font.PLAIN));
+ _setFontForComponent(_nsTextField9, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField9.setEditable(false);
+ _nsTextField9.setOpaque(false);
+ _nsTextField9.setText("Port :");
+ _nsTextField9.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField9.setSelectable(true);
+ _nsTextField9.setEnabled(true);
+ _nsTextField9.setBorder(null);
+ _setFontForComponent(_nsTextField8, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField8.setEditable(false);
+ _nsTextField8.setOpaque(false);
+ _nsTextField8.setText("Database :");
+ _nsTextField8.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField8.setSelectable(true);
+ _nsTextField8.setEnabled(true);
+ _nsTextField8.setBorder(null);
+ _setFontForComponent(_nsTextField7, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField7.setEditable(false);
+ _nsTextField7.setOpaque(false);
+ _nsTextField7.setText("Login :");
+ _nsTextField7.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField7.setSelectable(true);
+ _nsTextField7.setEnabled(true);
+ _nsTextField7.setBorder(null);
+ _setFontForComponent(_nsTextField6, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField6.setEditable(false);
+ _nsTextField6.setOpaque(false);
+ _nsTextField6.setText("Host :");
+ _nsTextField6.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField6.setSelectable(true);
+ _nsTextField6.setEnabled(true);
+ _nsTextField6.setBorder(null);
+ if (!(_nsView1.getLayout() instanceof EOViewLayout)) { _nsView1.setLayout(new EOViewLayout()); }
+ _nsTextField6.setSize(72, 17);
+ _nsTextField6.setLocation(11, 17);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField6, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField6);
+ _nsTextField7.setSize(72, 17);
+ _nsTextField7.setLocation(11, 47);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField7, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField7);
+ _nsTextField8.setSize(72, 17);
+ _nsTextField8.setLocation(11, 77);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField8, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField8);
+ _nsTextField9.setSize(72, 17);
+ _nsTextField9.setLocation(11, 107);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField9, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField9);
+ _nsTextField2.setSize(242, 22);
+ _nsTextField2.setLocation(88, 14);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField2, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField2);
+ _nsTextField3.setSize(242, 22);
+ _nsTextField3.setLocation(88, 44);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField3, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField3);
+ _nsTextField4.setSize(242, 22);
+ _nsTextField4.setLocation(88, 74);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField4, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField4);
+ _nsTextField5.setSize(242, 22);
+ _nsTextField5.setLocation(88, 104);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsTextField5, EOViewLayout.MinXMargin | EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsTextField5);
+ _nsBox0.setSize(332, 5);
+ _nsBox0.setLocation(5, 130);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsBox0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView1.add(_nsBox0);
+ _nsButton2.setSize(77, 26);
+ _nsButton2.setLocation(256, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton2, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton2);
+ _nsButton3.setSize(77, 26);
+ _nsButton3.setLocation(172, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton3, EOViewLayout.MinXMargin | EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton3);
+ _nsButton4.setSize(96, 26);
+ _nsButton4.setLocation(12, 144);
+ ((EOViewLayout)_nsView1.getLayout()).setAutosizingMask(_nsButton4, EOViewLayout.MinYMargin);
+ _nsView1.add(_nsButton4);
+
+ if (_replacedObjects.objectForKey("_eoFrame1") == null) {
+ _nsView1.setSize(342, 180);
+ _eoFrame1.setTitle("New Connection Parameters");
+ _eoFrame1.setLocation(111, 492);
+ _eoFrame1.setSize(342, 180);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _connect(_nsTextField5, _nsTextField2, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField5") == null) {
+ _setFontForComponent(_nsTextField5, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField5.setEditable(true);
+ _nsTextField5.setOpaque(true);
+ _nsTextField5.setText("");
+ _nsTextField5.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField5.setSelectable(true);
+ _nsTextField5.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _connect(_nsTextField4, _nsTextField5, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField4") == null) {
+ _setFontForComponent(_nsTextField4, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField4.setEditable(true);
+ _nsTextField4.setOpaque(true);
+ _nsTextField4.setText("");
+ _nsTextField4.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField4.setSelectable(true);
+ _nsTextField4.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _connect(_nsTextField3, _nsTextField4, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField3") == null) {
+ _setFontForComponent(_nsTextField3, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField3.setEditable(true);
+ _nsTextField3.setOpaque(true);
+ _nsTextField3.setText("");
+ _nsTextField3.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField3.setSelectable(true);
+ _nsTextField3.setEnabled(true);
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _connect(_nsTextField2, _nsTextField3, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsTextField2") == null) {
+ _setFontForComponent(_nsTextField2, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField2.setEditable(true);
+ _nsTextField2.setOpaque(true);
+ _nsTextField2.setText("");
+ _nsTextField2.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsTextField2.setSelectable(true);
+ _nsTextField2.setEnabled(true);
+ }
+
+ _connect(_nsButton1, _nsSecureTextField0, "nextFocusableComponent");
+ _setFontForComponent(_nsButton1, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton1.setMargin(new Insets(0, 2, 0, 2));
+
+ if (_replacedObjects.objectForKey("_nsButton0") == null) {
+ _connect(_nsButton0, _nsButton1, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsButton0") == null) {
+ _setFontForComponent(_nsButton0, "Lucida Grande", 13, Font.PLAIN);
+ _nsButton0.setMargin(new Insets(0, 2, 0, 2));
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _connect(_nsSecureTextField0, _nsButton0, "nextFocusableComponent");
+ }
+
+ if (_replacedObjects.objectForKey("_nsSecureTextField0") == null) {
+ _setFontForComponent(_nsSecureTextField0, "Lucida Grande", 13, Font.PLAIN);
+ _nsSecureTextField0.setEditable(true);
+ _nsSecureTextField0.setOpaque(true);
+ _nsSecureTextField0.setText("");
+ _nsSecureTextField0.setHorizontalAlignment(javax.swing.JTextField.LEFT);
+ _nsSecureTextField0.setEnabled(true);
+ }
+
+ _setFontForComponent(_nsTextField1, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField1.setEditable(false);
+ _nsTextField1.setOpaque(false);
+ _nsTextField1.setText("Password :");
+ _nsTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
+ _nsTextField1.setSelectable(false);
+ _nsTextField1.setEnabled(true);
+ _nsTextField1.setBorder(null);
+ _setFontForComponent(_nsTextField0, "Lucida Grande", 13, Font.PLAIN);
+ _nsTextField0.setEditable(false);
+ _nsTextField0.setOpaque(false);
+ _nsTextField0.setText("Please enter your password for DB server ");
+ _nsTextField0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
+ _nsTextField0.setSelectable(false);
+ _nsTextField0.setEnabled(true);
+ _nsTextField0.setBorder(null);
+ if (!(_nsView0.getLayout() instanceof EOViewLayout)) { _nsView0.setLayout(new EOViewLayout()); }
+ _nsTextField0.setSize(395, 17);
+ _nsTextField0.setLocation(11, 14);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField0, EOViewLayout.WidthSizable | EOViewLayout.MaxYMargin);
+ _nsView0.add(_nsTextField0);
+ _nsTextField1.setSize(73, 17);
+ _nsTextField1.setLocation(11, 51);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsTextField1, EOViewLayout.MaxXMargin | EOViewLayout.MaxYMargin);
+ _nsView0.add(_nsTextField1);
+ _nsSecureTextField0.setSize(314, 22);
+ _nsSecureTextField0.setLocation(89, 48);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsSecureTextField0, EOViewLayout.WidthSizable | EOViewLayout.MinYMargin);
+ _nsView0.add(_nsSecureTextField0);
+ _nsBox2.setSize(405, 5);
+ _nsBox2.setLocation(5, 37);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsBox2, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsBox2);
+ _nsButton0.setSize(77, 26);
+ _nsButton0.setLocation(329, 88);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton0, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton0);
+ _nsButton1.setSize(77, 26);
+ _nsButton1.setLocation(245, 88);
+ ((EOViewLayout)_nsView0.getLayout()).setAutosizingMask(_nsButton1, EOViewLayout.MinYMargin);
+ _nsView0.add(_nsButton1);
+
+ if (_replacedObjects.objectForKey("_eoFrame0") == null) {
+ _nsView0.setSize(415, 124);
+ _eoFrame0.setTitle("Password");
+ _eoFrame0.setLocation(95, 422);
+ _eoFrame0.setSize(415, 124);
+ }
+ }
+}
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib
new file mode 100644
index 00000000..e9dc7fa3
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/classes.nib
@@ -0,0 +1,28 @@
+{
+ IBClasses = (
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {
+ askPassword = id;
+ doCancel = id;
+ doCreate = id;
+ doGo = id;
+ modifyInstance = id;
+ passwordClick = id;
+ };
+ CLASS = MCPConnectionWinCont;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ mCreateButton = NSButton;
+ mDatabaseField = NSTextField;
+ mHostField = NSTextField;
+ mLoginField = NSTextField;
+ mPasswordField = NSTextField;
+ mPasswordSheet = NSPanel;
+ mPortField = NSTextField;
+ };
+ SUPERCLASS = NSWindowController;
+ }
+ );
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/info.nib b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/info.nib
new file mode 100644
index 00000000..10b70ee6
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/info.nib
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>193 200 356 240 0 0 1280 832 </string>
+ <key>IBFramework Version</key>
+ <string>364.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>5</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>7F44</string>
+</dict>
+</plist>
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib
new file mode 100644
index 00000000..d0ebc199
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/English.lproj/MCPConnectionWindow.nib/keyedobjects.nib
Binary files differ
diff --git a/MCPKit_bundled.framework/Versions/Current/Resources/Info.plist b/MCPKit_bundled.framework/Versions/Current/Resources/Info.plist
new file mode 100644
index 00000000..c5731f54
--- /dev/null
+++ b/MCPKit_bundled.framework/Versions/Current/Resources/Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>MCPKit_bundled</string>
+ <key>CFBundleIdentifier</key>
+ <string>net.chocolatnoir.MCPKit_bundled</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/MainController.h b/MainController.h
new file mode 100644
index 00000000..ac4349ce
--- /dev/null
+++ b/MainController.h
@@ -0,0 +1,109 @@
+//
+// MainController.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+
+
+@interface MainController : NSObject {
+
+ IBOutlet id keyChainInstance;
+
+ IBOutlet id preferencesWindow;
+ IBOutlet id favoriteSheet;
+ IBOutlet id reloadAfterAddingSwitch;
+ IBOutlet id reloadAfterEditingSwitch;
+ IBOutlet id reloadAfterRemovingSwitch;
+ IBOutlet id showErrorSwitch;
+ IBOutlet id dontShowBlobSwitch;
+ IBOutlet id useMonospacedFontsSwitch;
+ IBOutlet id fetchRowCountSwitch;
+ IBOutlet id limitRowsSwitch;
+ IBOutlet id limitRowsField;
+ IBOutlet id nullValueField;
+ IBOutlet id tableView;
+ IBOutlet id nameField;
+ IBOutlet id hostField;
+ IBOutlet id socketField;
+ IBOutlet id userField;
+ IBOutlet id passwordField;
+ IBOutlet id portField;
+ IBOutlet id databaseField;
+ IBOutlet id sshCheckbox;
+ IBOutlet id sshUserField;
+ IBOutlet id sshPasswordField;
+ IBOutlet id sshHostField;
+ IBOutlet id sshPortField;
+ IBOutlet id encodingPopUpButton;
+
+ NSMutableArray *favorites;
+ NSUserDefaults *prefs;
+
+ BOOL isNewFavorite;
+}
+
+//IBAction methods
+- (IBAction)openPreferences:(id)sender;
+- (IBAction)addFavorite:(id)sender;
+- (IBAction)removeFavorite:(id)sender;
+- (IBAction)copyFavorite:(id)sender;
+- (IBAction)chooseLimitRows:(id)sender;
+- (IBAction)closeFavoriteSheet:(id)sender;
+- (IBAction)toggleUseSSH:(id)sender;
+
+//services menu methods
+- (void)doPerformQueryService:(NSPasteboard *)pboard userData:(NSString *)data error:(NSString **)error;
+
+//menu methods
+- (IBAction)donate:(id)sender;
+- (IBAction)visitWebsite:(id)sender;
+- (IBAction)visitHelpWebsite:(id)sender;
+- (IBAction)checkForUpdates:(id)sender;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//tableView drag&drop datasource methods
+- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard;
+- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+ proposedDropOperation:(NSTableViewDropOperation)operation;
+- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(int)row
+ dropOperation:(NSTableViewDropOperation)operation;
+
+//tableView delegate methods
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
+
+//window delegate methods
+- (BOOL)windowShouldClose:(id)sender;
+
+//other methods
+- (void)awakeFromNib;
+
+//SSHTunnel methods
+- (id)authenticate:(NSScriptCommand *)command;
+- (id)handleQuitScriptCommand:(NSScriptCommand *)command;
+
+@end
diff --git a/MainController.m b/MainController.m
new file mode 100644
index 00000000..67afec9c
--- /dev/null
+++ b/MainController.m
@@ -0,0 +1,826 @@
+//
+// MainController.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "MainController.h"
+#import "KeyChain.h"
+#import "TableDocument.h"
+
+
+@implementation MainController
+
+- (IBAction)openPreferences:(id)sender
+/*
+opens the preferences window
+*/
+{
+//get favorites if they exist
+ [favorites release];
+ if ( [prefs objectForKey:@"favorites"] != nil ) {
+ favorites = [[NSMutableArray alloc] initWithArray:[prefs objectForKey:@"favorites"]];
+ } else {
+ favorites = [[NSMutableArray array] retain];
+ }
+ [tableView reloadData];
+
+ if ( [prefs boolForKey:@"reloadAfterAdding"] ) {
+ [reloadAfterAddingSwitch setState:NSOnState];
+ } else {
+ [reloadAfterAddingSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"reloadAfterEditing"] ) {
+ [reloadAfterEditingSwitch setState:NSOnState];
+ } else {
+ [reloadAfterEditingSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"reloadAfterRemoving"] ) {
+ [reloadAfterRemovingSwitch setState:NSOnState];
+ } else {
+ [reloadAfterRemovingSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"showError"] ) {
+ [showErrorSwitch setState:NSOnState];
+ } else {
+ [showErrorSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"dontShowBlob"] ) {
+ [dontShowBlobSwitch setState:NSOnState];
+ } else {
+ [dontShowBlobSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ [limitRowsSwitch setState:NSOnState];
+ } else {
+ [limitRowsSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [useMonospacedFontsSwitch setState:NSOnState];
+ } else {
+ [useMonospacedFontsSwitch setState:NSOffState];
+ }
+ if ( [prefs boolForKey:@"fetchRowCount"] ) {
+ [fetchRowCountSwitch setState:NSOnState];
+ } else {
+ [fetchRowCountSwitch setState:NSOffState];
+ }
+ [nullValueField setStringValue:[prefs stringForKey:@"nullValue"]];
+ [limitRowsField setStringValue:[prefs stringForKey:@"limitRowsValue"]];
+ [self chooseLimitRows:self];
+ [encodingPopUpButton selectItemWithTitle:[prefs stringForKey:@"encoding"]];
+
+ [preferencesWindow makeKeyAndOrderFront:self];
+}
+
+- (IBAction)addFavorite:(id)sender
+/*
+adds a favorite
+*/
+{
+ int code;
+
+ isNewFavorite = YES;
+
+ [nameField setStringValue:@""];
+ [hostField setStringValue:@""];
+ [socketField setStringValue:@""];
+ [userField setStringValue:@""];
+ [passwordField setStringValue:@""];
+ [portField setStringValue:@""];
+ [databaseField setStringValue:@""];
+ [sshCheckbox setState:NSOffState];
+ [sshUserField setEnabled:NO];
+ [sshPasswordField setEnabled:NO];
+ [sshHostField setEnabled:NO];
+ [sshPortField setEnabled:NO];
+ [sshHostField setStringValue:@""];
+ [sshUserField setStringValue:@""];
+ [sshPortField setStringValue:@"8888"];
+ [sshPasswordField setStringValue:@""];
+
+ [NSApp beginSheet:favoriteSheet
+ modalForWindow:preferencesWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:favoriteSheet];
+
+ [NSApp endSheet:favoriteSheet];
+ [favoriteSheet orderOut:nil];
+
+ if ( code == 1 ) {
+ if ( ![[socketField stringValue] isEqualToString:@""] ) {
+ //set host to localhost if socket is used
+ [hostField setStringValue:@"localhost"];
+ }
+ // get ssh settings
+ NSString *sshHost, *sshUser, *sshPassword, *sshPort;
+ NSNumber *ssh;
+ if ( [sshCheckbox state] == NSOnState ) {
+ if ( [[sshHostField stringValue] isEqualToString:@""] ) {
+ sshHost = [hostField stringValue];
+ } else {
+ sshHost = [sshHostField stringValue];
+ }
+ if ( [[sshUserField stringValue] isEqualToString:@""] ) {
+ sshUser = [userField stringValue];
+ } else {
+ sshUser = [sshUserField stringValue];
+ }
+ if ( [[sshPasswordField stringValue] isEqualToString:@""] ) {
+ sshPassword = [passwordField stringValue];
+ } else {
+ sshPassword = [sshPasswordField stringValue];
+ }
+ if ( [[sshPortField stringValue] isEqualToString:@""] ) {
+ sshPort = [portField stringValue];
+ } else {
+ sshPort = [sshPortField stringValue];
+ }
+ ssh = [NSNumber numberWithInt:1];
+ } else {
+ sshHost = @"";
+ sshUser = @"";
+ sshPassword = @"";
+ sshPort = @"";
+ ssh = [NSNumber numberWithInt:0];
+ }
+ NSDictionary *favorite = [NSDictionary
+ dictionaryWithObjects:[NSArray arrayWithObjects:[nameField stringValue], [hostField stringValue], [socketField stringValue], [userField stringValue], [portField stringValue], [databaseField stringValue], ssh, sshHost, sshUser, sshPort, nil]
+ forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", @"useSSH", @"sshHost", @"sshUser", @"sshPort", nil]];
+ [favorites addObject:favorite];
+ if ( ![[passwordField stringValue] isEqualToString:@""] )
+ [keyChainInstance addPassword:[passwordField stringValue]
+ forName:[NSString stringWithFormat:@"CocoaMySQL : %@", [nameField stringValue]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue],
+ [databaseField stringValue]]];
+ if ( ![sshPassword isEqualToString:@""] )
+ [keyChainInstance addPassword:sshPassword
+ forName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", [nameField stringValue]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue],
+ [databaseField stringValue]]];
+ [tableView reloadData];
+ [tableView selectRow:[tableView numberOfRows]-1 byExtendingSelection:NO];
+ }
+
+ isNewFavorite = NO;
+}
+
+- (IBAction)removeFavorite:(id)sender
+/*
+removes a favorite
+*/
+{
+ if ( ![tableView numberOfSelectedRows] )
+ return;
+
+ NSString *name = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"name"];
+ NSString *user = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"user"];
+ NSString *host = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"host"];
+ NSString *database = [[favorites objectAtIndex:[tableView selectedRow]] objectForKey:@"database"];
+ [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"CocoaMySQL : %@", name]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]];
+ [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", name]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]];
+ [favorites removeObjectAtIndex:[tableView selectedRow]];
+ [tableView reloadData];
+}
+
+- (IBAction)copyFavorite:(id)sender
+/*
+copies a favorite
+*/
+{
+ if ( ![tableView numberOfSelectedRows] )
+ return;
+
+ NSMutableDictionary *tempDictionary = [NSMutableDictionary dictionaryWithDictionary:[favorites objectAtIndex:[tableView selectedRow]]];
+ [tempDictionary setObject:[NSString stringWithFormat:@"%@Copy", [tempDictionary objectForKey:@"name"]] forKey:@"name"];
+// [tempDictionary setObject:[NSString stringWithFormat:@"%@Copy", [tempDictionary objectForKey:@"user"]] forKey:@"user"];
+
+ [favorites insertObject:tempDictionary atIndex:[tableView selectedRow]+1];
+ [tableView selectRow:[tableView selectedRow]+1 byExtendingSelection:NO];
+
+ [tableView reloadData];
+}
+
+- (IBAction)chooseLimitRows:(id)sender
+/*
+enables or disables limitRowsField (depending on the state of limitRowsSwitch)
+*/
+{
+ if ( [limitRowsSwitch state] == NSOnState ) {
+ [limitRowsField setEnabled:YES];
+ [limitRowsField selectText:self];
+ } else {
+ [limitRowsField setEnabled:NO];
+ }
+}
+
+- (IBAction)closeFavoriteSheet:(id)sender
+/*
+close the favoriteSheet and save favorite if user hit save
+*/
+{
+ NSEnumerator *enumerator = [favorites objectEnumerator];
+ id favorite;
+ int count;
+
+//test if user has entered at least name and host/socket
+ if ( [sender tag] &&
+ ([[nameField stringValue] isEqualToString:@""] ||
+ ([[hostField stringValue] isEqualToString:@""] && [[socketField stringValue] isEqualToString:@""])) ) {
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Please enter at least name and host or socket!", @"message of panel when name/host/socket are missing"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ return;
+ }
+
+//test if favorite name isn't used by another favorite
+ count = 0;
+ if ( [sender tag] ) {
+ while ( (favorite = [enumerator nextObject]) ) {
+ if ( [[favorite objectForKey:@"name"] isEqualToString:[nameField stringValue]] )
+ {
+ if ( isNewFavorite || (!isNewFavorite && (count != [tableView selectedRow])) ) {
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), [NSString stringWithFormat:NSLocalizedString(@"Favorite %@ has already been saved!\nPlease specify another name.", @"message of panel when favorite name has already been used"), [nameField stringValue]], NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ return;
+ }
+ }
+/*
+ if ( [[favorite objectForKey:@"host"] isEqualToString:[hostField stringValue]] &&
+ [[favorite objectForKey:@"user"] isEqualToString:[userField stringValue]] &&
+ [[favorite objectForKey:@"database"] isEqualToString:[databaseField stringValue]] ) {
+ if ( isNewFavorite || (!isNewFavorite && (count != [tableView selectedRow])) ) {
+ NSRunAlertPanel(@"Error", @"There is already a favorite with the same host, user and database!", @"OK", nil, nil);
+ return;
+ }
+ }
+*/
+ count++;
+ }
+ }
+
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+- (IBAction)toggleUseSSH:(id)sender
+/*
+enables/disables ssh tunneling
+*/
+{
+ if ( [sshCheckbox state] == NSOnState ) {
+ [sshUserField setEnabled:YES];
+ [sshPasswordField setEnabled:YES];
+ [sshHostField setEnabled:YES];
+ [sshPortField setEnabled:YES];
+ } else {
+ [sshUserField setEnabled:NO];
+ [sshPasswordField setEnabled:NO];
+ [sshHostField setEnabled:NO];
+ [sshPortField setEnabled:NO];
+ }
+}
+
+//services menu methods
+- (void)doPerformQueryService:(NSPasteboard *)pboard userData:(NSString *)data error:(NSString **)error
+/*
+passes the query to the last created document
+*/
+{
+ NSString *pboardString;
+ NSArray *types;
+
+ types = [pboard types];
+
+ if (![types containsObject:NSStringPboardType] || !(pboardString = [pboard stringForType:NSStringPboardType])) {
+ *error = @"Pasteboard couldn't give string.";
+ return;
+ }
+
+//check if there exists a document
+ if ( ![[[NSDocumentController sharedDocumentController] documents] count] ) {
+ *error = @"No Documents open!";
+ return;
+ }
+
+//pass query to last created document
+// [[[NSDocumentController sharedDocumentController] currentDocument] doPerformQueryService:pboardString];
+ [[[[NSDocumentController sharedDocumentController] documents] objectAtIndex:[[[NSDocumentController sharedDocumentController] documents] count]-1] doPerformQueryService:pboardString];
+
+ return;
+}
+
+
+//menu methods
+- (IBAction)donate:(id)sender
+/*
+opens donate link in default browser
+*/
+{
+ [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.paypal.com/xclick/business=lorenz%40textor.ch&item_name=CocoaMySQL+donation&no_shipping=1&return=http%3A//cocoamysql.sourceforge.net/thanks.html&cancel_return=http%3A//cocoamysql.sourceforge.net/thanks.html&cn=Note&tax=0&currency_code=USD"]];
+}
+
+//menu methods
+- (IBAction)visitWebsite:(id)sender
+/*
+opens donate link in default browser
+*/
+{
+ [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://cocoamysql.sourceforge.net"]];
+}
+
+- (IBAction)visitHelpWebsite:(id)sender
+/*
+opens donate link in default browser
+*/
+{
+ [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://cocoamysql.sourceforge.net/faq.php"]];
+}
+
+- (IBAction)checkForUpdates:(id)sender
+/*
+checks for updates and opens download page in default browser
+*/
+{
+ CMMCPConnection *tempConnection = [[CMMCPConnection alloc] initToHost:@"cocoamysql.textor.ch"
+ withLogin:@"cocoamysql"
+ password:@""
+ usingPort:nil];
+ CMMCPResult *tempResult;
+ NSString *version;
+ int code;
+
+//connect to db
+ if ( ![tempConnection isConnected] ) {
+ //no connection
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Error while trying to get the current version number!\nBe sure that you are connected to the internet and try again later.", @"message of panel when check for current version number failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ return;
+ }
+ if ( ![tempConnection selectDB:@"usr_web8_1"] ) {
+ //db not found
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Error while trying to get the current version number!\nBe sure that you are connected to the internet and try again later.", @"message of panel when check for current version number failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ return;
+ }
+//get current version
+ tempResult = [tempConnection queryString:@"SELECT * FROM cocoamysql"];
+ if ( ![tempResult numOfRows] ) {
+ //error in query
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Error while trying to get the current version number!\nBe sure that you are connected to the internet and try again later.", @"message of panel when check for current version number failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ return;
+ }
+ version = [[tempResult fetchRowAsArray] objectAtIndex:0];
+//check versions
+ if ( [version isEqualToString:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] ) {
+ //no new version
+ NSRunInformationalAlertPanel(NSLocalizedString(@"No update available", @"title of panel when no update is available"), NSLocalizedString(@"There is no newer version available!", @"message of panel when no update is available"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ } else {
+ //new version available
+ code = NSRunInformationalAlertPanel(NSLocalizedString(@"Update available", @"title of panel when update is available"), [NSString stringWithFormat:NSLocalizedString(@"There is a newer version available (version %@)!\nClick OK to open the download site.", @"message of panel when update is available"), version], NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil);
+ if ( code == NSAlertDefaultReturn ) {
+ [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://cocoamysql.sourceforge.net/download.php"]];
+ }
+ }
+ [tempConnection disconnect];
+ [tempConnection release];
+}
+
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ return [favorites count];
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ return [[favorites objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
+}
+
+
+//tableView drag&drop datasource methods
+- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard
+{
+ int originalRow;
+ NSArray *pboardTypes;
+
+ if ( [rows count] == 1 ) {
+ pboardTypes=[NSArray arrayWithObjects:@"CocoaMySQLPreferencesPasteboard", nil];
+ originalRow = [[rows objectAtIndex:0] intValue];
+
+ [pboard declareTypes:pboardTypes owner:nil];
+ [pboard setString:[[NSNumber numberWithInt:originalRow] stringValue] forType:@"CocoaMySQLPreferencesPasteboard"];
+
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+ proposedDropOperation:(NSTableViewDropOperation)operation
+{
+ NSArray *pboardTypes = [[info draggingPasteboard] types];
+ int originalRow;
+
+ if ([pboardTypes count] == 1 && row != -1)
+ {
+ if ([[pboardTypes objectAtIndex:0] isEqualToString:@"CocoaMySQLPreferencesPasteboard"]==YES && operation==NSTableViewDropAbove)
+ {
+ originalRow = [[[info draggingPasteboard] stringForType:@"CocoaMySQLPreferencesPasteboard"] intValue];
+
+ if (row != originalRow && row != (originalRow+1))
+ {
+ return NSDragOperationMove;
+ }
+ }
+ }
+
+ return NSDragOperationNone;
+}
+
+- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation
+{
+ int originalRow;
+ int destinationRow;
+ NSMutableDictionary *draggedRow;
+
+ originalRow = [[[info draggingPasteboard] stringForType:@"CocoaMySQLPreferencesPasteboard"] intValue];
+ destinationRow = row;
+
+ if ( destinationRow > originalRow )
+ destinationRow--;
+
+ draggedRow = [NSMutableDictionary dictionaryWithDictionary:[favorites objectAtIndex:originalRow]];
+ [favorites removeObjectAtIndex:originalRow];
+ [favorites insertObject:draggedRow atIndex:destinationRow];
+
+ [tableView reloadData];
+ [tableView selectRow:destinationRow byExtendingSelection:NO];
+
+ return YES;
+}
+
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
+/*
+opens sheet to edit favorite and saves favorite if user hit OK
+*/
+{
+ int code;
+ NSDictionary *favorite = [favorites objectAtIndex:rowIndex];
+
+// set up fields
+ [nameField setStringValue:[favorite objectForKey:@"name"]];
+ [hostField setStringValue:[favorite objectForKey:@"host"]];
+ [socketField setStringValue:[favorite objectForKey:@"socket"]];
+ [userField setStringValue:[favorite objectForKey:@"user"]];
+ [portField setStringValue:[favorite objectForKey:@"port"]];
+ [databaseField setStringValue:[favorite objectForKey:@"database"]];
+ [passwordField setStringValue:[keyChainInstance
+ getPasswordForName:[NSString stringWithFormat:@"CocoaMySQL : %@", [nameField stringValue]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue],
+ [databaseField stringValue]]]];
+// set up ssh fields
+ if ( [[favorite objectForKey:@"useSSH"] intValue] == 1 ) {
+ [sshCheckbox setState:NSOnState];
+ [sshUserField setEnabled:YES];
+ [sshPasswordField setEnabled:YES];
+ [sshHostField setEnabled:YES];
+ [sshPortField setEnabled:YES];
+ [sshHostField setStringValue:[favorite objectForKey:@"sshHost"]];
+ [sshUserField setStringValue:[favorite objectForKey:@"sshUser"]];
+ [sshPortField setStringValue:[favorite objectForKey:@"sshPort"]];
+ [sshPasswordField setStringValue:[keyChainInstance
+ getPasswordForName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", [nameField stringValue]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue],
+ [databaseField stringValue]]]];
+ } else {
+ [sshCheckbox setState:NSOffState];
+ [sshUserField setEnabled:NO];
+ [sshPasswordField setEnabled:NO];
+ [sshHostField setEnabled:NO];
+ [sshPortField setEnabled:NO];
+ [sshHostField setStringValue:@""];
+ [sshUserField setStringValue:@""];
+ [sshPortField setStringValue:@""];
+ [sshPasswordField setStringValue:@""];
+ }
+
+
+// run sheet
+ [NSApp beginSheet:favoriteSheet
+ modalForWindow:preferencesWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:favoriteSheet];
+
+ [NSApp endSheet:favoriteSheet];
+ [favoriteSheet orderOut:nil];
+
+ if ( code == 1 ) {
+ if ( ![[socketField stringValue] isEqualToString:@""] ) {
+ //set host to localhost if socket is used
+ [hostField setStringValue:@"localhost"];
+ }
+//get ssh settings
+ NSString *sshHost, *sshUser, *sshPassword, *sshPort;
+ NSNumber *ssh;
+ if ( [sshCheckbox state] == NSOnState ) {
+ if ( [[sshHostField stringValue] isEqualToString:@""] ) {
+ sshHost = [hostField stringValue];
+ } else {
+ sshHost = [sshHostField stringValue];
+ }
+ if ( [[sshUserField stringValue] isEqualToString:@""] ) {
+ sshUser = [userField stringValue];
+ } else {
+ sshUser = [sshUserField stringValue];
+ }
+ if ( [[sshPasswordField stringValue] isEqualToString:@""] ) {
+ sshPassword = [passwordField stringValue];
+ } else {
+ sshPassword = [sshPasswordField stringValue];
+ }
+ if ( [[sshPortField stringValue] isEqualToString:@""] ) {
+ sshPort = [portField stringValue];
+ } else {
+ sshPort = [sshPortField stringValue];
+ }
+ ssh = [NSNumber numberWithInt:1];
+ } else {
+ sshHost = @"";
+ sshUser = @"";
+ sshPassword = @"";
+ sshPort = @"";
+ ssh = [NSNumber numberWithInt:0];
+ }
+//replace password
+ [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"CocoaMySQL : %@", [favorite objectForKey:@"name"]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [favorite objectForKey:@"user"],
+ [favorite objectForKey:@"host"], [favorite objectForKey:@"database"]]];
+ if ( ![[passwordField stringValue] isEqualToString:@""] )
+ [keyChainInstance addPassword:[passwordField stringValue]
+ forName:[NSString stringWithFormat:@"CocoaMySQL : %@", [nameField stringValue]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue],
+ [databaseField stringValue]]];
+//replace ssh password
+ [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", [favorite objectForKey:@"name"]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [favorite objectForKey:@"user"],
+ [favorite objectForKey:@"host"], [favorite objectForKey:@"database"]]];
+ if ( ([sshCheckbox state] == NSOnState) && ![sshPassword isEqualToString:@""] ) {
+ [keyChainInstance addPassword:sshPassword
+ forName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", [nameField stringValue]]
+ account:[NSString stringWithFormat:@"%@@%@/%@", [userField stringValue], [hostField stringValue],
+ [databaseField stringValue]]];
+ }
+//replace favorite
+ favorite = [NSDictionary
+ dictionaryWithObjects:[NSArray arrayWithObjects:[nameField stringValue], [hostField stringValue], [socketField stringValue], [userField stringValue], [portField stringValue], [databaseField stringValue], ssh, sshHost, sshUser, sshPort, nil]
+ forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", @"useSSH", @"sshHost", @"sshUser", @"sshPort", nil]];
+ [favorites replaceObjectAtIndex:rowIndex withObject:favorite];
+ [tableView reloadData];
+ }
+
+ return NO;
+}
+
+
+//window delegate methods
+- (BOOL)windowShouldClose:(id)sender
+/*
+saves the preferences
+*/
+{
+ if ( sender == preferencesWindow ) {
+ if ( [reloadAfterAddingSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"reloadAfterAdding"];
+ } else {
+ [prefs setBool:NO forKey:@"reloadAfterAdding"];
+ }
+ if ( [reloadAfterEditingSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"reloadAfterEditing"];
+ } else {
+ [prefs setBool:NO forKey:@"reloadAfterEditing"];
+ }
+ if ( [reloadAfterRemovingSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"reloadAfterRemoving"];
+ } else {
+ [prefs setBool:NO forKey:@"reloadAfterRemoving"];
+ }
+ if ( [showErrorSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"showError"];
+ } else {
+ [prefs setBool:NO forKey:@"showError"];
+ }
+ if ( [dontShowBlobSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"dontShowBlob"];
+ } else {
+ [prefs setBool:NO forKey:@"dontShowBlob"];
+ }
+ if ( [limitRowsSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"limitRows"];
+ } else {
+ [prefs setBool:NO forKey:@"limitRows"];
+ }
+ if ( [useMonospacedFontsSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"useMonospacedFonts"];
+ } else {
+ [prefs setBool:NO forKey:@"useMonospacedFonts"];
+ }
+ if ( [fetchRowCountSwitch state] == NSOnState ) {
+ [prefs setBool:YES forKey:@"fetchRowCount"];
+ } else {
+ [prefs setBool:NO forKey:@"fetchRowCount"];
+ }
+ [prefs setObject:[nullValueField stringValue] forKey:@"nullValue"];
+ if ( [limitRowsField intValue] > 0 ) {
+ [prefs setInteger:[limitRowsField intValue] forKey:@"limitRowsValue"];
+ } else {
+ [prefs setInteger:1 forKey:@"limitRowsValue"];
+ }
+ [prefs setObject:[encodingPopUpButton titleOfSelectedItem] forKey:@"encoding"];
+
+ [prefs setObject:favorites forKey:@"favorites"];
+ }
+ return YES;
+}
+
+
+//other methods
+- (void)awakeFromNib
+/*
+code that need to be executed when the nib file is loaded
+*/
+{
+ NSEnumerator *enumerator;
+ id favorite;
+ NSString *name, *host, *user, *database, *password;
+ int code;
+
+//register MainController as services provider
+ [NSApp setServicesProvider:self];
+
+//register MainController for AppleScript events
+ [[ NSScriptExecutionContext sharedScriptExecutionContext] setTopLevelObject: self ];
+
+ prefs = [[NSUserDefaults standardUserDefaults] retain];
+ isNewFavorite = NO;
+
+//set standard preferences if no preferences are found
+ if ( [prefs objectForKey:@"reloadAfterAdding"] == nil )
+ {
+ [prefs setObject:@"0.3" forKey:@"version"];
+ [prefs setBool:YES forKey:@"reloadAfterAdding"];
+ [prefs setBool:YES forKey:@"reloadAfterEditing"];
+ [prefs setBool:NO forKey:@"reloadAfterRemoving"];
+ [prefs setObject:@"NULL" forKey:@"nullValue"];
+// [prefs setBool:YES forKey:@"showError"];
+// [prefs setBool:NO forKey:@"dontShowBlob"];
+// [prefs setBool:NO forKey:@"limitRows"];
+// [prefs setInteger:100 forKey:@"limitRowsValue"];
+// [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"savePath"];
+// [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"openPath"];
+ }
+
+//new preferences and changes in v0.4
+ if ( [prefs objectForKey:@"showError"] == nil )
+ {
+ [prefs setObject:@"0.4" forKey:@"version"];
+ //set standard values for new preferences
+ [prefs setBool:YES forKey:@"showError"];
+ [prefs setBool:NO forKey:@"dontShowBlob"];
+ [prefs setBool:NO forKey:@"limitRows"];
+ [prefs setInteger:100 forKey:@"limitRowsValue"];
+ [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"savePath"];
+ [prefs setObject:[NSString stringWithString:NSHomeDirectory()] forKey:@"openPath"];
+ //remove old preferences
+ [prefs removeObjectForKey:@"allowDragAndDropReordering"];
+ //rewrite passwords to keychain (with new format)
+ if ( [prefs objectForKey:@"favorites"] ) {
+ NSRunAlertPanel(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"With version 0.4 CocoaMySQL has introduced a new format to save passwords in the Keychain.\nPlease allow CocoaMySQL to decrypt all passwords of your favorites. Otherwise you have to reenter all passwords of your saved favorites in the Preferences.", @"message of panel when passwords have to be updated for v0.4"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ enumerator = [[prefs objectForKey:@"favorites"] objectEnumerator];
+ while ( (favorite = [enumerator nextObject]) ) {
+ //replace password
+ name = [favorite objectForKey:@"name"];
+ host = [favorite objectForKey:@"host"];
+ user = [favorite objectForKey:@"user"];
+ database = [favorite objectForKey:@"database"];
+ password = [keyChainInstance getPasswordForName:[NSString stringWithFormat:@"%@/%@", host, database]
+ account:user];
+ [keyChainInstance deletePasswordForName:[NSString stringWithFormat:@"%@/%@", host, database] account:user];
+ if ( ![password isEqualToString:@""] )
+ [keyChainInstance addPassword:password
+ forName:[NSString stringWithFormat:@"CocoaMySQL : %@", name]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]];
+ }
+ }
+ }
+//new preferences and changes in v0.5
+ if ( [[prefs objectForKey:@"version"] isEqualToString:@"0.4"] )
+ {
+ [prefs setObject:@"0.5" forKey:@"version"];
+ //set standard values for new preferences
+ [prefs setObject:@"ISO Latin 1" forKey:@"encoding"];
+ [prefs setBool:NO forKey:@"useMonospacedFonts"];
+ //add socket field to favorites
+ if ( [prefs objectForKey:@"favorites"] ) {
+ NSMutableArray *tempFavorites = [NSMutableArray array];
+ NSMutableDictionary *tempFavorite;
+ enumerator = [[prefs objectForKey:@"favorites"] objectEnumerator];
+ while ( (favorite = [enumerator nextObject]) ) {
+ tempFavorite = [NSMutableDictionary dictionaryWithDictionary:favorite];
+ [tempFavorite setObject:@"" forKey:@"socket"];
+ [tempFavorites addObject:[NSDictionary dictionaryWithDictionary:tempFavorite]];
+ }
+ [prefs setObject:tempFavorites forKey:@"favorites"];
+ }
+ }
+//new preferences and changes in v0.7
+ if ( [[prefs objectForKey:@"version"] isEqualToString:@"0.5"] ||
+ [[prefs objectForKey:@"version"] isEqualToString:@"0.6beta"] ||
+ [[prefs objectForKey:@"version"] isEqualToString:@"0.7b2"] )
+ {
+ [prefs setObject:@"0.7b3" forKey:@"version"];
+ [prefs setObject:@"Autodetect" forKey:@"encoding"];
+ [prefs setBool:YES forKey:@"fetchRowCount"];
+ code = NSRunInformationalAlertPanel(NSLocalizedString(@"Donation", @"title of donation panel"), NSLocalizedString(@"CocoaMySQL lives from donations. Thank you for donating!","message of donation panel"), NSLocalizedString(@"Donate", @"donate button"), NSLocalizedString(@"Later", @"later button"), nil);
+ if ( code == NSAlertDefaultReturn ) {
+ [self donate:self];
+ }
+ }
+
+//set up interface
+/*
+ enumerator = [tableColumns objectEnumerator];
+ while ( (column = [enumerator nextObject]) )
+ {
+ [[column dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+*/
+ [tableView registerForDraggedTypes:[NSArray arrayWithObjects:@"CocoaMySQLPreferencesPasteboard", nil]];
+ [tableView reloadData];
+}
+
+
+// SSHTunnel methods
+- (id)authenticate:(NSScriptCommand *)command {
+ NSDictionary *args = [command evaluatedArguments];
+ NSString *givenQuery = [ args objectForKey:@"query"];
+ NSString *tunnelName = [ args objectForKey:@"tunnelName"];
+ NSString *fifo = [ args objectForKey:@"fifo"];
+NSLog(@"tunnel: %@ / query: %@ / fifo: %@",tunnelName,givenQuery,fifo);
+ NSFileHandle *fh = [ NSFileHandle fileHandleForWritingAtPath: fifo ];
+ [ fh writeData: [ @"xy" dataUsingEncoding: NSASCIIStringEncoding]];
+ [ fh closeFile ];
+NSLog(@"password written");
+ return @"OK";
+
+/*
+ [ query setStringValue: givenQuery ];
+ [NSApp beginSheet: alertSheet
+ modalForWindow: mainWindow
+ modalDelegate: nil
+ didEndSelector: nil
+ contextInfo: nil];
+ [NSApp runModalForWindow: alertSheet];
+ // Sheet is up here.
+ [NSApp endSheet: alertSheet];
+ [alertSheet orderOut: self];
+ if ( sheetStatus == 0)
+ {
+ password = [ passwd stringValue ];
+ [ passwd setStringValue: @"" ];
+ return password ;
+ }
+ else
+ {
+ [[tunnelTask objectForKey: @"task" ] terminate ];
+ }
+ sheetStatus = nil;
+ return @"";
+*/
+}
+
+- (id)handleQuitScriptCommand:(NSScriptCommand *)command
+/* what exactly is this for? */
+{
+ [ NSApp terminate: self ];
+}
+
+@end
diff --git a/SSHTunnel.h b/SSHTunnel.h
new file mode 100644
index 00000000..b945f205
--- /dev/null
+++ b/SSHTunnel.h
@@ -0,0 +1,57 @@
+#import <Cocoa/Cocoa.h>
+
+@interface SSHTunnel : NSObject
+{
+ int code;
+ NSArray *tunnelsLocal;
+ NSArray *tunnelsRemote;
+
+ BOOL shouldStop;
+ NSTask *task;
+ BOOL connAuth;
+ BOOL autoConnect;
+ NSPipe *stdErrPipe;
+ NSString *connName;
+ NSString *status;
+ NSString *connPort;
+ BOOL connRemote;
+ BOOL compression;
+ BOOL v1;
+ NSString * encryption;
+ BOOL socks4;
+ NSNumber *socks4p;
+ NSString *connUser;
+ NSString *connHost;
+}
+-(id)initWithName:(NSString*)aName;
+-(id)initWithDictionary:(NSDictionary*)aDictionary;
++(id)tunnelWithName:(NSString*)aName;
++(NSArray*)tunnelsFromArray:(NSArray*)anArray;
+
+-(void)addLocalTunnel:(NSDictionary*)aDictionary;
+- (void)removeLocal:(int)index;
+-(void)addRemoteTunnel:(NSDictionary*)aDictionary;
+- (void)removeRemote:(int)index;
+- (void)setLocalValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key;
+- (void)setRemoteValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key;
+
+#pragma mark -
+#pragma mark Execution related
+- (void)startTunnel;
+- (void)stopTunnel;
+- (void)toggleTunnel;
+- (void)launchTunnel:(id)foo;
+- (void)stdErr:(NSNotification*)aNotification;
+- (BOOL)isRunning;
+
+#pragma mark -
+#pragma mark Getting tunnel informations
+- (NSString*)status;
+- (NSArray*)arguments;
+- (NSDictionary*)dictionary;
+
+#pragma mark -
+#pragma mark Key/Value coding
+- (NSImage*)icon;
+
+@end
diff --git a/SSHTunnel.m b/SSHTunnel.m
new file mode 100755
index 00000000..a2d8e1f7
--- /dev/null
+++ b/SSHTunnel.m
@@ -0,0 +1,531 @@
+//
+// SSHTunnel.m
+// SSH Tunnel Manager 2
+//
+// Created by Yann Bizeul on Wed Nov 19 2003.
+// Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+//
+
+#import "SSHTunnel.h"
+#include <unistd.h>
+
+// start diff lorenz textor
+/*
+#define T_START NSLocalizedString(@"T_START",@"")
+#define T_STOP NSLocalizedString(@"T_STOP",@"")
+#define S_IDLE NSLocalizedString(@"S_IDLE",@"")
+#define S_CONNECTING NSLocalizedString(@"S_CONNECTING",@"")
+#define S_CONNECTED NSLocalizedString(@"S_CONNECTED",@"")
+#define S_AUTH NSLocalizedString(@"S_AUTH",@"")
+#define S_PORT NSLocalizedString(@"S_PORT",@"")
+*/
+#define T_START @"START: %@"
+#define T_STOP @"STOP: %@"
+#define S_IDLE @"Idle"
+#define S_CONNECTING @"Connecting..."
+#define S_CONNECTED @"Connected"
+#define S_AUTH @"Authenticated"
+#define S_PORT "Port %@ forwarded"
+// end diff lorenz textor
+
+@implementation SSHTunnel
+
+#pragma mark -
+#pragma mark Initialization
+-(id)init
+{
+ return [ self initWithName:@"New Tunnel"];
+}
+-(id)initWithName:(NSString*)aName
+{
+ NSDictionary *dictionary = [ NSDictionary dictionaryWithObjectsAndKeys:
+ [ NSNumber numberWithBool: NO ],@"compression",
+ [ NSNumber numberWithBool: YES ],@"connAuth",
+ @"", @"connHost",
+ aName, @"connName",
+ @"", @"connPort",
+ [ NSNumber numberWithBool: NO ],@"connRemote",
+ @"", @"connUser",
+ @"3des", @"encryption",
+ [ NSNumber numberWithBool: NO ],@"socks4",
+ [ NSNumber numberWithInt: 1080 ], @"socks4p",
+ [ NSArray array ], @"tunnelsLocal",
+ [ NSArray array ], @"tunnelsRemote",
+ [ NSNumber numberWithBool: NO ],@"v1", nil
+ ];
+ return [ self initWithDictionary: dictionary ];
+}
+-(id)initWithDictionary:(NSDictionary*)aDictionary
+{
+ NSEnumerator *e;
+ NSString *key;
+
+ self = [ super init ];
+ e = [[ aDictionary allKeys ] objectEnumerator ];
+ while (key = [ e nextObject ])
+ {
+ [ self setValue: [ aDictionary objectForKey: key ] forKey: key ];
+ }
+ code = 0;
+ if ([[ self valueForKey: @"autoConnect" ] boolValue ])
+ [ self startTunnel ];
+ return self;
+}
++(id)tunnelWithName:(NSString*)aName
+{
+ return [[ SSHTunnel alloc ] initWithName: aName ];
+}
++(SSHTunnel*)tunnelFromDictionary:(NSDictionary*)aDictionary
+{
+ return [[ SSHTunnel alloc ] initWithDictionary: aDictionary ];
+}
++(NSArray*)tunnelsFromArray:(NSArray*)anArray
+{
+ NSMutableArray *newArray;
+ SSHTunnel *currentTunnel;
+ NSEnumerator *e;
+ NSDictionary *currentTunnelDictionary;
+
+ newArray = [ NSMutableArray array ];
+ e = [ anArray objectEnumerator ];
+ while (currentTunnelDictionary = [ e nextObject ])
+ {
+ currentTunnel = [ SSHTunnel tunnelFromDictionary: currentTunnelDictionary ];
+ [ newArray addObject: currentTunnel ];
+ }
+ return [[ newArray copy ] autorelease ];
+}
+
+#pragma mark -
+#pragma mark Adding and removing port redir.
+-(void)addLocalTunnel:(NSDictionary*)aDictionary;
+{
+ NSMutableArray *tempTunnelsLocal = [ NSMutableArray arrayWithArray: tunnelsLocal ];
+ [ tempTunnelsLocal addObject: aDictionary ];
+ [ tunnelsLocal release ];
+ tunnelsLocal = [ tempTunnelsLocal copy ];
+}
+- (void)removeLocal:(int)index
+{
+ NSMutableArray *tempLocalTunnels = [ tunnelsLocal mutableCopy ];
+ [ tempLocalTunnels removeObjectAtIndex: index ];
+ [ tunnelsLocal release ];
+ tunnelsLocal = [ tempLocalTunnels copy ];
+ [ tempLocalTunnels release ];
+}
+-(void)addRemoteTunnel:(NSDictionary*)aDictionary;
+{
+ NSMutableArray *tempTunnelsRemote = [ NSMutableArray arrayWithArray: tunnelsRemote ];
+ [ tempTunnelsRemote addObject: aDictionary ];
+ [ tunnelsRemote release ];
+ tunnelsRemote = [ tempTunnelsRemote copy ];
+}
+- (void)removeRemote:(int)index
+{
+ NSMutableArray *tempRemoteTunnels = [ tunnelsRemote mutableCopy ];
+ [ tempRemoteTunnels removeObjectAtIndex: index ];
+ [ tunnelsRemote release ];
+ tunnelsRemote = [ tempRemoteTunnels copy ];
+ [ tempRemoteTunnels release ];
+}
+- (void)setLocalValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key
+{
+ NSMutableArray *tempLocalTunnel;
+ NSMutableDictionary *tempCurrentTunnel;
+
+ tempLocalTunnel = [tunnelsLocal mutableCopy];
+ tempCurrentTunnel = [[ tempLocalTunnel objectAtIndex: index ] mutableCopy ];
+
+ [ tempCurrentTunnel setObject: aValue forKey: key ];
+ [ tempLocalTunnel replaceObjectAtIndex:index withObject:[tempCurrentTunnel copy ]];
+ [ tempCurrentTunnel release ];
+ [ tunnelsLocal release ];
+ tunnelsLocal = [ tempLocalTunnel copy ];
+}
+- (void)setRemoteValue:(NSString*)aValue ofTunnel:(int)index forKey:(NSString*)key
+{
+ NSMutableArray *tempRemoteTunnel;
+ NSMutableDictionary *tempCurrentTunnel;
+
+ tempRemoteTunnel = [tunnelsRemote mutableCopy];
+ tempCurrentTunnel = [[ tempRemoteTunnel objectAtIndex: index ] mutableCopy ];
+
+ [ tempCurrentTunnel setObject: aValue forKey: key ];
+ [ tempRemoteTunnel replaceObjectAtIndex:index withObject:[tempCurrentTunnel copy ]];
+ [ tempCurrentTunnel release ];
+ [ tunnelsRemote release ];
+ tunnelsRemote = [ tempRemoteTunnel copy ];
+}
+
+#pragma mark -
+#pragma mark Execution related
+- (void)startTunnel
+{
+// NSDictionary *t;
+// NSEnumerator *e;
+// BOOL asRoot = NO;
+
+ if ([ self isRunning ])
+ return;
+
+ shouldStop = NO;
+ /*
+ [ arguments addObject: @"-N" ];
+ [ arguments addObject: @"-v" ];
+ [ arguments addObject: @"-p" ];
+ if ([ connPort length ])
+ [ arguments addObject: connPort];
+ else
+ [ arguments addObject: @"22" ];
+
+ if (connRemote)
+ [ arguments addObject: @"-g" ];
+ if (compression)
+ [ arguments addObject: @"-C" ];
+ if (v1)
+ [ arguments addObject: @"-1" ];
+
+ [ arguments addObject: @"-c"];
+ if (encryption)
+ [ arguments addObject: encryption];
+ else
+ [ arguments addObject: @"3des"];
+
+ if (socks4 && socks4p != nil)
+ {
+ [ arguments addObject: @"-D" ];
+ [ arguments addObject: [ socks4p stringValue ]];
+ }
+ [ arguments addObject: [ NSString stringWithFormat: @"%@@%@",
+ connUser, connHost ]
+ ];
+
+ NSString *hostPort;
+ e = [ tunnelsLocal objectEnumerator ];
+ while (t = [ e nextObject ])
+ {
+ [ arguments addObject: @"-L" ];
+ if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ])
+ hostPort = [ t objectForKey:@"port" ];
+ else
+ hostPort = [ t objectForKey:@"hostport" ];
+ [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@",
+ [ t objectForKey:@"port"],
+ [ t objectForKey:@"host"],
+ hostPort
+ ] ];
+ if ([[ t objectForKey:@"port"] intValue] < 1024)
+ asRoot=YES;
+ }
+
+ e = [ tunnelsRemote objectEnumerator ];
+ while (t = [ e nextObject ])
+ {
+ [ arguments addObject: @"-R" ];
+ if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ])
+ hostPort = [ t objectForKey:@"port" ];
+ else
+ hostPort = [ t objectForKey:@"hostport" ];
+ [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@",
+ [ t objectForKey:@"port"],
+ [ t objectForKey:@"host"],
+ hostPort
+ ]];
+ }
+ args = [ NSMutableDictionary dictionary ];
+ [ args setObject: arguments forKey:@"arguments" ];
+ [ args setObject: [ NSNumber numberWithBool: connAuth ] forKey: @"handleAuth" ];
+ [ args setObject: connName forKey:@"tunnelName" ];
+ [ args setObject: [ NSNumber numberWithBool: asRoot ] forKey: @"asRoot" ];
+
+
+ [ NSThread detachNewThreadSelector:@selector(launchTunnel:)
+ toTarget: self
+ withObject: args ];
+ */
+ [ NSThread detachNewThreadSelector:@selector(launchTunnel:)
+ toTarget: self
+ withObject: nil ];
+// [ arguments release ];
+
+}
+- (void)stopTunnel
+{
+ if (! [ self isRunning ])
+ return;
+ shouldStop=YES;
+ [ self setValue: nil forKey: @"status" ];
+ [ task terminate ];
+ code = 0;
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+}
+
+- (void)toggleTunnel
+{
+ if ([ self isRunning ])
+ [ self stopTunnel ];
+ else
+ [ self startTunnel ];
+}
+
+- (void)launchTunnel:(id)foo;
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ if (task)
+ [ task release ];
+ task = [[ NSTask alloc ] init ];
+ NSMutableDictionary *environment = [ NSMutableDictionary dictionaryWithDictionary: [[ NSProcessInfo processInfo ] environment ]];
+ NSString *pathToAuthentifier = [[ NSBundle mainBundle ] pathForResource: @"askForPass" ofType: @"sh" ];
+ if (socks4)
+ [ task setLaunchPath: [[ NSBundle mainBundle ] pathForResource: @"ssh" ofType: @"" ]];
+ else
+ [ task setLaunchPath: @"/usr/bin/ssh" ];
+ [ task setArguments: [ self arguments ]];
+ if (connAuth)
+ {
+ [ environment removeObjectForKey: @"SSH_AGENT_PID" ];
+ [ environment removeObjectForKey: @"SSH_AUTH_SOCK" ];
+ [ environment setObject: pathToAuthentifier forKey: @"SSH_ASKPASS" ];
+ [ environment setObject:@":0" forKey:@"DISPLAY" ];
+ }
+ [ environment setObject: connName forKey: @"TUNNEL_NAME" ];
+ [ task setEnvironment: environment ];
+
+ stdErrPipe = [[ NSPipe alloc ] init ];
+ [ task setStandardError: stdErrPipe ];
+
+ [[ NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(stdErr:)
+ name: @"NSFileHandleDataAvailableNotification"
+ object:[ stdErrPipe fileHandleForReading]];
+
+ [[ stdErrPipe fileHandleForReading] waitForDataInBackgroundAndNotify ];
+
+ NSLog(T_START,connName);
+ [ self setValue: S_CONNECTING forKey: @"status" ];
+ code = 1;
+ [ task launch ];
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+ [ task waitUntilExit ];
+ sleep(1);
+ code = 0;
+ [ self setValue: S_IDLE forKey: @"status" ];
+ NSLog(T_STOP,connName);
+ [[ NSNotificationCenter defaultCenter] removeObserver:self
+ name: @"NSFileHandleDataAvailableNotification"
+ object:[ stdErrPipe fileHandleForReading]];
+ [ task release ];
+ task = nil;
+ [ stdErrPipe release ];
+ stdErrPipe = nil;
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+ if (! shouldStop)
+ [ self startTunnel ];
+ [ pool release ];
+}
+
+- (void)stdErr:(NSNotification*)aNotification
+{
+ NSData *data = [[ aNotification object ] availableData ];
+ NSString *log = [[ NSString alloc ] initWithData: data encoding: NSASCIIStringEncoding ];
+ BOOL wait = YES;
+ if ([ log length ])
+ {
+ //NSLog(log);
+ NSArray *lines = [ log componentsSeparatedByString:@"\n" ];
+ NSEnumerator *e = [ lines objectEnumerator ];
+ NSString *line;
+ while (line = [ e nextObject ])
+ {
+ if ([ line rangeOfString:@"Entering interactive session." ].location != NSNotFound)
+ {
+ code = 2;
+ [ self setValue: S_CONNECTED forKey: @"status"];
+ }
+ if ([ line rangeOfString:@"Authentication succeeded" ].location != NSNotFound)
+ [ self setValue: S_AUTH forKey: @"status"];
+ if ([ line rangeOfString:@"Connections to local port" ].location != NSNotFound)
+ {
+ NSScanner *s;
+ NSString *port;
+ s = [ NSScanner scannerWithString:log];
+ [ s scanUpToString: @"Connections to local port " intoString: nil ];
+ [ s scanString: @"Connections to local port " intoString: nil ];
+ [ s scanUpToString: @"forwarded" intoString:&port];
+ [ self setValue: [ NSString stringWithFormat: @"Port %@ forwarded", port ] forKey: @"status"];
+ }
+ if ([ line rangeOfString:@"closed by remote host." ].location != NSNotFound)
+ {
+ [ task terminate];
+ [ self setValue: @"Connection closed" forKey: @"status"];
+ wait = NO;
+ }
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+ }
+ if (wait)
+ [[ stdErrPipe fileHandleForReading ] waitForDataInBackgroundAndNotify ];
+ }
+ [ log release] ;
+}
+
+- (BOOL)isRunning
+{
+ if ([ task isRunning ])
+ return YES;
+ return NO;
+}
+
+#pragma mark -
+#pragma mark Getting tunnel informations
+- (NSString *)status
+{
+ if (status)
+ return status;
+ return S_IDLE;
+}
+- (NSArray*)arguments
+{
+ NSMutableArray *arguments;
+ NSEnumerator *e;
+ NSDictionary *t;
+ BOOL asRoot;
+
+ arguments = [ NSMutableArray array ];
+ [ arguments addObject: @"-N" ];
+ [ arguments addObject: @"-v" ];
+ [ arguments addObject: @"-p" ];
+ if ([ connPort length ])
+ [ arguments addObject: connPort];
+ else
+ [ arguments addObject: @"22" ];
+
+ if (connRemote)
+ [ arguments addObject: @"-g" ];
+ if (compression)
+ [ arguments addObject: @"-C" ];
+ if (v1)
+ [ arguments addObject: @"-1" ];
+
+ [ arguments addObject: @"-c"];
+ if (encryption)
+ [ arguments addObject: encryption];
+ else
+ [ arguments addObject: @"3des"];
+
+ if (socks4 && socks4p != nil)
+ {
+ [ arguments addObject: @"-D" ];
+ [ arguments addObject: [ socks4p stringValue ]];
+ }
+ [ arguments addObject: [ NSString stringWithFormat: @"%@@%@",
+ connUser, connHost ]
+ ];
+
+ NSString *hostPort;
+ e = [ tunnelsLocal objectEnumerator ];
+ while (t = [ e nextObject ])
+ {
+ [ arguments addObject: @"-L" ];
+ if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ])
+ hostPort = [ t objectForKey:@"port" ];
+ else
+ hostPort = [ t objectForKey:@"hostport" ];
+ [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@",
+ [ t objectForKey:@"port"],
+ [ t objectForKey:@"host"],
+ hostPort
+ ] ];
+ if ([[ t objectForKey:@"port"] intValue] < 1024)
+ asRoot=YES;
+ }
+
+ e = [ tunnelsRemote objectEnumerator ];
+ while (t = [ e nextObject ])
+ {
+ [ arguments addObject: @"-R" ];
+ if ([[ t objectForKey:@"hostport"] isEqualTo: @"" ])
+ hostPort = [ t objectForKey:@"port" ];
+ else
+ hostPort = [ t objectForKey:@"hostport" ];
+ [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@",
+ [ t objectForKey:@"port"],
+ [ t objectForKey:@"host"],
+ hostPort
+ ]];
+ }
+
+ return [[ arguments copy ] autorelease ];
+}
+
+- (NSDictionary*)dictionary
+{
+ return [ NSDictionary dictionaryWithObjectsAndKeys:
+ [ NSNumber numberWithBool: compression ],@"compression",
+ [ NSNumber numberWithBool: connAuth ],@"connAuth",
+ [ NSNumber numberWithBool: autoConnect ],@"autoConnect",
+ connHost, @"connHost",
+ connName, @"connName",
+ connPort, @"connPort",
+ [ NSNumber numberWithBool: connRemote ],@"connRemote",
+ connUser, @"connUser",
+ encryption, @"encryption",
+ [ NSNumber numberWithBool: socks4 ],@"socks4",
+ socks4p, @"socks4p",
+ tunnelsLocal, @"tunnelsLocal",
+ tunnelsRemote, @"tunnelsRemote",
+ [ NSNumber numberWithBool: v1 ],@"v1", nil
+ ];
+}
+
+
+#pragma mark -
+#pragma mark Key/Value coding
+- (NSImage*)icon
+{
+ switch (code)
+ {
+ case 0:
+ return [ NSImage imageNamed: @"offState" ];
+ break;
+ case 1:
+ return [ NSImage imageNamed: @"middleState" ];
+ break;
+ case 2:
+ return [ NSImage imageNamed: @"onState" ];
+ break;
+ }
+ return [ NSImage imageNamed: @"offState" ];
+}
+- (void)setValue:(id)value forUndefinedKey:(NSString *)key
+{
+ NSLog(@"key %@ undefined",key);
+}
+- (id)valueForUndefinedKey:(NSString *)key
+{
+ return nil;
+}
+
+#pragma mark -
+#pragma mark Misc.
+-(void)dealloc
+{
+ [ self stopTunnel ];
+ [ tunnelsLocal release ];
+ [ tunnelsRemote release ];
+
+ [ task release ];
+ [ stdErrPipe release ];
+ [ connName release ];
+ [ status release ];
+ [ connPort release ];
+ [ encryption release ];
+ [ socks4p release ];
+ [ connUser release ];
+ [ connHost release ];
+
+ // start diff lorenz textor
+ [super dealloc];
+ // end diff lorenz textor
+}
+@end
diff --git a/SSHTunnel_old.h b/SSHTunnel_old.h
new file mode 100755
index 00000000..f6d0e03c
--- /dev/null
+++ b/SSHTunnel_old.h
@@ -0,0 +1,41 @@
+/*
+
+SSHTunnel.h
+
+Original code by tynsoe.org, Copyright 2002
+Modified by Lorenz Textor for use with CocoaMySQL
+
+*/
+
+#import <Cocoa/Cocoa.h>
+
+@interface SSHTunnel : NSObject
+{
+ BOOL shouldStop;
+ NSTask *task;
+ NSPipe *stdErrPipe;
+ NSString *status;
+
+ NSDictionary *tunnelArguments;
+}
+
+// initialization
+- (id)init;
+
+// Getting tunnels informations
+- (BOOL)isRunning;
+- (NSString *)status;
+
+// starting & stopping the tunnel
+- (void)startTunnel;
+- (void)startTunnelWithArguments:(NSDictionary *)args;
+- (void)stopTunnel;
+- (void)launchTunnel:(NSArray*)arguments;
+- (void)stdErr:(NSNotification*)aNotification;
+- (id)authenticate:(NSScriptCommand *)command;
+- (id)handleQuitScriptCommand:(NSScriptCommand *)command;
+
+// deallocation
+- (void) dealloc;
+
+@end
diff --git a/SSHTunnel_old.m b/SSHTunnel_old.m
new file mode 100755
index 00000000..57a458eb
--- /dev/null
+++ b/SSHTunnel_old.m
@@ -0,0 +1,225 @@
+/*
+
+SSHTunnel.m
+
+Original code by tynsoe.org, Copyright 2002
+Modified by Lorenz Textor for use with CocoaMySQL
+
+*/
+
+#import "SSHTunnel.h"
+#include <unistd.h>
+
+// start diff lorenz textor
+/*
+#define T_START @"START: %@"
+#define T_STOP @"STOP: %@"
+#define S_IDLE @"Idle"
+#define S_CONNECTING @"Connecting..."
+#define S_CONNECTED @"Connected"
+#define S_AUTH @"Authenticated"
+#define S_PORT "Port %@ forwarded"
+*/
+#define T_START @"START: %@"
+#define T_STOP @"STOP: %@"
+#define S_IDLE @"Idle"
+#define S_CONNECTING @"Connecting..."
+#define S_CONNECTED @"Connected"
+#define S_AUTH @"Authenticated"
+#define S_PORT "Port %@ forwarded"
+// end diff lorenz textor
+
+@implementation SSHTunnel
+
+// initialization
+- (id)init
+{
+ self = [super init];
+
+ // Make this class the root one for AppleEvent calls
+// [[ NSScriptExecutionContext sharedScriptExecutionContext] setTopLevelObject: self ];
+
+ return self;
+}
+
+// Getting tunnels informations
+- (BOOL)isRunning
+/* returns YES if tunnel is running */
+{
+ return [ task isRunning ];
+}
+
+- (NSString*)status
+{
+ if (status)
+ return status;
+ return S_IDLE;
+}
+
+// starting & stopping the tunnel
+- (void)startTunnel
+/* starts tunnel with saved arguments */
+{
+ [self startTunnelWithArguments:tunnelArguments];
+}
+
+- (void)startTunnelWithArguments:(NSDictionary *)args
+/* starts the tunnel */
+{
+ NSMutableArray *arguments = [[ NSMutableArray alloc] init ];
+
+ if (tunnelArguments )
+ [tunnelArguments release];
+ tunnelArguments = [args retain];
+
+ // stop tunnel if already running
+ if ( [self isRunning] )
+// [self stopTunnel];
+ return;
+
+ shouldStop = NO;
+
+// get arguments
+ [ arguments addObject: @"-N" ];
+ [ arguments addObject: @"-v" ];
+
+// [ arguments addObject: @"-p" ];
+// [ arguments addObject: @"-p" ];
+// [ arguments addObject: @"22" ];
+
+// [ arguments addObject: @"-c"];
+// [ arguments addObject: @"3des"];
+
+ [ arguments addObject: [ NSString stringWithFormat: @"%@@%@", [args objectForKey:@"connUser"], [args objectForKey:@"connHost"] ]];
+
+ [ arguments addObject: @"-L" ];
+ [ arguments addObject: [NSString stringWithFormat:@"%@/%@/%@", [args objectForKey:@"localPort"], [args objectForKey:@"host"], [args objectForKey:@"remotePort"]] ];
+
+ [ NSThread detachNewThreadSelector:@selector(launchTunnel:)
+ toTarget: self
+ withObject: arguments ];
+
+ [ arguments release ];
+}
+
+- (void)stopTunnel
+/* stops the tunnel */
+{
+ if (! [ self isRunning ])
+ return;
+ shouldStop=YES;
+ [ self setValue: nil forKey: @"status" ];
+ [ task terminate ];
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+}
+
+- (void)launchTunnel:(NSArray*)arguments
+/* launches the tunnel in a separate thread */
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ if (task)
+ [ task release ];
+ task = [[ NSTask alloc ] init ];
+ NSMutableDictionary *environment = [ NSMutableDictionary dictionaryWithDictionary: [[ NSProcessInfo processInfo ] environment ]];
+ NSString *pathToAuthentifier = [[ NSBundle mainBundle ] pathForResource: @"askForPass" ofType: @"sh" ];
+
+ [ task setLaunchPath: @"/usr/bin/ssh" ];
+ [ task setArguments: arguments ];
+
+// really necessary???
+ [ environment removeObjectForKey: @"SSH_AGENT_PID" ];
+ [ environment removeObjectForKey: @"SSH_AUTH_SOCK" ];
+ [ environment setObject: pathToAuthentifier forKey: @"SSH_ASKPASS" ];
+ [ environment setObject:@":0" forKey:@"DISPLAY" ];
+
+ [ environment setObject: @"CocoaMySQL Tunnel" forKey: @"TUNNEL_NAME" ];
+ [ task setEnvironment: environment ];
+
+ stdErrPipe = [[ NSPipe alloc ] init ];
+ [ task setStandardError: stdErrPipe ];
+
+ [[ NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(stdErr:)
+ name: @"NSFileHandleDataAvailableNotification"
+ object:[ stdErrPipe fileHandleForReading]];
+
+ [[ stdErrPipe fileHandleForReading] waitForDataInBackgroundAndNotify ];
+
+ NSLog(T_START,@"CocoaMySQL Tunnel");
+ [ self setValue: S_CONNECTING forKey: @"status" ];
+ [ task launch ];
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+ [ task waitUntilExit ];
+ sleep(1);
+ [ self setValue: S_IDLE forKey: @"status" ];
+ NSLog(T_STOP,@"CocoaMySQL Tunnel");
+ [[ NSNotificationCenter defaultCenter] removeObserver:self
+ name: @"NSFileHandleDataAvailableNotification"
+ object:[ stdErrPipe fileHandleForReading]];
+ [ task release ];
+ task = nil;
+ [ stdErrPipe release ];
+ stdErrPipe = nil;
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+ if (! shouldStop)
+ [ self startTunnel ];
+ [ pool release ];
+}
+
+- (void)stdErr:(NSNotification*)aNotification
+{
+ NSData *data = [[ aNotification object ] availableData ];
+ NSString *log = [[ NSString alloc ] initWithData: data encoding: NSASCIIStringEncoding ];
+ BOOL wait = YES;
+ if ([ log length ])
+ {
+ NSLog(log);
+ NSArray *lines = [ log componentsSeparatedByString:@"\n" ];
+ NSEnumerator *e = [ lines objectEnumerator ];
+ NSString *line;
+ while (line = [ e nextObject ])
+ {
+ if ([ line rangeOfString:@"Entering interactive session." ].location != NSNotFound)
+ {
+ [ self setValue: S_CONNECTED forKey: @"status"];
+ }
+ if ([ line rangeOfString:@"Authentication succeeded" ].location != NSNotFound)
+ [ self setValue: S_AUTH forKey: @"status"];
+ if ([ line rangeOfString:@"Connections to local port" ].location != NSNotFound)
+ {
+ NSScanner *s;
+ NSString *port;
+ s = [ NSScanner scannerWithString:log];
+ [ s scanUpToString: @"Connections to local port " intoString: nil ];
+ [ s scanString: @"Connections to local port " intoString: nil ];
+ [ s scanUpToString: @"forwarded" intoString:&port];
+ [ self setValue: [ NSString stringWithFormat: @"Port %@ forwarded", port ] forKey: @"status"];
+ }
+ if ([ line rangeOfString:@"closed by remote host." ].location != NSNotFound)
+ {
+ [ task terminate];
+ [ self setValue: @"Connection closed" forKey: @"status"];
+ wait = NO;
+ }
+ [[ NSNotificationCenter defaultCenter] postNotificationName:@"STMStatusChanged" object:self ];
+ }
+ if (wait)
+ [[ stdErrPipe fileHandleForReading ] waitForDataInBackgroundAndNotify ];
+ }
+ [ log release] ;
+}
+
+// deallocation
+- (void) dealloc
+{
+ [self stopTunnel];
+
+ [task release];
+ [stdErrPipe release];
+ [status release];
+ [tunnelArguments release];
+
+ [super dealloc];
+}
+
+@end
diff --git a/TableContent.h b/TableContent.h
new file mode 100644
index 00000000..d4020536
--- /dev/null
+++ b/TableContent.h
@@ -0,0 +1,134 @@
+//
+// TableContent.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMCopyTable.h"
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+
+
+@interface TableContent : NSObject {
+
+ IBOutlet id tableDocumentInstance;
+ IBOutlet id tablesListInstance;
+ IBOutlet id tableSourceInstance;
+
+ IBOutlet id tableWindow;
+ IBOutlet CMCopyTable *tableContentView;
+ IBOutlet id editSheet;
+ IBOutlet id editImage;
+ IBOutlet id editTextView;
+ IBOutlet id hexTextView;
+ IBOutlet id fieldField;
+ IBOutlet id compareField;
+ IBOutlet id argumentField;
+ IBOutlet id filterButton;
+ IBOutlet id showAllButton;
+ IBOutlet id addButton;
+ IBOutlet id copyButton;
+ IBOutlet id removeButton;
+ IBOutlet id multipleLineEditingButton;
+ IBOutlet id countText;
+ IBOutlet id limitRowsField;
+ IBOutlet id limitRowsButton;
+ IBOutlet id limitRowsStepper;
+ IBOutlet id limitRowsText;
+
+ CMMCPConnection *mySQLConnection;
+
+ id editData;
+ NSString *selectedTable;
+ NSMutableArray *fullResult, *filteredResult, *keys;
+ NSMutableDictionary *oldRow;
+ NSArray *fieldNames, *fieldTypes;
+ NSString *compareType, *sortField;
+ BOOL isEditingRow, isEditingNewRow, isDesc, setLimit;
+ NSUserDefaults *prefs;
+ int numRows;
+
+}
+
+//table methods
+- (void)loadTable:(NSString *)aTable;
+- (IBAction)reloadTable:(id)sender;
+- (IBAction)reloadTableValues:(id)sender;
+- (IBAction)filterTable:(id)sender;
+- (IBAction)showAll:(id)sender;
+
+//edit methods
+- (IBAction)addRow:(id)sender;
+- (IBAction)copyRow:(id)sender;
+- (IBAction)removeRow:(id)sender;
+
+//editSheet methods
+- (IBAction)closeEditSheet:(id)sender;
+- (IBAction)openEditSheet:(id)sender;
+- (IBAction)saveEditSheet:(id)sender;
+- (IBAction)dropImage:(id)sender;
+- (void)textDidChange:(NSNotification *)notification;
+- (NSString *)dataToHex:(NSData *)data;
+
+//getter methods
+- (NSArray *)currentResult;
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection;
+- (IBAction)setCompareTypes:(id)sender;
+- (IBAction)stepLimitRows:(id)sender;
+- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult;
+- (BOOL)addRowToDB;
+- (NSString *)argumentForRow:(int)row;
+- (BOOL)isBlobOrText:(NSString *)fieldType;
+- (NSString *)fieldListForQuery;
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
+- (int)getNumberOfRows;
+- (int)fetchNumberOfRows;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//tableView delegate methods
+- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn;
+- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
+- (void)tableViewColumnDidResize:(NSNotification *)aNotification;
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
+- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard;
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command;
+
+//textView delegate methods
+- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector;
+
+//last but not least
+- (id)init;
+- (void)dealloc;
+
+@end
diff --git a/TableContent.m b/TableContent.m
new file mode 100644
index 00000000..bcbc7208
--- /dev/null
+++ b/TableContent.m
@@ -0,0 +1,1900 @@
+//
+// TableContent.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "TableContent.h"
+#import "TableDocument.h"
+#import "TablesList.h"
+#import "TableSource.h"
+#import "CMImageView.h"
+
+
+@implementation TableContent
+
+- (void)loadTable:(NSString *)aTable
+/*
+loads aTable, put it in an array, update the tableViewColumns and reload the tableView
+*/
+{
+ int i;
+ NSNumber *colWidth;
+ NSArray *theColumns;
+ NSTableColumn *theCol;
+// NSNumberFormatter *numberFormatter;
+ NSString *query;
+ CMMCPResult *queryResult;
+
+ selectedTable = aTable;
+ [tableContentView deselectAll:self];
+ if ( isEditingRow )
+ return;
+
+ //query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ [limitRowsField setStringValue:@"1"];
+
+ //reset keys
+ if ( keys ) {
+ keys = nil;
+ }
+
+ [tableContentView scrollRowToVisible:0];
+ [tableContentView scrollColumnToVisible:0];
+
+ if ( [aTable isEqualToString:@""] || !aTable ) {
+//no table selected
+ //free tableView
+ theColumns = [tableContentView tableColumns];
+ while ([theColumns count]) {
+ [tableContentView removeTableColumn:[theColumns objectAtIndex:0]];
+ }
+// theCol = [[NSTableColumn alloc] initWithIdentifier:@""];
+// [[theCol headerCell] setStringValue:@""];
+// [tableContentView addTableColumn:theCol];
+// [tableContentView sizeLastColumnToFit];
+ [fullResult removeAllObjects];
+ [filteredResult removeAllObjects];
+ [tableContentView reloadData];
+// [theCol release];
+
+ //disable filter options
+ [fieldField setEnabled:NO];
+ [fieldField removeAllItems];
+ [fieldField addItemWithTitle:NSLocalizedString(@"field", @"popup menuitem for field (showing only if disabled)")];
+ [compareField setEnabled:NO];
+ [compareField removeAllItems];
+ [compareField addItemWithTitle:NSLocalizedString(@"is", @"popup menuitem for field IS value")];
+ [argumentField setEnabled:NO];
+ [argumentField setStringValue:@""];
+ [filterButton setEnabled:NO];
+ [showAllButton setEnabled:NO];
+
+ //disable limit fields
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"),
+ [prefs integerForKey:@"limitRowsValue"]]];
+ } else {
+ [limitRowsField setStringValue:@""];
+ [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")];
+ }
+ [limitRowsField setEnabled:NO];
+ [limitRowsButton setEnabled:NO];
+ [limitRowsStepper setEnabled:NO];
+
+ //disable buttons
+ [addButton setEnabled:NO];
+ [copyButton setEnabled:NO];
+ [removeButton setEnabled:NO];
+
+ [countText setStringValue:@""];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ return;
+ }
+
+//make a fast query to get fieldNames and fieldTypes (used in fieldListForQuery method)
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@` LIMIT 0", selectedTable]];
+ fieldTypes = [[queryResult fetchTypesAsArray] retain];
+ fieldNames = [[queryResult fetchFieldNames] retain];
+
+//perform query and load result in array (each row as a dictionary)
+// queryResult = [mySQLConnection queryString:[@"SELECT * FROM " stringByAppendingString:selectedTable]];
+ query = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable];
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ if ( [limitRowsField intValue] <= 0 ) {
+ [limitRowsField setStringValue:@"1"];
+ }
+ query = [query stringByAppendingString:
+ [NSString stringWithFormat:@" LIMIT %d,%d",
+ [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]];
+ }
+// [queryResult release];
+ queryResult = [mySQLConnection queryString:query];
+// [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]];
+ [fullResult setArray:[self fetchResultAsArray:queryResult]];
+ [filteredResult setArray:fullResult];
+// fieldTypes = [[queryResult fetchTypesAsArray] retain];
+// fieldNames = [[queryResult fetchFieldNames] retain];
+
+//set count text
+ numRows = [self getNumberOfRows];
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]];
+
+//clear sorting
+ sortField = nil;
+ isDesc = NO;
+
+ if ( queryResult == nil ) {
+ NSLog(@"Loading table %@ failed, query string was: %@", aTable, query);
+ return;
+ }
+
+//enable and initialize filter fields (with tags for position of menu item and field position)
+ [fieldField setEnabled:YES];
+ [fieldField removeAllItems];
+ [fieldField addItemsWithTitles:fieldNames];
+ for ( i = 0 ; i < [fieldField numberOfItems] ; i++ ) {
+ [[fieldField itemAtIndex:i] setTag:i];
+ }
+ [compareField setEnabled:YES];
+ [self setCompareTypes:self];
+ [argumentField setEnabled:YES];
+ [argumentField setStringValue:@""];
+ [filterButton setEnabled:YES];
+ [showAllButton setEnabled:NO];
+
+//enable or disable limit fields
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ [limitRowsField setEnabled:YES];
+ [limitRowsButton setEnabled:YES];
+ [limitRowsStepper setEnabled:YES];
+ [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"),
+ [prefs integerForKey:@"limitRowsValue"]]];
+ } else {
+ [limitRowsField setEnabled:NO];
+ [limitRowsButton setEnabled:NO];
+ [limitRowsStepper setEnabled:NO];
+ [limitRowsField setStringValue:@""];
+ [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")];
+ }
+
+//enable buttons
+ [addButton setEnabled:YES];
+ [copyButton setEnabled:YES];
+ [removeButton setEnabled:YES];
+
+//set columns
+ //remove all columns from table
+ theColumns = [tableContentView tableColumns];
+ i=0;
+ while ([theColumns count]) {
+ [tableContentView removeTableColumn:[theColumns objectAtIndex:0]];
+ i++;
+ }
+
+ //add columns, corresponding to the query result
+ theColumns = fieldNames;
+ for ( i = 0 ; i < [theColumns count] ; i++ ) {
+ theCol = [[NSTableColumn alloc] initWithIdentifier:[theColumns objectAtIndex:i]];
+ [theCol setEditable:YES];
+ if ( [theCol respondsToSelector:@selector(setResizingMask:)] ) {
+ // os 10.4
+ [theCol setResizingMask:NSTableColumnUserResizingMask];
+ } else {
+ // os pre-10.4
+ [theCol setResizable:YES];
+ }
+ NSComboBoxCell *dataCell;
+ if ( [[tableSourceInstance enumFields] objectForKey:[theColumns objectAtIndex:i]] ) {
+ dataCell = [[[NSComboBoxCell alloc] initTextCell:@""] autorelease];
+ [dataCell setButtonBordered:NO];
+ [dataCell setBezeled:NO];
+ [dataCell setDrawsBackground:NO];
+ [dataCell setCompletes:YES];
+ [dataCell setControlSize:NSSmallControlSize];
+ [dataCell addItemWithObjectValue:@"NULL"];
+ [dataCell addItemsWithObjectValues:[[tableSourceInstance enumFields] objectForKey:[theColumns objectAtIndex:i]]];
+ } else {
+ dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease];
+ }
+ [dataCell setEditable:YES];
+// [[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+// [[theCol dataCell] setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [dataCell setFont:[NSFont fontWithName:@"Monaco" size:10]];
+ } else {
+ [dataCell setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+ if ( [dataCell respondsToSelector:@selector(setLineBreakMode:)] ) {
+ // os 10.4
+ [dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
+ }
+ [theCol setDataCell:dataCell];
+ //set date and number formatters
+/*
+ if ([[fieldTypes objectAtIndex:i] isEqualToString:@"timestamp"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc]
+ initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([[fieldTypes objectAtIndex:i] isEqualToString:@"datetime"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([[fieldTypes objectAtIndex:i] isEqualToString:@"date"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d" allowNaturalLanguage:YES]];
+ }
+ if ([[fieldTypes objectAtIndex:i] isEqualToString:@"time"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([[fieldTypes objectAtIndex:i] isEqualToString:@"year"]) {
+ [[theCol dataCell] setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y" allowNaturalLanguage:YES]];
+ }
+ if ([[fieldTypes objectAtIndex:i] isEqualToString:@"tiny"] || [[fieldTypes objectAtIndex:i] isEqualToString:@"short"]
+ || [[fieldTypes objectAtIndex:i] isEqualToString:@"long"] || [[fieldTypes objectAtIndex:i] isEqualToString:@"int24"]
+ || [[fieldTypes objectAtIndex:i] isEqualToString:@"longlong"] ) {
+ numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
+ [numberFormatter setFormat:@"0"];
+ [numberFormatter setAttributedStringForNil:[[NSAttributedString alloc] initWithString:[prefs stringForKey:@"nullValue"]]];
+ [numberFormatter setAllowsFloats:NO];
+ [[theCol dataCell] setFormatter:numberFormatter];
+ }
+ if ( [[fieldTypes objectAtIndex:i] isEqualToString:@"decimal"] || [[fieldTypes objectAtIndex:i] isEqualToString:@"float"]
+ || [[fieldTypes objectAtIndex:i] isEqualToString:@"double"] ) {
+ numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
+ //here we should allow any number of decimal values (after the comma)
+ //problem with float-numbers like 2.13231e+08
+ //double numbers doesn't have all decimal values
+ //-> bugs in the framework?
+ [numberFormatter setFormat:@"0.####################"];
+ [numberFormatter setAttributedStringForNil:[[NSAttributedString alloc] initWithString:[prefs stringForKey:@"nullValue"]]];
+ [[theCol dataCell] setFormatter:numberFormatter];
+ }
+*/
+ [[theCol headerCell] setStringValue:[theColumns objectAtIndex:i]];
+ // set width of column to saved value if exists
+ colWidth = [[[[prefs objectForKey:@"tableColumnWidths"] objectForKey:[NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]]] objectForKey:[tablesListInstance table]] objectForKey:[theColumns objectAtIndex:i]];
+ if ( colWidth ) {
+ [theCol setWidth:[colWidth floatValue]];
+ }
+ [tableContentView addTableColumn:theCol];
+ [theCol release];
+ }
+
+// [tableContentView sizeLastColumnToFit];
+ //tries to fix problem with last row (otherwise to small)
+ //sets last column to width of the first if smaller than 30
+ //problem not fixed for resizing window
+// if ( [[tableContentView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]] width] < 30 )
+// [[tableContentView tableColumnWithIdentifier:[theColumns objectAtIndex:[theColumns count]-1]]
+// setWidth:[[tableContentView tableColumnWithIdentifier:[theColumns objectAtIndex:0]] width]];
+
+ [tableContentView reloadData];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+}
+
+- (IBAction)reloadTable:(id)sender
+/*
+reloads the table (performing a new mysql-query)
+*/
+{
+ [self loadTable:selectedTable];
+}
+
+- (IBAction)reloadTableValues:(id)sender
+/*
+reload the table values without reconfiguring the tableView (with filter and limit if set)
+*/
+{
+ NSString *queryString;
+ CMMCPResult *queryResult;
+
+ //query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+//enable or disable limit fields
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ [limitRowsField setEnabled:YES];
+ [limitRowsButton setEnabled:YES];
+ [limitRowsStepper setEnabled:YES];
+ [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"),
+ [prefs integerForKey:@"limitRowsValue"]]];
+ } else {
+ [limitRowsField setEnabled:NO];
+ [limitRowsButton setEnabled:NO];
+ [limitRowsStepper setEnabled:NO];
+ [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")];
+ [limitRowsField setStringValue:@""];
+ }
+
+// queryString = [@"SELECT * FROM " stringByAppendingString:selectedTable];
+ queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable];
+ if ( sortField ) {
+ queryString = [NSString stringWithFormat:@"%@ ORDER BY `%@`", queryString, sortField];
+// queryString = [queryString stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]];
+ if ( isDesc )
+ queryString = [queryString stringByAppendingString:@" DESC"];
+ }
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ if ( [limitRowsField intValue] <= 0 ) {
+ [limitRowsField setStringValue:@"1"];
+ }
+ queryString = [queryString stringByAppendingString:
+ [NSString stringWithFormat:@" LIMIT %d,%d",
+ [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]];
+ [limitRowsField selectText:self];
+ }
+ queryResult = [mySQLConnection queryString:queryString];
+// [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]];
+ [fullResult setArray:[self fetchResultAsArray:queryResult]];
+ numRows = [self getNumberOfRows];
+ if ( [showAllButton isEnabled] ) {
+ [self filterTable:self];
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows of %d selected", @"text showing how many rows are in the filtered result"), [filteredResult count], numRows]];
+ } else {
+ [filteredResult setArray:fullResult];
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]];
+ }
+ [tableContentView reloadData];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+}
+
+- (IBAction)filterTable:(id)sender
+/*
+filter the table with arguments given by the user
+*/
+{
+ CMMCPResult *theResult;
+ int tag = [[compareField selectedItem] tag];
+ NSString *compareOperator = @"";
+ NSMutableString *argument = [[NSMutableString alloc] initWithString:[argumentField stringValue]];
+ NSString *queryString;
+ int i;
+
+ if ( ![self selectionShouldChangeInTableView:nil] ) {
+ [argument release];
+ return;
+ }
+
+//query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ BOOL doQuote = YES;
+
+ if ( ![compareType isEqualToString:@""] ) {
+ if ( [compareType isEqualToString:@"string"] ) {
+//string comparision
+ switch ( tag ) {
+ case 0:
+ compareOperator = @"LIKE";
+ break;
+ case 1:
+ compareOperator = @"NOT LIKE";
+ break;
+ case 2:
+ compareOperator = @"LIKE";
+ [argument setString:[[@"%" stringByAppendingString:argument] stringByAppendingString:@"%"]];
+ break;
+ case 3:
+ compareOperator = @"NOT LIKE";
+ [argument setString:[[@"%" stringByAppendingString:argument] stringByAppendingString:@"%"]];
+ break;
+ case 4:
+ compareOperator = @"IN";
+ doQuote = NO;
+ [argument setString:[[@"(" stringByAppendingString:argument] stringByAppendingString:@")"]];
+ break;
+ }
+ } else if ( [compareType isEqualToString:@"number"] ) {
+//number comparision
+ switch ( tag ) {
+ case 0:
+ compareOperator = @"=";
+ break;
+ case 1:
+ compareOperator = @"!=";
+ break;
+ case 2:
+ compareOperator = @">";
+ break;
+ case 3:
+ compareOperator = @"<";
+ break;
+ case 4:
+ compareOperator = @">=";
+ break;
+ case 5:
+ compareOperator = @"<=";
+ break;
+ case 6:
+ compareOperator = @"IN";
+ doQuote = NO;
+ [argument setString:[[@"(" stringByAppendingString:argument] stringByAppendingString:@")"]];
+ break;
+ }
+ } else if ( [compareType isEqualToString:@"date"] ) {
+//date comparision
+ switch ( tag ) {
+ case 0:
+ compareOperator = @"=";
+ break;
+ case 1:
+ compareOperator = @"!=";
+ break;
+ case 2:
+ compareOperator = @"<";
+ break;
+ case 3:
+ compareOperator = @">";
+ break;
+ case 4:
+ compareOperator = @"<=";
+ break;
+ case 5:
+ compareOperator = @">=";
+ break;
+ }
+ }
+
+// queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` WHERE `%@` %@ '%@'",
+// [self fieldListForQuery], selectedTable, [fieldField titleOfSelectedItem],
+// compareOperator, argument];
+ if (doQuote) {
+//escape special characters
+ for ( i = 0 ; i < [argument length] ; i++ ) {
+ if ( [argument characterAtIndex:i] == '\\' ) {
+ [argument insertString:@"\\" atIndex:i];
+ i++;
+ }
+ }
+ [argument setString:[mySQLConnection prepareString:argument]];
+ queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` WHERE `%@` %@ \"%@\"",
+ [self fieldListForQuery], selectedTable, [fieldField titleOfSelectedItem],
+ compareOperator, argument];
+ } else {
+ queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` WHERE `%@` %@ %@",
+ [self fieldListForQuery], selectedTable, [fieldField titleOfSelectedItem],
+ compareOperator, argument];
+ }
+ if ( sortField ) {
+// queryString = [queryString stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]];
+ queryString = [NSString stringWithFormat:@"%@ ORDER BY `%@`", queryString, sortField];
+ if ( isDesc )
+ queryString = [queryString stringByAppendingString:@" DESC"];
+ }
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ if ( [limitRowsField intValue] <= 0 ) {
+ [limitRowsField setStringValue:@"1"];
+ }
+ queryString = [queryString stringByAppendingString:
+ [NSString stringWithFormat:@" LIMIT %d,%d",
+ [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]];
+ }
+ } else {
+ NSLog(@"ERROR: unknown compare type %@", compareType);
+ queryString = @"";
+ }
+
+ theResult = [mySQLConnection queryString:queryString];
+ [filteredResult setArray:[self fetchResultAsArray:theResult]];
+
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows of %d selected", @"text showing how many rows are in the filtered result"), [filteredResult count], numRows]];
+
+ [tableContentView reloadData];
+ [showAllButton setEnabled:YES];
+
+//query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ [argument release];
+}
+
+- (IBAction)showAll:(id)sender
+/*
+reload tableView with all results shown (no new mysql-query, it uses simply the fullResult array)
+*/
+{
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ [filteredResult setArray:fullResult];
+ [tableContentView reloadData];
+ [showAllButton setEnabled:NO];
+
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]];
+}
+
+
+//edit methods
+- (IBAction)addRow:(id)sender
+/*
+adds an empty row to the table-array and goes into edit mode
+*/
+{
+ NSMutableDictionary *newRow = [NSMutableDictionary dictionary];
+ int i;
+
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ for ( i = 0 ; i < [fieldNames count] ; i++ ) {
+// [newRow setObject:[prefs stringForKey:@"nullValue"] forKey:[fieldNames objectAtIndex:i]];
+ [newRow setObject:[tableSourceInstance defaultValueForField:[fieldNames objectAtIndex:i]]
+ forKey:[fieldNames objectAtIndex:i]];
+ }
+ [filteredResult addObject:newRow];
+
+ isEditingRow = YES;
+ isEditingNewRow = YES;
+ [tableContentView reloadData];
+ [tableContentView selectRow:[tableContentView numberOfRows]-1 byExtendingSelection:NO];
+ if ( [multipleLineEditingButton state] == NSOffState )
+ [tableContentView editColumn:0 row:[tableContentView numberOfRows]-1 withEvent:nil select:YES];
+}
+
+- (IBAction)copyRow:(id)sender
+/*
+copies a row of the table-array and goes into edit mode
+*/
+{
+ NSMutableDictionary *tempRow;
+ CMMCPResult *queryResult;
+ NSDictionary *row;
+ int i;
+
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+ if ( [tableContentView numberOfSelectedRows] < 1 )
+ return;
+ if ( [tableContentView numberOfSelectedRows] > 1 ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"You can only copy single rows.", @"message of panel when trying to copy multiple rows"));
+ return;
+ }
+
+ //copy row
+ tempRow = [NSMutableDictionary dictionaryWithDictionary:[filteredResult objectAtIndex:[tableContentView selectedRow]]];
+ [filteredResult insertObject:tempRow atIndex:[tableContentView selectedRow]+1];
+ isEditingRow = YES;
+ isEditingNewRow = YES;
+ //set autoincrement fields to NULL
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]];
+ for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) {
+ [queryResult dataSeek:i];
+ row = [queryResult fetchRowAsDictionary];
+ if ( [[row objectForKey:@"Extra"] isEqualToString:@"auto_increment"] ) {
+ [tempRow setObject:[prefs stringForKey:@"nullValue"] forKey:[row objectForKey:@"Field"]];
+ }
+ }
+ //select row and go in edit mode
+ [tableContentView reloadData];
+ [tableContentView selectRow:[tableContentView selectedRow]+1 byExtendingSelection:NO];
+ if ( [multipleLineEditingButton state] == NSOffState )
+ [tableContentView editColumn:0 row:[tableContentView selectedRow] withEvent:nil select:YES];
+}
+
+- (IBAction)removeRow:(id)sender
+/*
+asks user if he really wants to delete the selected rows
+*/
+{
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+ if ( ![tableContentView numberOfSelectedRows] )
+ return;
+/*
+ if ( ([tableContentView numberOfSelectedRows] == [self numberOfRowsInTableView:tableContentView]) &&
+ ![showAllButton isEnabled] &&
+ (![prefs boolForKey:@"limitRows"] || ([tableContentView numberOfSelectedRows] < [prefs integerForKey:@"limitRowsValue"])) ) {
+*/
+ if ( ([tableContentView numberOfSelectedRows] == [tableContentView numberOfRows]) &&
+ (([prefs boolForKey:@"limitRows"] && [tableContentView numberOfSelectedRows] == [self fetchNumberOfRows]) ||
+ (![prefs boolForKey:@"limitRows"] && [tableContentView numberOfSelectedRows] == [self getNumberOfRows])) ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"removeallrows", NSLocalizedString(@"Do you really want to delete all rows?", @"message of panel asking for confirmation for deleting all rows"));
+ } else if ( [tableContentView numberOfSelectedRows] == 1 ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"removerow", NSLocalizedString(@"Do you really want to delete the selected row?", @"message of panel asking for confirmation for deleting the selected row"));
+ } else {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"removerow",
+ [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the selected %d rows?", @"message of panel asking for confirmation for deleting the selected rows"), [tableContentView numberOfSelectedRows]]);
+ }
+}
+
+
+//editSheet methods
+- (IBAction)closeEditSheet:(id)sender
+{
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+- (IBAction)openEditSheet:(id)sender
+/*
+loads a file into the editSheet
+*/
+{
+ NSOpenPanel *panel = [NSOpenPanel openPanel];
+
+ if ( [panel runModal] == NSOKButton ) {
+ NSString *fileName = [panel filename];
+
+ // free old data
+ if ( editData != nil ) {
+ [editData release];
+ }
+
+ // load new data/images
+ editData = [[NSData alloc] initWithContentsOfFile:fileName];
+ NSImage *image = [[[NSImage alloc] initByReferencingFile:fileName] autorelease];
+ NSString *contents = [[NSString stringWithContentsOfFile:fileName] autorelease];
+
+ // set the image preview, string contents and hex representation
+ [editImage setImage:image];
+ [editTextView setString:contents];
+ [hexTextView setString:[self dataToHex:editData]];
+ }
+}
+
+- (IBAction)saveEditSheet:(id)sender
+/*
+saves a file containing the content of the editSheet
+*/
+{
+ NSSavePanel *panel = [NSSavePanel savePanel];
+
+ if ( [panel runModal] == NSOKButton ) {
+ NSString *fileName = [panel filename];
+ NSString *data;
+ NSError **errorStr;
+
+ if ( [editData isKindOfClass:[NSData class]] ) {
+ data = editData;
+ } else {
+ data = [editData description];
+ }
+ if ( [editData respondsToSelector:@selector(writeToFile:atomically:encoding:error:)] ) {
+ // mac os 10.4 or later
+ [editData writeToFile:fileName atomically:YES encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance getSelectedEncoding] cString]] error:errorStr];
+ } else {
+ // mac os pre 10.4
+ [editData writeToFile:fileName atomically:YES];
+ }
+ }
+}
+
+- (IBAction)dropImage:(id)sender
+/*
+invoked when user drag&drops image on imageView
+*/
+{
+ // load new data/images
+ if (nil != editData)
+ {
+ [editData release];
+ }
+ editData = [[[NSData alloc] initWithContentsOfFile:[sender draggedFilePath]] retain];
+ NSString *contents = [NSString stringWithContentsOfFile:[sender draggedFilePath]];
+
+ // set the string contents and hex representation
+ [editTextView setString:contents];
+ [hexTextView setString:[self dataToHex:editData]];
+}
+
+- (void)textDidChange:(NSNotification *)notification
+/*
+invoked when the user changes the string in the editSheet
+*/
+{
+ // clear the image and hex (since i doubt someone can "type" a gif)
+ [editImage setImage:nil];
+ [hexTextView setString:@""];
+
+ // free old data
+ if ( editData != nil ) {
+ [editData release];
+ }
+
+ // set edit data to text
+ editData = [[editTextView string] retain];
+}
+
+- (NSString *)dataToHex:(NSData *)data
+/*
+returns the hex representation of the given data
+*/
+{
+ unsigned i;
+ unsigned totalLength = [data length];
+ int bytesPerLine = 16;
+ NSMutableString *retVal = [NSMutableString string];
+ unsigned char *nodisplay = "\t\n\r\f";
+
+ // get the length of the longest location
+ int longest = [(NSString *)[NSString stringWithFormat:@"%X", totalLength - ( totalLength % bytesPerLine )] length];
+
+ for ( i = 0; i < totalLength; i += bytesPerLine ) {
+ int j;
+ NSMutableString *hex = [[NSMutableString alloc] initWithCapacity:(3 * bytesPerLine - 1)];
+ NSMutableString *location = [[NSMutableString alloc] initWithCapacity:(longest + 2)];
+ NSMutableString *chars = [[NSMutableString alloc] init];
+ unsigned char *buffer;
+ int buffLength = bytesPerLine;
+
+ // add hex value of location
+ [location appendString:[NSString stringWithFormat:@"%X", i]];
+
+ // pad it
+ while( longest > [location length] ) {
+ [location insertString:@"0" atIndex:0];
+ }
+
+ // get the chars from the NSData obj
+ if ( i + buffLength >= totalLength ) {
+ buffLength = totalLength - i;
+ }
+ buffer = (unsigned char*) malloc( sizeof( unsigned char ) * buffLength );
+ NSRange range = { i, buffLength };
+ [data getBytes:buffer range:range];
+
+ // build the hex string
+ for ( j = 0; j < buffLength; j++ ) {
+ unsigned char byte = *(buffer + j);
+ if ( byte < 16 ) {
+ [hex appendString:@"0"];
+ }
+ [hex appendString:[NSString stringWithFormat:@"%X", byte]];
+ [hex appendString:@" "];
+
+ // if the char is undisplayable, replace it with "."
+ unsigned char current;
+ int count = 0;
+ while ( ( current = *(nodisplay + count++) ) > 0 ) {
+ if ( current == byte ) {
+ *(buffer + j) = '.';
+ break;
+ }
+ }
+ }
+
+ // add padding to missing hex values.
+ for ( j = 0; j < bytesPerLine - buffLength; j++ ) {
+ [hex appendString:@" "];
+ }
+
+ // remove extra ghost characters
+ [chars appendString:[NSString stringWithCString:buffer]];
+ if ( [chars length] > bytesPerLine ) {
+ [chars deleteCharactersInRange:NSMakeRange( bytesPerLine, [chars length] - bytesPerLine )];
+ }
+
+ // build line
+ [retVal appendString:location];
+ [retVal appendString:@" "];
+ [retVal appendString:hex];
+ [retVal appendString:@" "];
+ [retVal appendString:chars];
+ [retVal appendString:@"\n"];
+
+ // clean up
+ [hex release];
+ [chars release];
+ [location release];
+ free( buffer );
+ }
+
+ return retVal;
+}
+
+//getter methods
+- (NSArray *)currentResult
+/*
+returns the current result (as shown in table content view) as array, the first object containing the field names as array, the following objects containing the rows as array
+*/
+{
+ NSArray *tableColumns;
+ NSEnumerator *enumerator;
+ id tableColumn;
+ NSMutableArray *currentResult = [NSMutableArray array];
+ NSMutableArray *tempRow = [NSMutableArray array];
+ int i;
+
+ //load table if not already done
+ if ( ![tablesListInstance contentLoaded] ) {
+ [self loadTable:[tablesListInstance table]];
+ }
+
+ tableColumns = [tableContentView tableColumns];
+ enumerator = [tableColumns objectEnumerator];
+
+ //set field names as first line
+ while ( (tableColumn = [enumerator nextObject]) ) {
+ [tempRow addObject:[[tableColumn headerCell] stringValue]];
+ }
+ [currentResult addObject:[NSArray arrayWithArray:tempRow]];
+
+ //add rows
+ for ( i = 0 ; i < [self numberOfRowsInTableView:nil] ; i++) {
+ [tempRow removeAllObjects];
+ enumerator = [tableColumns objectEnumerator];
+ while ( (tableColumn = [enumerator nextObject]) ) {
+ [tempRow addObject:[self tableView:nil objectValueForTableColumn:tableColumn row:i]];
+ }
+ [currentResult addObject:[NSArray arrayWithArray:tempRow]];
+ }
+ return currentResult;
+}
+
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection
+/*
+sets the connection (received from TableDocument) and makes things that have to be done only once
+*/
+{
+ mySQLConnection = theConnection;
+
+ [tableContentView setVerticalMotionCanBeginDrag:NO];
+
+ prefs = [[NSUserDefaults standardUserDefaults] retain];
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [argumentField setFont:[NSFont fontWithName:@"Monaco" size:10]];
+ [limitRowsField setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [editTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ } else {
+ [editTextView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+ [hexTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [limitRowsStepper setEnabled:NO];
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ [limitRowsText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Limited to %d rows starting with row", @"text showing the number of rows the result is limited to"),
+ [prefs integerForKey:@"limitRowsValue"]]];
+ } else {
+ [limitRowsText setStringValue:NSLocalizedString(@"No limit", @"text showing that the result isn't limited")];
+ [limitRowsField setStringValue:@""];
+ }
+}
+
+- (IBAction)setCompareTypes:(id)sender
+/*
+sets the compare types for the filter and the appropriate formatter for the textField
+*/
+{
+ NSArray *stringFields = [NSArray arrayWithObjects:@"varstring", @"string", @"tinyblob", @"blob", @"mediumblob", @"longblob", @"set", @"enum", nil];
+ NSArray *stringTypes = [NSArray arrayWithObjects:NSLocalizedString(@"is", @"popup menuitem for field IS value"), NSLocalizedString(@"is not", @"popup menuitem for field IS NOT value"), NSLocalizedString(@"contains", @"popup menuitem for field CONTAINS value"), NSLocalizedString(@"contains not", @"popup menuitem for field CONTAINS NOT value"), @"IN", nil];
+ NSArray *numberFields = [NSArray arrayWithObjects:@"tiny", @"short", @"long", @"int24", @"longlong", @"decimal", @"float", @"double", nil];
+ NSArray *numberTypes = [NSArray arrayWithObjects:@"=", @"­", @">", @"<", @"³", @"²", @"IN", nil];
+ NSArray *dateFields = [NSArray arrayWithObjects:@"timestamp", @"date", @"time", @"datetime", @"year", nil];
+ NSArray *dateTypes = [NSArray arrayWithObjects:NSLocalizedString(@"is", @"popup menuitem for field IS value"), NSLocalizedString(@"is not", @"popup menuitem for field IS NOT value"), NSLocalizedString(@"older than", @"popup menuitem for field OLDER THAN value"), NSLocalizedString(@"younger than", @"popup menuitem for field YOUNGER THAN value"), NSLocalizedString(@"older than or equal to", @"popup menuitem for field OLDER THAN OR EQUAL TO value"), NSLocalizedString(@"younger than or equal to", @"popup menuitem for field YOUNGER THAN OR EQUAL TO value"), nil];
+ NSString *fieldType = [NSString stringWithString:[fieldTypes objectAtIndex:[[fieldField selectedItem] tag]]];
+// NSNumberFormatter *numberFormatter;
+ int i;
+
+// numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
+// [numberFormatter setFormat:@"0.####################"];
+
+ [compareField removeAllItems];
+// [argumentField setStringValue:@""];
+
+//why do we get "string" for enum fields? (error in framework?)
+ if ( [stringFields containsObject:fieldType] ) {
+ [compareField addItemsWithTitles:stringTypes];
+ compareType = @"string";
+// [argumentField setFormatter:nil];
+ } else if ( [numberFields containsObject:fieldType] ) {
+ [compareField addItemsWithTitles:numberTypes];
+ compareType = @"number";
+// [argumentField setFormatter:numberFormatter];
+ } else if ( [dateFields containsObject:fieldType] ) {
+ [compareField addItemsWithTitles:dateTypes];
+ compareType = @"date";
+/*
+ if ([fieldType isEqualToString:@"timestamp"]) {
+ [argumentField setFormatter:[[NSDateFormatter alloc]
+ initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([fieldType isEqualToString:@"datetime"]) {
+ [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([fieldType isEqualToString:@"date"]) {
+ [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d" allowNaturalLanguage:YES]];
+ }
+ if ([fieldType isEqualToString:@"time"]) {
+ [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%H:%M:%S" allowNaturalLanguage:YES]];
+ }
+ if ([fieldType isEqualToString:@"year"]) {
+ [argumentField setFormatter:[[NSDateFormatter alloc] initWithDateFormat:@"%Y" allowNaturalLanguage:YES]];
+ }
+*/
+ } else {
+ NSLog(@"ERROR: unknown type for comparision: %@", fieldType);
+ }
+
+ for ( i = 0 ; i < [compareField numberOfItems] ; i++ ) {
+ [[compareField itemAtIndex:i] setTag:i];
+ }
+
+// set focus on argumentField
+ [argumentField selectText:self];
+}
+
+- (IBAction)stepLimitRows:(id)sender
+/*
+steps the start row up or down (+/- limitRowsValue)
+*/
+{
+ if ( [limitRowsStepper intValue] > 0 ) {
+ [limitRowsField setIntValue:[limitRowsField intValue]+[prefs integerForKey:@"limitRowsValue"]];
+ } else {
+ if ( ([limitRowsField intValue]-[prefs integerForKey:@"limitRowsValue"]) < 1 ) {
+ [limitRowsField setIntValue:1];
+ } else {
+ [limitRowsField setIntValue:[limitRowsField intValue]-[prefs integerForKey:@"limitRowsValue"]];
+ }
+ }
+ [limitRowsStepper setIntValue:0];
+}
+
+- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult
+/*
+fetches the result as an array with a dictionary for each row in it
+*/
+{
+ NSMutableArray *tempResult = [NSMutableArray array];
+ NSDictionary *tempRow;
+ NSMutableDictionary *modifiedRow = [NSMutableDictionary dictionary];
+ NSEnumerator *enumerator;
+ id key;
+ int i,j;
+
+ for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
+ [theResult dataSeek:i];
+ tempRow = [theResult fetchRowAsDictionary];
+ enumerator = [tempRow keyEnumerator];
+ while ( key = [enumerator nextObject] ) {
+ if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] ) {
+ [modifiedRow setObject:[prefs stringForKey:@"nullValue"] forKey:key];
+/*
+//NSData objects now decoded in tableView:objectValueForTableColumn:row
+//object in result remains a NSData object
+ } else if ( [[tempRow objectForKey:key] isKindOfClass:[NSData class]] ) {
+ [modifiedRow setObject:[[NSString alloc] initWithData:[tempRow objectForKey:key] encoding:[mySQLConnection encoding]]
+ forKey:key];
+*/
+ } else {
+ [modifiedRow setObject:[tempRow objectForKey:key] forKey:key];
+ }
+ //add values for hidden blob and text fields
+ if ( [prefs boolForKey:@"dontShowBlob"] ) {
+ for ( j = 0 ; j < [fieldTypes count] ; j++ ) {
+ if ( [self isBlobOrText:[fieldTypes objectAtIndex:j]] ) {
+ [modifiedRow setObject:NSLocalizedString(@"- blob or text -", @"value shown for hidden blob and text fields") forKey:[fieldNames objectAtIndex:j]];
+ }
+ }
+ }
+ }
+ [tempResult addObject:[NSMutableDictionary dictionaryWithDictionary:modifiedRow]];
+ }
+ return tempResult;
+}
+
+- (BOOL)addRowToDB
+/*
+tries to write row to mysql-db
+returns YES if row written to db, otherwies NO
+returns YES if no row is beeing edited and nothing has to be written to db
+*/
+{
+ int rowIndex = [tableContentView selectedRow];
+ NSMutableArray *fieldValues = [[NSMutableArray alloc] init];
+ NSMutableString *queryString;
+ NSString *query;
+ CMMCPResult *queryResult;
+ id rowObject;
+ NSMutableString *rowValue = [NSMutableString string];
+ NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil];
+ int i;
+
+ if ( !isEditingRow || rowIndex == -1) {
+ [fieldValues release];
+ return YES;
+ }
+
+//get field values
+ for ( i=0 ; i < [fieldNames count] ; i++) {
+ rowObject = [[filteredResult objectAtIndex:rowIndex] objectForKey:[fieldNames objectAtIndex:i]];
+//convert the object to a string (here we can add special treatment for date-, number- and data-fields)
+ if ( [[rowObject description] isEqualToString:[prefs stringForKey:@"nullValue"]] ||
+ ([rowObject isMemberOfClass:[NSConstantString class]] && [[rowObject description] isEqualToString:@""]) ) {
+ //NULL when user entered the nullValue string defined in the prefs or when a number field isn't set
+ // problem: when a number isn't set, cocoamysql enters 0
+ // -> second if argument isn't necessary!
+ [rowValue setString:@"NULL"];
+ } else {
+ if ( [rowObject isKindOfClass:[NSCalendarDate class]] ) {
+// [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:[rowObject description]]]];
+ [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:[rowObject description]]]];
+ } else if ( [rowObject isKindOfClass:[NSNumber class]] ) {
+ [rowValue setString:[rowObject stringValue]];
+ } else if ( [rowObject isKindOfClass:[NSData class]] ) {
+ //problem: if a blob field is edited, it becomes a string and is not more prepared as binary data
+ // but probably blob fields are corrupted before, when they decoded in the tableView method
+// [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareBinaryData:rowObject]]];
+ [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareBinaryData:rowObject]]];
+ } else {
+// [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:[rowObject description]]]];
+ if ( [[rowObject description] isEqualToString:@"CURRENT_TIMESTAMP"] ) {
+ [rowValue setString:@"CURRENT_TIMESTAMP"];
+ } else {
+ [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:[rowObject description]]]];
+ }
+ }
+ }
+//escape special characters -> now escaped by framework
+/*
+ for ( j = 0 ; j < [rowValue length] ; j++ ) {
+ if ( [rowValue characterAtIndex:j] == '\\' ) {
+ [rowValue insertString:@"\\" atIndex:j];
+ j++;
+ } else if ( [rowValue characterAtIndex:j] == '"' ) {
+ [rowValue insertString:@"\\" atIndex:j];
+ j++;
+ }
+ }
+*/
+ [fieldValues addObject:[NSString stringWithString:rowValue]];
+ }
+
+ if ( isEditingNewRow ) {
+//INSERT syntax
+ queryString = [NSString stringWithFormat:@"INSERT INTO `%@` (`%@`) VALUES (%@)",
+ selectedTable, [fieldNames componentsJoinedByString:@"`,`"], [fieldValues componentsJoinedByString:@","]];
+ } else {
+//UPDATE syntax
+ queryString = [NSMutableString stringWithFormat:@"UPDATE `%@` SET ", selectedTable];
+ for ( i = 0 ; i < [fieldNames count] ; i++ ) {
+ if ( i > 0 ) {
+ [queryString appendString:@", "];
+ }
+ [queryString appendString:[NSString stringWithFormat:@"`%@`=%@",
+ [fieldNames objectAtIndex:i], [fieldValues objectAtIndex:i]]];
+ }
+ [fieldValues release];
+ [queryString appendString:[NSString stringWithFormat:@" WHERE %@", [self argumentForRow:-2]]];
+ }
+ [mySQLConnection queryString:queryString];
+
+//NSLog( @"%@", queryString );
+
+ if ( ![mySQLConnection affectedRows] ) {
+//no rows changed
+ if ( [prefs boolForKey:@"showError"] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"The row was not written to the MySQL database. You probably haven't changed anything.\nReload the table to be sure that the row exists and use a primary key for your table.\n(This error can be turned off in the preferences.)", @"message of panel when no rows have been affected after writing to the db"));
+ } else {
+ NSBeep();
+ }
+ [filteredResult replaceObjectAtIndex:rowIndex withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]];
+ isEditingRow = NO;
+ isEditingNewRow = NO;
+ [tableDocumentInstance showErrorInConsole:[NSString stringWithFormat:NSLocalizedString(@"/* WARNING %@ No rows have been affected */\n", @"warning shown in the console when no rows have been affected after writing to the db"), currentTime]];
+ return YES;
+ } else if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+//added new row with success
+ isEditingRow = NO;
+ if ( isEditingNewRow ) {
+ if ( [prefs boolForKey:@"reloadAfterAdding"] ) {
+ [self reloadTableValues:self];
+// if ( sortField )
+ [tableContentView deselectAll:self];
+ } else {
+ //set insertId for fields with auto_increment
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]];
+ for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) {
+ [queryResult dataSeek:i];
+ rowObject = [queryResult fetchRowAsDictionary];
+ if ( [[rowObject objectForKey:@"Extra"] isEqualToString:@"auto_increment"] ) {
+ [[filteredResult objectAtIndex:rowIndex] setObject:[NSNumber numberWithLong:[mySQLConnection insertId]]
+ forKey:[rowObject objectForKey:@"Field"]];
+ }
+ }
+ [fullResult addObject:[filteredResult objectAtIndex:rowIndex]];
+ }
+ isEditingNewRow = NO;
+ } else {
+//updated row with success
+ if ( [prefs boolForKey:@"reloadAfterEditing"] ) {
+ [self reloadTableValues:self];
+// if ( sortField )
+ [tableContentView deselectAll:self];
+ } else {
+// query = [@"SELECT * FROM " stringByAppendingString:selectedTable];
+ query = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable];
+ if ( sortField ) {
+// query = [query stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]];
+ query = [NSString stringWithFormat:@"%@ ORDER BY `%@`", query, sortField];
+ if ( isDesc )
+ query = [query stringByAppendingString:@" DESC"];
+ }
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ if ( [limitRowsField intValue] <= 0 ) {
+ [limitRowsField setStringValue:@"1"];
+ }
+ query = [query stringByAppendingString:
+ [NSString stringWithFormat:@" LIMIT %d,%d",
+ [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]];
+ }
+ queryResult = [mySQLConnection queryString:query];
+// [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]];
+ [fullResult setArray:[self fetchResultAsArray:queryResult]];
+ }
+ }
+ return YES;
+ } else {
+//error in mysql-query
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addrow",
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't write row.\nMySQL said: %@", @"message of panel when error while adding row to db"), [mySQLConnection getLastErrorMessage]]);
+ return NO;
+ }
+}
+
+- (NSString *)argumentForRow:(int)row
+/*
+returns the WHERE argument to identify a row
+if row is -2, it uses the oldRow
+if there is one, it uses the primary key, otherwise uses all fields as argument and sets LIMIT to 1
+*/
+{
+ CMMCPResult *theResult;
+ NSDictionary *theRow;
+ id tempValue;
+ NSMutableString *value = [NSMutableString string];
+ NSMutableString *argument = [NSMutableString string];
+ int i,j;
+ NSEnumerator *enumerator;
+ id type;
+ BOOL blob = NO;
+ NSArray *numberFields = [NSArray arrayWithObjects:@"tiny", @"short", @"long", @"int24", @"longlong", @"decimal", @"float", @"double", nil];
+
+ if ( row == -1 )
+ return @"";
+
+//get primary key if there is one
+/*
+ theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW INDEX FROM `%@`", selectedTable]];
+ for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
+ [theResult dataSeek:i];
+ theRow = [theResult fetchRowAsDictionary];
+ if ( [[theRow objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"] ) {
+ [keys addObject:[theRow objectForKey:@"Column_name"]];
+ }
+ }
+*/
+ if ( !keys ) {
+ setLimit = NO;
+ keys = [[NSMutableArray alloc] init];
+ theResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]];
+ for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
+ [theResult dataSeek:i];
+ theRow = [theResult fetchRowAsDictionary];
+ if ( [[theRow objectForKey:@"Key"] isEqualToString:@"PRI"] ) {
+ [keys addObject:[theRow objectForKey:@"Field"]];
+ }
+ }
+ }
+
+ if ( ![keys count] ) {
+//if there is no primary key, take all fields as argument
+//here we have a problem when dontShowBlob == YES (we don't have the right values to use in the WHERE statement)
+ [keys setArray:fieldNames];
+ setLimit = YES;
+ enumerator = [fieldTypes objectEnumerator];
+ while ( (type = [enumerator nextObject]) ) {
+ if ( [self isBlobOrText:type] ) {
+ blob = YES;
+ }
+ }
+ if ( [prefs boolForKey:@"dontShowBlob"] && blob ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"You can't hide blob and text fields when working with tables without index.", @"message of panel when trying to edit tables without index and with hidden blob/text fields"));
+ [keys removeAllObjects];
+ [tableContentView deselectAll:self];
+ return @"";
+ }
+ }
+ for ( i = 0 ; i < [keys count] ; i++ ) {
+ if ( i )
+ [argument appendString:@" AND "];
+ if ( row >= 0 ) {
+ //use selected row
+ tempValue = [[filteredResult objectAtIndex:row] objectForKey:[keys objectAtIndex:i]];
+ } else {
+ //use oldRow
+ tempValue = [oldRow objectForKey:[keys objectAtIndex:i]];
+ }
+ if ( [tempValue isKindOfClass:[NSData class]] ) {
+ [value setString:[[NSString alloc] initWithData:tempValue encoding:[mySQLConnection encoding]]];
+ } else {
+ [value setString:[tempValue description]];
+ }
+
+ if ( [value isEqualToString:[prefs stringForKey:@"nullValue"]] ) {
+ [value setString:@"NULL"];
+ } else {
+ //escape special characters (in WHERE statement!)
+ for ( j = 0 ; j < [value length] ; j++ ) {
+ if ( [value characterAtIndex:j] == '\\' ) {
+ [value insertString:@"\\" atIndex:j];
+ j++;
+ }
+ }
+ [value setString:[mySQLConnection prepareString:value]];
+ for ( j = 0 ; j < [value length] ; j++ ) {
+ if ( [value characterAtIndex:j] == '%' ||
+ [value characterAtIndex:j] == '_' ) {
+ [value insertString:@"\\" atIndex:j];
+ j++;
+ }
+ }
+// [value setString:[NSString stringWithFormat:@"\"%@\"", value]];
+ [value setString:[NSString stringWithFormat:@"'%@'", value]];
+ }
+ if ( [value isEqualToString:@"NULL"] ) {
+ [argument appendString:[NSString stringWithFormat:@"`%@` IS NULL", [keys objectAtIndex:i]]];
+ } else {
+ if ( [numberFields containsObject:[fieldTypes objectAtIndex:[fieldNames indexOfObject:[keys objectAtIndex:i]]]] ) {
+ [argument appendString:[NSString stringWithFormat:@"`%@` = %@", [keys objectAtIndex:i], value]];
+ } else {
+ [argument appendString:[NSString stringWithFormat:@"`%@` LIKE %@", [keys objectAtIndex:i], value]];
+ }
+ }
+ }
+ if ( setLimit )
+ [argument appendString:@" LIMIT 1"];
+ return argument;
+}
+
+- (BOOL)isBlobOrText:(NSString *)fieldType
+/*
+returns YES if fieldType is some kind of blob or text. afaik the type of this fields is always blob, but better we test it...
+it would be nice to know if it is blob or text, but mysql doesn't want to tell it...
+*/
+{
+ if ( [fieldType isEqualToString:@"tinyblob"] || [fieldType isEqualToString:@"blob"] ||
+ [fieldType isEqualToString:@"mediumblob"] || [fieldType isEqualToString:@"longblob"] ) {
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+- (NSString *)fieldListForQuery
+/*
+returns * if dontShowBlob == NO
+returns a comma-separated list of all fields which aren't of type blob or text if dontShowBlob == YES
+*/
+{
+ int i;
+ NSMutableArray *fields = [NSMutableArray array];
+
+ if ( [prefs boolForKey:@"dontShowBlob"] ) {
+ for ( i = 0 ; i < [fieldTypes count] ; i++ ) {
+ if ( ![self isBlobOrText:[fieldTypes objectAtIndex:i]] ) {
+ [fields addObject:[fieldNames objectAtIndex:i]];
+ }
+ }
+ if ( [fields count] == 0 ) {
+ return [NSString stringWithFormat:@"`%@`", [fieldNames objectAtIndex:0]];
+ } else {
+ return [NSString stringWithFormat:@"`%@`", [fields componentsJoinedByString:@"`,`"]];
+ }
+ } else {
+ return @"*";
+ }
+}
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+/*
+if contextInfo == addrow: remain in edit-mode if user hits OK, otherwise cancel editing
+if contextInfo == removerow: removes row if user hits OK
+*/
+{
+ NSEnumerator *enumerator = [tableContentView selectedRowEnumerator];
+ NSNumber *index;
+ NSMutableArray *tempArray = [NSMutableArray array];
+ NSMutableArray *tempResult = [NSMutableArray array];
+ NSString *queryString;
+ CMMCPResult *queryResult;
+ int i, errors;
+
+ [sheet orderOut:self];
+
+ if ( [contextInfo isEqualToString:@"addrow"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+ //problem: reenter edit mode doesn't function
+ [tableContentView editColumn:0 row:[tableContentView selectedRow] withEvent:nil select:YES];
+ } else {
+ if ( !isEditingNewRow ) {
+ [filteredResult replaceObjectAtIndex:[tableContentView selectedRow]
+ withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]];
+ isEditingRow = NO;
+ } else {
+ [filteredResult removeObjectAtIndex:[tableContentView selectedRow]];
+ isEditingRow = NO;
+ isEditingNewRow = NO;
+ }
+ }
+ [tableContentView reloadData];
+ } else if ( [contextInfo isEqualToString:@"removeallrows"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+/*
+ if ( ([tableContentView numberOfSelectedRows] == [self numberOfRowsInTableView:tableContentView]) &&
+ ![showAllButton isEnabled] &&
+ ([tableContentView numberOfSelectedRows] < [prefs integerForKey:@"limitRowsValue"]) ) {
+*/
+ [mySQLConnection queryString:[NSString stringWithFormat:@"DELETE FROM `%@`", selectedTable]];
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [self reloadTable:self];
+ } else {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove rows.\nMySQL said: %@", @"message of panel when field cannot be removed"),
+ [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+ } else if ( [contextInfo isEqualToString:@"removerow"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+ errors = 0;
+
+ while ( (index = [enumerator nextObject]) ) {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"DELETE FROM `%@` WHERE %@",
+ selectedTable, [self argumentForRow:[index intValue]]]];
+ if ( ![mySQLConnection affectedRows] ) {
+ //no rows deleted
+ errors++;
+ } else if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ //rows deleted with success
+ [tempArray addObject:index];
+ } else {
+ //error in mysql-query
+ errors++;
+ }
+ }
+
+ if ( errors ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, [NSString stringWithFormat:NSLocalizedString(@"%d rows have not been removed. Reload the table to be sure that the rows exist and use a primary key for your table.", @"message of panel when not all selected fields have been deleted"), errors]);
+ }
+
+ //do deleting (after enumerating)
+ if ( [prefs boolForKey:@"reloadAfterRemoving"] ) {
+ [self reloadTableValues:self];
+ } else {
+ for ( i = 0 ; i < [filteredResult count] ; i++ ) {
+ if ( ![tempArray containsObject:[NSNumber numberWithInt:i]] )
+ [tempResult addObject:[filteredResult objectAtIndex:i]];
+ }
+ [filteredResult setArray:tempResult];
+ numRows = [self getNumberOfRows];
+ if ( [showAllButton isEnabled] ) {
+// queryString = [@"SELECT * FROM " stringByAppendingString:selectedTable];
+ queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@`", [self fieldListForQuery], selectedTable];
+ if ( sortField ) {
+// queryString = [queryString stringByAppendingString:[NSString stringWithFormat:@" ORDER BY `%@`", sortField]];
+ queryString = [NSString stringWithFormat:@"%@ ORDER BY `%@`", queryString, sortField];
+ if ( isDesc )
+ queryString = [queryString stringByAppendingString:@" DESC"];
+ }
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ if ( [limitRowsField intValue] <= 0 ) {
+ [limitRowsField setStringValue:@"1"];
+ }
+ queryString = [queryString stringByAppendingString:
+ [NSString stringWithFormat:@" LIMIT %d,%d",
+ [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]];
+ }
+ queryResult = [mySQLConnection queryString:queryString];
+// [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]];
+ [fullResult setArray:[self fetchResultAsArray:queryResult]];
+ [tableContentView reloadData];
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows of %d selected", @"text showing how many rows are in the filtered result"),
+ [filteredResult count], numRows]];
+ } else {
+ [fullResult setArray:filteredResult];
+ [tableContentView reloadData];
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows in table", @"text showing how many rows are in the result"), numRows]];
+ }
+ }
+ [tableContentView deselectAll:self];
+ }
+ }
+}
+
+- (int)getNumberOfRows
+/*
+returns the number of rows in the selected table
+queries the number from mysql if enabled in prefs and result is limited, otherwise just return the fullResult count
+*/
+{
+ if ( [prefs boolForKey:@"limitRows"] && [prefs boolForKey:@"fetchRowCount"] ) {
+ numRows = [self fetchNumberOfRows];
+ } else {
+ numRows = [fullResult count];
+ }
+ return numRows;
+}
+
+- (int)fetchNumberOfRows
+/*
+fetches the number of rows in the selected table using a "SELECT COUNT(*)" query and return it
+*/
+{
+ return [[[[mySQLConnection queryString:[NSString stringWithFormat:@"SELECT COUNT(*) FROM `%@`", selectedTable]] fetchRowAsArray] objectAtIndex:0] intValue];
+}
+
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ return [filteredResult count];
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ id theRow, theValue;
+
+ theRow = [filteredResult objectAtIndex:rowIndex];
+ theValue = [theRow objectForKey:[aTableColumn identifier]];
+
+ if ( [theValue isKindOfClass:[NSData class]] ) {
+ theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]];
+ //show only first 50 characters to speed up interface (but return everything when this method is used to return the current result)
+// if ( ([theValue length] > 100) && aTableView ) {
+ }
+ if ( ([(NSString *)theValue length] > 100) && aTableView ) {
+ theValue = [NSString stringWithFormat:@"%@(...)", [theValue substringToIndex:100]];
+ }
+
+ return theValue;
+}
+
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ if ( !isEditingRow ) {
+ [oldRow setDictionary:[filteredResult objectAtIndex:rowIndex]];
+ isEditingRow = YES;
+ }
+ if ( anObject ) {
+ [[filteredResult objectAtIndex:rowIndex] setObject:anObject forKey:[aTableColumn identifier]];
+ } else {
+ [[filteredResult objectAtIndex:rowIndex] setObject:@"" forKey:[aTableColumn identifier]];
+ }
+}
+
+//tableView delegate methods
+- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn
+/*
+sorts the tableView by the clicked column
+if clicked twice, order is descending
+*/
+{
+ NSString *queryString;
+ NSImage *upSortImage;
+ NSImage *downSortImage;
+ CMMCPResult *queryResult;
+
+ if ( [selectedTable isEqualToString:@""] || !selectedTable )
+ return;
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+//query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ upSortImage = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sort-up" ofType:@"tiff"]];
+ [upSortImage autorelease];
+ downSortImage = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"sort-down" ofType:@"tiff"]];
+ [downSortImage autorelease];
+
+//sets order descending if a header is clicked twice
+ if ( [[tableColumn identifier] isEqualTo:sortField] ) {
+ if ( isDesc ) {
+ isDesc = NO;
+ } else {
+ isDesc = YES;
+ }
+ } else {
+ isDesc = NO;
+ [tableContentView setIndicatorImage:nil inTableColumn:[tableContentView tableColumnWithIdentifier:sortField]];
+ }
+ sortField = [tableColumn identifier];
+
+//make queryString and perform query
+ queryString = [NSString stringWithFormat:@"SELECT %@ FROM `%@` ORDER BY `%@`", [self fieldListForQuery],
+ selectedTable, sortField];
+ if ( isDesc )
+ queryString = [queryString stringByAppendingString:@" DESC"];
+ if ( [prefs boolForKey:@"limitRows"] ) {
+ if ( [limitRowsField intValue] <= 0 ) {
+ [limitRowsField setStringValue:@"1"];
+ }
+ queryString = [queryString stringByAppendingString:
+ [NSString stringWithFormat:@" LIMIT %d,%d",
+ [limitRowsField intValue]-1, [prefs integerForKey:@"limitRowsValue"]]];
+ }
+ queryResult = [mySQLConnection queryString:queryString];
+
+// [fullResult setArray:[[self fetchResultAsArray:queryResult] retain]];
+ [fullResult setArray:[self fetchResultAsArray:queryResult]];
+
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't sort table. MySQL said: %@", @"message of panel when sorting of table failed"), [mySQLConnection getLastErrorMessage]]);
+ return;
+ }
+
+//sets highlight and indicatorImage
+ [tableContentView setHighlightedTableColumn:tableColumn];
+ if ( isDesc ) {
+ [tableContentView setIndicatorImage:downSortImage inTableColumn:tableColumn];
+ } else {
+ [tableContentView setIndicatorImage:upSortImage inTableColumn:tableColumn];
+ }
+
+//query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+//if filter is activated filters the result, otherwise shows fullResult
+ if ( [showAllButton isEnabled] ) {
+ [self filterTable:self];
+ } else {
+ [filteredResult setArray:fullResult];
+ [tableContentView reloadData];
+ }
+}
+
+- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView
+{
+/*
+ int row = [tableContentView editedRow];
+ int column = [tableContentView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+ if ( row != -1 ) {
+ tableColumn = [[tableContentView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[tableContentView currentEditor]];
+ }
+*/
+//end editing (otherwise problems when user hits reload button)
+ [tableWindow endEditingFor:nil];
+
+ return [self addRowToDB];
+}
+
+- (void)tableViewColumnDidResize:(NSNotification *)aNotification
+/*
+saves the new column size in the preferences
+*/
+{
+ NSMutableDictionary *tableColumnWidths;
+ NSString *database = [NSString stringWithFormat:@"%@@%@", [tableDocumentInstance database], [tableDocumentInstance host]];
+ NSString *table = [tablesListInstance table];
+
+// get tableColumnWidths object
+ if ( [prefs objectForKey:@"tableColumnWidths"] != nil ) {
+ tableColumnWidths = [NSMutableDictionary dictionaryWithDictionary:[prefs objectForKey:@"tableColumnWidths"]];
+ } else {
+ tableColumnWidths = [NSMutableDictionary dictionary];
+ }
+// get database object
+ if ( [tableColumnWidths objectForKey:database] == nil ) {
+ [tableColumnWidths setObject:[NSMutableDictionary dictionary] forKey:database];
+ } else {
+ [tableColumnWidths setObject:[[tableColumnWidths objectForKey:database] mutableCopy] forKey:database];
+ }
+// get table object
+ if ( [[tableColumnWidths objectForKey:database] objectForKey:table] == nil ) {
+ [[tableColumnWidths objectForKey:database] setObject:[NSMutableDictionary dictionary] forKey:table];
+ } else {
+ [[tableColumnWidths objectForKey:database] setObject:[[[tableColumnWidths objectForKey:database] objectForKey:table] mutableCopy] forKey:table];
+ }
+// save column size
+ [[[tableColumnWidths objectForKey:database] objectForKey:table] setObject:[NSNumber numberWithFloat:[[[aNotification userInfo] objectForKey:@"NSTableColumn"] width]] forKey:[[[aNotification userInfo] objectForKey:@"NSTableColumn"] identifier]];
+ [prefs setObject:tableColumnWidths forKey:@"tableColumnWidths"];
+}
+
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
+/*
+opens sheet if multipleLineEditingButton is clicked or field is a hidden blob or text field
+*/
+{
+ NSEnumerator *enumerator;
+ id type;
+ BOOL blob = NO;
+ NSDictionary *tempRow;
+ NSMutableDictionary *modifiedRow = [NSMutableDictionary dictionary];
+ id key;
+ int code;
+ NSString *query;
+ CMMCPResult *tempResult;
+ id theValue;
+ BOOL columnIsBlob = NO;
+// int i;
+// NSArray *columns = [aTableView tableColumns];
+
+ if ( [prefs boolForKey:@"dontShowBlob"] && !isEditingRow ) {
+ //get all row values if dontShowBlob == YES and table contains blob or text field and isEditingRow = NO
+ enumerator = [fieldTypes objectEnumerator];
+ while ( (type = [enumerator nextObject]) ) {
+ if ( [self isBlobOrText:type] ) {
+ blob = YES;
+ }
+ }
+
+ if ( blob ) {
+ query = [NSString stringWithFormat:@"SELECT * FROM `%@` WHERE %@",
+ selectedTable, [self argumentForRow:[tableContentView selectedRow]]];
+ tempResult = [mySQLConnection queryString:query];
+ if ( ![tempResult numOfRows] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"Couldn't load the row. Reload the table to be sure that the row exists and use a primary key for your table.", @"message of panel when loading of row failed"));
+ return NO;
+ }
+ tempRow = [tempResult fetchRowAsDictionary];
+ enumerator = [tempRow keyEnumerator];
+ while ( key = [enumerator nextObject] ) {
+ if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] ) {
+ [modifiedRow setObject:[prefs stringForKey:@"nullValue"] forKey:key];
+ } else {
+ [modifiedRow setObject:[tempRow objectForKey:key] forKey:key];
+ }
+ }
+ [filteredResult replaceObjectAtIndex:rowIndex
+ withObject:[NSMutableDictionary dictionaryWithDictionary:modifiedRow]];
+ [tableContentView reloadData];
+ }
+ }
+
+/*
+ // find the column we're trying to edit
+ for ( i = 0; i < [columns count]; i++ ) {
+ if ( [columns objectAtIndex:i] == aTableColumn ) {
+ // this flag will let us determine if we should "force" multi-line edit.
+ columnIsBlob = [self isBlobOrText:[fieldTypes objectAtIndex:i]];
+ break;
+ }
+ }
+*/
+ //is the column a blob field -> if YES force sheet editing
+ if ( [self isBlobOrText:[fieldTypes objectAtIndex:[fieldNames indexOfObject:[aTableColumn identifier]]]] ) {
+ columnIsBlob = YES;
+ }
+
+ if ( [multipleLineEditingButton state] == NSOnState || columnIsBlob ) {
+ theValue = [[filteredResult objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
+ NSImage *image = nil;
+ editData = [theValue retain];
+
+ if ( [theValue isKindOfClass:[NSData class]] ) {
+ image = [[NSImage alloc] initWithData:theValue];
+ [hexTextView setString:[self dataToHex:theValue]];
+/*
+ // update displayed font to monospace
+ NSFont *font = [NSFont fontWithName:@"Courier" size:12.0f];
+ NSRange hexRange = { 0, [[hexTextView string] length] - 1 };
+ [hexTextView setFont:font range:hexRange];
+*/
+ theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]];
+ } else {
+ [hexTextView setString:@""];
+ theValue = [theValue description];
+ }
+
+ [editImage setImage:image];
+ [editTextView setString:theValue];
+ [editTextView setSelectedRange:NSMakeRange(0,[[editTextView string] length])];
+//different sheets for date (with up/down arrows), number and text
+ [NSApp beginSheet:editSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:editSheet];
+
+ [NSApp endSheet:editSheet];
+ [editSheet orderOut:nil];
+
+ if ( code ) {
+ if ( !isEditingRow ) {
+ [oldRow setDictionary:[filteredResult objectAtIndex:rowIndex]];
+ isEditingRow = YES;
+ }
+
+ [[filteredResult objectAtIndex:rowIndex] setObject:[editData copy]
+ forKey:[aTableColumn identifier]];
+
+ // clean up
+ [editImage setImage:nil];
+ [editTextView setString:@""];
+ [hexTextView setString:@""];
+ if ( editData ) {
+ [editData release];
+ }
+ }
+ return NO;
+ } else {
+ return YES;
+ }
+}
+
+- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray*)rows
+ toPasteboard:(NSPasteboard*)pboard
+/*
+enable drag from tableview
+*/
+{
+ if ( tableView == tableContentView )
+ {
+ NSString *tmp = [tableContentView draggedRowsAsTabString:rows];
+
+ if ( nil != tmp )
+ {
+ [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType,
+ NSStringPboardType, nil]
+ owner:nil];
+
+ [pboard setString:tmp forType:NSStringPboardType];
+ [pboard setString:tmp forType:NSTabularTextPboardType];
+ return YES;
+ }
+ }
+ return NO;
+}
+
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
+/*
+traps enter and esc an make/cancel editing without entering next row
+*/
+{
+ int row, column, i;
+
+ row = [tableContentView editedRow];
+ column = [tableContentView editedColumn];
+
+ if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) //trap enter and tab
+ {
+ //save current line
+ [[control window] makeFirstResponder:control];
+ if ( column == ( [tableContentView numberOfColumns] - 1 ) ) {
+ [self addRowToDB];
+/*
+ if ( [self addRowToDB] &&
+ ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) &&
+ !(sortField && ([prefs boolForKey:@"reloadAfterAdding"] || [prefs boolForKey:@"reloadAfterEditing"])) ) {
+//get in edit-mode of next row if user hit tab (and result isn't sorted and reloaded)
+ if ( row < ([tableContentView numberOfRows] - 1) ) {
+ [tableContentView selectRow:row+1 byExtendingSelection:NO];
+ [tableContentView editColumn:0 row:row+1 withEvent:nil select:YES];
+ } else {
+ [tableContentView selectRow:0 byExtendingSelection:NO];
+ [tableContentView editColumn:0 row:0 withEvent:nil select:YES];
+ }
+ }
+*/
+ } else {
+ //check if next column is a blob column
+ i = 1;
+ while ( [self isBlobOrText:[fieldTypes objectAtIndex:[fieldNames indexOfObject:[[[tableContentView tableColumns] objectAtIndex:column+i] identifier]]]] ) {
+ i++;
+ if ( (column+i) >= [tableContentView numberOfColumns] ) {
+ //there is no other column after the blob column
+ [self addRowToDB];
+ return TRUE;
+ }
+ }
+ //edit the column after the blob column
+ [tableContentView editColumn:column+i row:row withEvent:nil select:YES];
+ }
+ return TRUE;
+ }
+ else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) //trap esc
+ {
+ //abort editing
+ [control abortEditing];
+ if ( isEditingRow && !isEditingNewRow ) {
+ isEditingRow = NO;
+ [filteredResult replaceObjectAtIndex:row withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]];
+ } else if ( isEditingNewRow ) {
+ isEditingRow = NO;
+ isEditingNewRow = NO;
+ [filteredResult removeObjectAtIndex:row];
+ [tableContentView reloadData];
+ }
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+//textView delegate methods
+- (BOOL)textView:(NSTextView *)aTextView doCommandBySelector:(SEL)aSelector
+/*
+traps enter and return key and closes editSheet instead of inserting a linebreak when user hits return
+*/
+{
+ if ( aTextView == editTextView ) {
+ if ( [aTextView methodForSelector:aSelector] == [aTextView methodForSelector:@selector(insertNewline:)] &&
+ [[[NSApp currentEvent] characters] isEqualToString:@"\003"] )
+ {
+ [NSApp stopModalWithCode:1];
+ return YES;
+ } else {
+ return NO;
+ }
+ }
+ return NO;
+}
+
+
+//last but not least
+- (id)init
+{
+ self = [super init];
+
+ fullResult = [[NSMutableArray alloc] init];
+ filteredResult = [[NSMutableArray alloc] init];
+ oldRow = [[NSMutableDictionary alloc] init];
+
+ return self;
+}
+
+- (void)dealloc
+{
+// NSLog(@"TableContent dealloc");
+
+ [editData release];
+ [fullResult release];
+ [filteredResult release];
+ [keys release];
+ [oldRow release];
+ [fieldNames release];
+ [fieldTypes release];
+ [compareType release];
+ [sortField release];
+ [prefs release];
+
+ [super dealloc];
+}
+
+@end
diff --git a/TableDocument.h b/TableDocument.h
new file mode 100644
index 00000000..76e058a9
--- /dev/null
+++ b/TableDocument.h
@@ -0,0 +1,190 @@
+//
+// TableDocument.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+#import "SSHTunnel.h"
+
+@interface TableDocument : NSDocument
+{
+
+//IBOutlets
+ IBOutlet id keyChainInstance;
+ IBOutlet id tablesListInstance;
+ IBOutlet id tableSourceInstance;
+ IBOutlet id tableContentInstance;
+ IBOutlet id customQueryInstance;
+ IBOutlet id tableDumpInstance;
+ IBOutlet id tableStatusInstance;
+
+ IBOutlet id tableWindow;
+ IBOutlet id connectSheet;
+ IBOutlet id databaseSheet;
+ IBOutlet id variablesSheet;
+ IBOutlet id createTableSyntaxSheet;
+ IBOutlet id tableOperationsSheet;
+ IBOutlet id consoleDrawer;
+
+ IBOutlet id queryProgressBar;
+ IBOutlet id favoritesButton;
+ IBOutlet NSArrayController *favoritesController;
+ IBOutlet id hostField;
+ IBOutlet id socketField;
+ IBOutlet id userField;
+ IBOutlet id passwordField;
+ IBOutlet id portField;
+ IBOutlet id databaseField;
+
+ IBOutlet id sshCheckbox;
+ IBOutlet id sshUserField;
+ IBOutlet id sshPasswordField;
+ IBOutlet id sshHostField;
+ IBOutlet id sshPortField;
+
+ IBOutlet id connectProgressBar;
+ IBOutlet id databaseNameField;
+ IBOutlet id chooseDatabaseButton;
+ IBOutlet id consoleTextView;
+ IBOutlet id variablesTableView;
+ IBOutlet id createTableSyntaxView;
+ IBOutlet id chooseEncodingButton;
+ IBOutlet id chooseTableOperationButton;
+ IBOutlet NSTabView *tableTabView;
+
+ CMMCPConnection *mySQLConnection;
+
+ SSHTunnel *tunnel;
+
+ NSArray *favorites;
+ NSArray *variables;
+ NSString *selectedDatabase;
+ NSString *selectedFavorite;
+ NSString *mySQLVersion;
+ NSUserDefaults *prefs;
+}
+
+//start sheet
+- (IBAction)toggleUseSSH:(id)sender;
+- (IBAction)connectToDB:(id)sender;
+- (IBAction)connect:(id)sender;
+- (IBAction)closeSheet:(id)sender;
+- (IBAction)chooseFavorite:(id)sender;
+- (void)setFavorites;
+- (void)addToFavoritesHost:(NSString *)host socket:(NSString *)socket user:(NSString *)user password:(NSString *)password
+ port:(NSString *)port database:(NSString *)database useSSH:(BOOL)useSSH sshHost:(NSString *)sshHost
+ sshUser:(NSString *)sshUser sshPassword:(NSString *)sshPassword sshPort:(NSString *)sshPort;
+
+//alert sheets method
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
+
+//database methods
+- (IBAction)setDatabases:(id)sender;
+- (IBAction)chooseDatabase:(id)sender;
+- (IBAction)addDatabase:(id)sender;
+- (IBAction)closeDatabaseSheet:(id)sender;
+- (IBAction)removeDatabase:(id)sender;
+
+//console methods
+- (void)toggleConsole;
+- (void)clearConsole;
+- (BOOL)consoleIsOpened;
+- (void)showMessageInConsole:(NSString *)message;
+- (void)showErrorInConsole:(NSString *)error;
+
+//encoding methods
+- (void)setEncoding:(NSString *)encoding;
+- (void)detectEncoding;
+- (NSString *)getSelectedEncoding;
+- (IBAction)chooseEncoding:(id)sender;
+- (BOOL)supportsEncoding;
+
+//other methods
+- (NSString *)host;
+- (void)doPerformQueryService:(NSString *)query;
+- (void)flushPrivileges;
+- (void)openTableOperationsSheet;
+- (IBAction)doTableOperation:(id)sender;
+- (void)showVariables;
+- (void)showCreateTable;
+- (void)closeConnection;
+
+//getter methods
+- (NSString *)database;
+- (NSString *)table;
+- (NSString *)mySQLVersion;
+- (NSString *)user;
+
+//notification center methods
+- (void)willPerformQuery:(NSNotification *)notification;
+- (void)hasPerformedQuery:(NSNotification *)notification;
+- (void)applicationWillTerminate:(NSNotification *)notification;
+- (void)tunnelStatusChanged:(NSNotification *)notification;
+
+//menu methods
+- (IBAction)import:(id)sender;
+- (IBAction)export:(id)sender;
+- (BOOL)validateMenuItem:(NSMenuItem *)anItem;
+- (IBAction)viewStructure:(id)sender;
+- (IBAction)viewContent:(id)sender;
+- (IBAction)viewQuery:(id)sender;
+- (IBAction)viewStatus:(id)sender;
+
+//toolbar methods
+- (void)setupToolbar;
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag;
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar;
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar;
+- (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem;
+
+//NSDocument methods
+- (NSString *)windowNibName;
+- (void)windowControllerDidLoadNib:(NSWindowController *)aController;
+- (void)windowWillClose:(NSNotification *)aNotification;
+
+//NSWindow delegate methods
+- (BOOL)windowShouldClose:(id)sender;
+
+//SMySQL delegate methods
+- (void)willQueryString:(NSString *)query;
+- (void)queryGaveError:(NSString *)error;
+
+//splitView delegate methods
+- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview;
+- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset;
+- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//for freeing up memory
+- (void)dealloc;
+
+@end
+
+extern NSString *TableDocumentFavoritesControllerSelectionIndexDidChange; \ No newline at end of file
diff --git a/TableDocument.m b/TableDocument.m
new file mode 100644
index 00000000..5274c688
--- /dev/null
+++ b/TableDocument.m
@@ -0,0 +1,1625 @@
+//
+// TableDocument.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "TableDocument.h"
+#import "KeyChain.h"
+#import "TablesList.h"
+#import "TableSource.h"
+#import "TableContent.h"
+#import "CustomQuery.h"
+#import "TableDump.h"
+#import "TableStatus.h"
+
+NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocumentFavoritesControllerSelectionIndexDidChange";
+
+@implementation TableDocument
+
+- (void)awakeFromNib
+{
+ [favoritesController addObserver:self forKeyPath:@"selectionIndex" options:NSKeyValueChangeInsertion context:TableDocumentFavoritesControllerSelectionIndexDidChange];
+}
+
+- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
+{
+ if (context == TableDocumentFavoritesControllerSelectionIndexDidChange) {
+ [self chooseFavorite:self];
+ }
+ else {
+ [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
+ }
+}
+
+
+
+//start sheet
+- (IBAction)toggleUseSSH:(id)sender
+/*
+enables/disables ssh tunneling
+*/
+{
+ if ([sshCheckbox state] == NSOnState) {
+ [sshUserField setEnabled:YES];
+ [sshPasswordField setEnabled:YES];
+ [sshHostField setEnabled:YES];
+ [sshPortField setEnabled:YES];
+ } else {
+ [sshUserField setEnabled:NO];
+ [sshPasswordField setEnabled:NO];
+ [sshHostField setEnabled:NO];
+ [sshPortField setEnabled:NO];
+ }
+}
+
+- (IBAction)connectToDB:(id)sender
+/*
+tries to connect to the db
+alert-sheets when no success
+*/
+{
+ CMMCPResult *theResult;
+ NSString *encoding;
+ int code;
+ id version;
+
+ [self setFavorites];
+
+ [NSApp beginSheet:connectSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:connectSheet];
+
+ [NSApp endSheet:connectSheet];
+ [connectSheet orderOut:nil];
+
+ if ( code == 1) {
+//connected with success
+ //register as delegate
+ [mySQLConnection setDelegate:self];
+ // set encoding
+ encoding = [prefs objectForKey:@"encoding"];
+ if ( [encoding isEqualToString:@"Autodetect"] ) {
+ [self detectEncoding];
+ } else {
+ [chooseEncodingButton selectItemWithTitle:encoding];
+ [self setEncoding:[self getSelectedEncoding]];
+ }
+ // get selected db
+ if ( ![[databaseField stringValue] isEqualToString:@""] )
+ selectedDatabase = [[databaseField stringValue] retain];
+ //get mysql version
+// theResult = [mySQLConnection queryString:@"SHOW VARIABLES LIKE \"version\""];
+ theResult = [mySQLConnection queryString:@"SHOW VARIABLES LIKE 'version'"];
+ version = [[theResult fetchRowAsArray] objectAtIndex:1];
+ if ( [version isKindOfClass:[NSData class]] ) {
+ // starting with MySQL 4.1.14 the mysql variables are returned as nsdata
+ mySQLVersion = [[NSString alloc] initWithData:version encoding:[mySQLConnection encoding]];
+ } else {
+ mySQLVersion = [[NSString stringWithString:version] retain];
+ }
+ [self setDatabases:self];
+ [tablesListInstance setConnection:mySQLConnection];
+ [tableSourceInstance setConnection:mySQLConnection];
+ [tableContentInstance setConnection:mySQLConnection];
+ [customQueryInstance setConnection:mySQLConnection];
+ [tableDumpInstance setConnection:mySQLConnection];
+ [tableStatusInstance setConnection:mySQLConnection];
+ [self setFileName:[NSString stringWithFormat:@"(MySQL %@) %@@%@ %@", mySQLVersion, [userField stringValue],
+ [hostField stringValue], [databaseField stringValue]]];
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", mySQLVersion, [userField stringValue],
+ [hostField stringValue], [databaseField stringValue]]];
+ } else if (code == 2) {
+//can't connect to host
+ NSBeginAlertSheet(NSLocalizedString(@"Connection failed!", @"connection failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil,
+ @selector(sheetDidEnd:returnCode:contextInfo:), @"connect",
+ [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to host %@.\nBe sure that the address is correct and that you have the necessary privileges.\nMySQL said: %@", @"message of panel when connection to host failed"), [hostField stringValue], [mySQLConnection getLastErrorMessage]]);
+ } else if (code == 3) {
+//can't connect to db
+ NSBeginAlertSheet(NSLocalizedString(@"Connection failed!", @"connection failed"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil,
+ @selector(sheetDidEnd:returnCode:contextInfo:), @"connect",
+ [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that the database exists and that you have the necessary privileges.\nMySQL said: %@", @"message of panel when connection to db failed"), [databaseField stringValue], [mySQLConnection getLastErrorMessage]]);
+ } else if (code == 4) {
+//no host is given
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil,
+ @selector(sheetDidEnd:returnCode:contextInfo:), @"connect", NSLocalizedString(@"Please enter at least a host or socket.", @"message of panel when host/socket are missing"));
+ } else {
+//cancel button was pressed
+ //since the window is getting ready to be toast ignore events for awhile
+ //so as not to crash, this happens to me when hitten esc key instead of
+ //cancel button, but with this code it does not crash
+ [[NSApplication sharedApplication] discardEventsMatchingMask:NSAnyEventMask
+ beforeEvent:[[NSApplication sharedApplication] nextEventMatchingMask:NSLeftMouseDownMask | NSLeftMouseUpMask |NSRightMouseDownMask | NSRightMouseUpMask | NSFlagsChangedMask | NSKeyDownMask | NSKeyUpMask untilDate:[NSDate distantPast] inMode:NSEventTrackingRunLoopMode dequeue:YES]];
+ [tableWindow close];
+ }
+}
+
+
+- (IBAction)connect:(id)sender
+/*
+invoked when user hits the connect-button of the connectSheet
+stops modal session with code:
+1 when connected with success
+2 when no connection to host
+3 when no connection to db
+4 when hostField and socketField are empty
+*/
+{
+ int code;
+
+ [connectProgressBar startAnimation:self];
+
+ code = 0;
+ if ( [[hostField stringValue] isEqualToString:@""] && [[socketField stringValue] isEqualToString:@""] ) {
+ code = 4;
+ } else {
+ if ( ![[socketField stringValue] isEqualToString:@""] ) {
+ //connect to socket
+ mySQLConnection = [[CMMCPConnection alloc] initToSocket:[socketField stringValue]
+ withLogin:[userField stringValue]
+ password:[passwordField stringValue]];
+ [hostField setStringValue:@"localhost"];
+ } else {
+ //connect to host
+ mySQLConnection = [[CMMCPConnection alloc] initToHost:[hostField stringValue]
+ withLogin:[userField stringValue]
+ password:[passwordField stringValue]
+ usingPort:[portField intValue]];
+ }
+ if ( ![mySQLConnection isConnected] )
+ code = 2;
+ if ( !code && ![[databaseField stringValue] isEqualToString:@""] )
+ if ( ![mySQLConnection selectDB:[databaseField stringValue]] )
+ code = 3;
+ if ( !code )
+ code = 1;
+ }
+ [NSApp stopModalWithCode:code];
+
+ [connectProgressBar stopAnimation:self];
+}
+
+- (IBAction)closeSheet:(id)sender
+/*
+invoked when user hits the cancel button of the connectSheet
+stops modal session with code 0
+reused when user hits the close button of the variablseSheet or of the createTableSyntaxSheet
+*/
+{
+ [NSApp stopModalWithCode:0];
+}
+
+- (IBAction)chooseFavorite:(id)sender
+/*
+ sets fields for the choosen favorite
+ */
+{
+ /*
+ BOOL useSSH = NO;
+
+ if ( [favoritesButton indexOfSelectedItem] == 0 ) {
+ [hostField setStringValue:@""];
+ [socketField setStringValue:@""];
+ [userField setStringValue:@""];
+ [portField setStringValue:@""];
+ [databaseField setStringValue:@""];
+ [passwordField setStringValue:@""];
+ [sshCheckbox setState:NSOffState];
+ [sshUserField setEnabled:NO];
+ [sshPasswordField setEnabled:NO];
+ [sshHostField setEnabled:NO];
+ [sshPortField setEnabled:NO];
+ [sshHostField setStringValue:@""];
+ [sshUserField setStringValue:@""];
+ [sshPasswordField setStringValue:@""];
+ [sshPortField setStringValue:@"8888"];
+ [hostField selectText:self];
+ [selectedFavorite release];
+ selectedFavorite = [[favoritesButton titleOfSelectedItem] retain];
+ } else if ( [favoritesButton indexOfSelectedItem] == 1 ) {
+ if ( ![[socketField stringValue] isEqualToString:@""] ) {
+ [hostField setStringValue:@"localhost"];
+ }
+ if ( [sshCheckbox state] == NSOnState ) {
+ useSSH = YES;
+ } else {
+ useSSH = NO;
+ }
+ [self addToFavoritesHost:[hostField stringValue]
+ socket:[socketField stringValue]
+ user:[userField stringValue]
+ password:[passwordField stringValue]
+ port:[portField stringValue]
+ database:[databaseField stringValue]
+ useSSH:useSSH
+ sshHost:[sshHostField stringValue]
+ sshUser:[sshUserField stringValue]
+ sshPassword:[sshPasswordField stringValue]
+ sshPort:[sshPortField stringValue]];
+ // } else if ( [favoritesButton indexOfSelectedItem] == 2 ) {
+ // [favoritesButton selectItemWithTitle:selectedFavorite];
+ } else {*/
+ NSDictionary *favorite = [[prefs objectForKey:@"favorites"] objectAtIndex:[favoritesController selectionIndex]];
+ NSString *name = [favorite objectForKey:@"name"];
+ NSString *host = [favorite objectForKey:@"host"];
+ NSString *socket = [favorite objectForKey:@"socket"];
+ NSString *user = [favorite objectForKey:@"user"];
+ NSString *port = [favorite objectForKey:@"port"];
+ NSString *database = [favorite objectForKey:@"database"];
+ int useSSH = [[favorite objectForKey:@"useSSH"] intValue];
+ NSString *sshHost = [favorite objectForKey:@"sshHost"];
+ NSString *sshUser = [favorite objectForKey:@"sshUser"];
+ NSString *sshPort = [favorite objectForKey:@"sshPort"];
+
+ [hostField setStringValue:host];
+ [socketField setStringValue:socket];
+ [userField setStringValue:user];
+ [portField setStringValue:port];
+ [databaseField setStringValue:database];
+ [passwordField setStringValue:[keyChainInstance
+ getPasswordForName:[NSString stringWithFormat:@"CocoaMySQL : %@", name]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]]];
+ if ( useSSH ) {
+ [sshCheckbox setState:NSOnState];
+ [sshHostField setStringValue:sshHost];
+ [sshUserField setStringValue:sshUser];
+ [sshPortField setStringValue:sshPort];
+ [sshPasswordField setStringValue:[keyChainInstance
+ getPasswordForName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", name]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]]];
+ [sshUserField setEnabled:YES];
+ [sshPasswordField setEnabled:YES];
+ [sshHostField setEnabled:YES];
+ [sshPortField setEnabled:YES];
+ } else {
+ [sshCheckbox setState:NSOffState];
+ [sshHostField setStringValue:@""];
+ [sshUserField setStringValue:@""];
+ [sshPortField setStringValue:@""];
+ [sshPasswordField setStringValue:@""];
+ [sshUserField setEnabled:NO];
+ [sshPasswordField setEnabled:NO];
+ [sshHostField setEnabled:NO];
+ [sshPortField setEnabled:NO];
+ }
+
+ [selectedFavorite release];
+ selectedFavorite = [[favoritesButton titleOfSelectedItem] retain];
+ /*}*/
+}
+
+- (NSArray *)favorites
+{
+ return favorites;
+}
+
+- (void)setFavorites
+/*
+ set up the favorites popUpButton and notifiy bindings that it's changed
+ */
+{
+ [self willChangeValueForKey:@"favorites"];
+ [self didChangeValueForKey:@"favorites"];
+
+ NSEnumerator *enumerator = [favorites objectEnumerator];
+ id favorite;
+
+ [favoritesButton removeAllItems];
+ [favoritesButton addItemWithTitle:NSLocalizedString(@"Custom", @"menu item for custom connection")];
+ [favoritesButton addItemWithTitle:NSLocalizedString(@"Save to favorites...", @"menu item for saving connection to favorites")];
+ // [favoritesButton addItemWithTitle:@""];
+ [[favoritesButton menu] addItem:[NSMenuItem separatorItem]];
+ while ( (favorite = [enumerator nextObject]) ) {
+ [favoritesButton addItemWithTitle:[favorite objectForKey:@"name"]];
+ }
+}
+
+- (void)addToFavoritesHost:(NSString *)host socket:(NSString *)socket
+ user:(NSString *)user password:(NSString *)password
+ port:(NSString *)port database:(NSString *)database
+ useSSH:(BOOL)useSSH sshHost:(NSString *)sshHost
+ sshUser:(NSString *)sshUser sshPassword:(NSString *)sshPassword
+ sshPort:(NSString *)sshPort
+/*
+add actual connection to favorites
+*/
+{
+ NSEnumerator *enumerator = [favorites objectEnumerator];
+ id favorite;
+ NSString *favoriteName = [NSString stringWithFormat:@"%@@%@/%@", user, host, database];
+ NSNumber *ssh;
+
+//test if host and socket are not nil
+ if ( [host isEqualToString:@""] && [socket isEqualToString:@""] )
+ {
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"Please enter at least a host or socket.", @"message of panel when host/socket are missing"), NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ [favoritesButton selectItemWithTitle:selectedFavorite];
+ return;
+ }
+//test if all fields are specified for ssh tunnel
+ if ( useSSH ) {
+ if ( [sshHost isEqualToString:@""] ) {
+ sshHost = host;
+ }
+ if ( [sshUser isEqualToString:@""] ) {
+ sshUser = user;
+ }
+ if ( [sshPassword isEqualToString:@""] ) {
+ sshPassword = password;
+ }
+ if ( [sshPort isEqualToString:@""] ) {
+ sshPort = port;
+ }
+ ssh = [NSNumber numberWithInt:1];
+ } else {
+ sshHost = @"";
+ sshUser = @"";
+ sshPassword = @"";
+ sshPort = @"";
+ ssh = [NSNumber numberWithInt:0];
+ }
+
+//test if favorite name isn't used by another favorite and if no favorite with the same host, user and db exists
+ while ( (favorite = [enumerator nextObject]) ) {
+ if ( [[favorite objectForKey:@"name"] isEqualToString:favoriteName] )
+ {
+ NSRunAlertPanel(NSLocalizedString(@"Error", @"error"), [NSString stringWithFormat:NSLocalizedString(@"Favorite %@ has already been saved!\nOpen Preferences to change the names of the favorites.", @"message of panel when favorite name has already been used"), favoriteName], NSLocalizedString(@"OK", @"OK button"), nil, nil);
+ [favoritesButton selectItemWithTitle:selectedFavorite];
+ return;
+ }
+/*
+ if ( [[favorite objectForKey:@"host"] isEqualToString:host] &&
+ [[favorite objectForKey:@"user"] isEqualToString:user] &&
+ [[favorite objectForKey:@"database"] isEqualToString:database] ) {
+ NSRunAlertPanel(@"Error", @"There is already a favorite with the same host, user and database!", @"OK", nil, nil);
+ [favoritesButton selectItemWithTitle:selectedFavorite];
+ return;
+ }
+*/
+ }
+
+//write favorites and password
+ NSDictionary *newFavorite = [NSDictionary
+ dictionaryWithObjects:[NSArray arrayWithObjects:favoriteName, host, socket, user, port, database, ssh, sshHost, sshUser, sshPort, nil]
+ forKeys:[NSArray arrayWithObjects:@"name", @"host", @"socket", @"user", @"port", @"database", @"useSSH", @"sshHost", @"sshUser", @"sshPort", nil]];
+ favorites = [[favorites arrayByAddingObject:newFavorite] retain];
+ if ( ![password isEqualToString:@""] )
+ [keyChainInstance addPassword:password forName:[NSString stringWithFormat:@"CocoaMySQL : %@", favoriteName]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]];
+ if ( ![sshPassword isEqualToString:@""] )
+ [keyChainInstance addPassword:sshPassword forName:[NSString stringWithFormat:@"CocoaMySQL SSHTunnel : %@", favoriteName]
+ account:[NSString stringWithFormat:@"%@@%@/%@", user, host, database]];
+ [prefs setObject:favorites forKey:@"favorites"];
+
+//reload favorites and select new favorite
+ [self setFavorites];
+ [favoritesButton selectItemWithTitle:favoriteName];
+ selectedFavorite = [favoriteName retain];
+}
+
+
+//alert sheets method
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+/*
+invoked when alertSheet get closed
+if contextInfo == connect -> reopens the connectSheet
+if contextInfo == removedatabase -> tries to remove the selected database
+*/
+{
+ [sheet orderOut:self];
+
+ if ( [contextInfo isEqualToString:@"connect"] ) {
+ [self connectToDB:nil];
+ } else if ( [contextInfo isEqualToString:@"removedatabase"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"DROP DATABASE `%@`", [self database]]];
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ //db deleted with success
+ selectedDatabase = nil;
+ [self setDatabases:self];
+ [tablesListInstance setConnection:mySQLConnection];
+ [tableDumpInstance setConnection:mySQLConnection];
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/",
+ mySQLVersion, [userField stringValue], [hostField stringValue]]];
+ } else {
+ //error while deleting db
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove database.\nMySQL said: %@", @"message of panel when removing db failed"), [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+ }
+}
+
+
+//database methods
+- (IBAction)setDatabases:(id)sender;
+/*
+sets up the chooseDatabaseButton (adds all databases)
+*/
+{
+ CMMCPResult *queryResult;
+ int i;
+
+ [chooseDatabaseButton removeAllItems];
+ [chooseDatabaseButton addItemWithTitle:NSLocalizedString(@"Choose database...", @"menu item for choose db")];
+ queryResult = [mySQLConnection listDBs];
+ for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) {
+ [queryResult dataSeek:i];
+ [chooseDatabaseButton addItemWithTitle:[[queryResult fetchRowAsArray] objectAtIndex:0]];
+ }
+ if ( ![self database] ) {
+ [chooseDatabaseButton selectItemWithTitle:NSLocalizedString(@"Choose database...", @"menu item for choose db")];
+ } else {
+ [chooseDatabaseButton selectItemWithTitle:[self database]];
+ }
+}
+
+- (IBAction)chooseDatabase:(id)sender
+/*
+selects the database choosen by the user
+errorsheet if connection failed
+*/
+{
+ if ( ![tablesListInstance selectionShouldChangeInTableView:nil] ) {
+ [chooseDatabaseButton selectItemWithTitle:[self database]];
+ return;
+ }
+
+ if ( [chooseDatabaseButton indexOfSelectedItem] == 0 ) {
+ if ( ![self database] ) {
+ [chooseDatabaseButton selectItemWithTitle:NSLocalizedString(@"Choose database...", @"menu item for choose db")];
+ } else {
+ [chooseDatabaseButton selectItemWithTitle:[self database]];
+ }
+ return;
+ }
+
+ if ( ![mySQLConnection selectDB:[chooseDatabaseButton titleOfSelectedItem]] ) {
+//connection failed
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that you have the necessary privileges.", @"message of panel when connection to db failed after selecting from popupbutton"),
+ [chooseDatabaseButton titleOfSelectedItem]]);
+ [self setDatabases:self];
+ } else {
+//changed database with success
+//setConnection of TablesList and TablesDump to reload tables in db
+ [selectedDatabase release];
+ selectedDatabase = nil;
+ selectedDatabase = [[chooseDatabaseButton titleOfSelectedItem] retain];
+ [tablesListInstance setConnection:mySQLConnection];
+ [tableDumpInstance setConnection:mySQLConnection];
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", mySQLVersion, [userField stringValue],
+ [hostField stringValue], [self database]]];
+ }
+}
+
+- (IBAction)addDatabase:(id)sender
+/*
+opens the add-db sheet and creates the new db
+*/
+{
+ int code = 0;
+
+ if ( ![tablesListInstance selectionShouldChangeInTableView:nil] )
+ return;
+
+ [databaseNameField setStringValue:@""];
+ [NSApp beginSheet:databaseSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:databaseSheet];
+
+ [NSApp endSheet:databaseSheet];
+ [databaseSheet orderOut:nil];
+
+ if ( code ) {
+ if ( [[databaseNameField stringValue] isEqualToString:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Database must have a name.", @"message of panel when no db name is given"));
+ } else {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE DATABASE `%@`", [databaseNameField stringValue]]];
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ //db created with success
+ if ( ![mySQLConnection selectDB:[databaseNameField stringValue]] ) {
+ //error while selecting new db (is this possible?!)
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Unable to connect to database %@.\nBe sure that you have the necessary privileges.", @"message of panel when connection to db failed after selecting from popupbutton"),
+ [databaseNameField stringValue]]);
+ [self setDatabases:self];
+ } else {
+ //select new db
+ [selectedDatabase release];
+ selectedDatabase = nil;
+ selectedDatabase = [[databaseNameField stringValue] retain];
+ [self setDatabases:self];
+ [tablesListInstance setConnection:mySQLConnection];
+ [tableDumpInstance setConnection:mySQLConnection];
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@",
+ mySQLVersion, [userField stringValue], [hostField stringValue],
+ selectedDatabase]];
+ }
+ } else {
+ //error while creating db
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't create database.\nMySQL said: %@", @"message of panel when creation of db failed"), [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+ }
+}
+
+- (IBAction)closeDatabaseSheet:(id)sender
+/*
+closes the add-db sheet and stops modal session
+*/
+{
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+- (IBAction)removeDatabase:(id)sender
+/*
+opens sheet to ask user if he really wants to delete the db
+*/
+{
+ if ( [chooseDatabaseButton indexOfSelectedItem] == 0 )
+ return;
+ if ( ![tablesListInstance selectionShouldChangeInTableView:nil] )
+ return;
+
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, nil,
+ @selector(sheetDidEnd:returnCode:contextInfo:), @"removedatabase",
+ [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the database %@?", @"message of panel asking for confirmation for deleting db"), [self database]] );
+}
+
+
+//console methods
+- (void)toggleConsole
+/*
+shows or hides the console
+*/
+{
+ NSDrawerState state = [consoleDrawer state];
+ if (NSDrawerOpeningState == state || NSDrawerOpenState == state) {
+ [consoleDrawer close];
+ } else {
+ [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];
+ [consoleDrawer openOnEdge:NSMinYEdge];
+ }
+}
+
+- (void)clearConsole
+/*
+clears the console
+*/
+{
+ [consoleTextView setString:@""];
+}
+
+- (BOOL)consoleIsOpened
+/*
+returns YES if the console is visible
+*/
+{
+ if ( [consoleDrawer state] == NSDrawerOpeningState || [consoleDrawer state] == NSDrawerOpenState )
+ {
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+- (void)showMessageInConsole:(NSString *)message
+/*
+shows a message in the console
+*/
+{
+ int begin, end;
+
+ [consoleTextView setSelectedRange:NSMakeRange([[consoleTextView string] length],0)];
+ begin = [[consoleTextView string] length];
+ [consoleTextView replaceCharactersInRange:NSMakeRange(begin,0)
+ withString:message];
+ end = [[consoleTextView string] length];
+ [consoleTextView setTextColor:[NSColor blackColor] range:NSMakeRange(begin,end-begin)];
+ if ( [self consoleIsOpened] ) {
+/*
+ NSClipView *clipView = [consoleTextView superview];
+ if (![clipView isKindOfClass:[NSClipView class]]) return;
+ [clipView scrollToPoint:[clipView constrainScrollPoint:NSMakePoint(0,[consoleTextView frame].size.height)]];
+ [[clipView superview] reflectScrolledClipView:clipView];
+*/
+ [consoleTextView displayIfNeeded];
+ [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];
+ }
+}
+
+- (void)showErrorInConsole:(NSString *)error
+/*
+shows an error in the console (red)
+*/
+{
+ int begin, end;
+
+ [consoleTextView setSelectedRange:NSMakeRange([[consoleTextView string] length],0)];
+ begin = [[consoleTextView string] length];
+ [consoleTextView replaceCharactersInRange:NSMakeRange(begin,0)
+ withString:error];
+ end = [[consoleTextView string] length];
+ [consoleTextView setTextColor:[NSColor redColor] range:NSMakeRange(begin,end-begin)];
+ if ( [self consoleIsOpened] ) {
+/*
+ NSClipView *clipView = [consoleTextView superview];
+ if (![clipView isKindOfClass:[NSClipView class]]) return;
+ [clipView scrollToPoint:[clipView constrainScrollPoint:NSMakePoint(0,[consoleTextView frame].size.height)]];
+ [[clipView superview] reflectScrolledClipView:clipView];
+*/
+ [consoleTextView displayIfNeeded];
+ [consoleTextView scrollRangeToVisible:[consoleTextView selectedRange]];
+ }
+}
+
+
+//encoding methods
+- (void)setEncoding:(NSString *)encoding
+/*
+set the encoding for the database
+*/
+{
+// set encoding of connection and client
+ [mySQLConnection queryString:[NSString stringWithFormat:@"SET NAMES '%@'", encoding]];
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [mySQLConnection setEncoding:[CMMCPConnection encodingForMySQLEncoding:[encoding cString]]];
+ } else {
+ [self detectEncoding];
+ }
+//NSLog(@"set encoding to %@", encoding);
+
+ [tableSourceInstance reloadTable:self];
+ [tableContentInstance reloadTable:self];
+ [tableStatusInstance reloadTable:self];
+
+// int encodingCode;
+
+/* if( [encoding isEqualToString:@"ISO Latin 1"] ) {
+ encodingCode = NSISOLatin1StringEncoding;
+ } else if( [encoding isEqualToString:@"ISO Latin 2"] ) {
+ encodingCode = NSISOLatin2StringEncoding;
+ } else if( [encoding isEqualToString:@"Win Latin 1"] ) {
+ encodingCode = NSWindowsCP1252StringEncoding;
+ } else if( [encoding isEqualToString:@"Win Latin 2"] ) {
+ encodingCode = NSWindowsCP1250StringEncoding;
+ } else if( [encoding isEqualToString:@"Cyrillic"] ) {
+ encodingCode = NSWindowsCP1251StringEncoding;
+ } else if( [encoding isEqualToString:@"Greek"] ) {
+ encodingCode = NSWindowsCP1253StringEncoding;
+ } else if( [encoding isEqualToString:@"Turkish"] ) {
+ encodingCode = NSWindowsCP1254StringEncoding;
+ } else if ( [encoding isEqualToString:@"Shift-JIS"] ) {
+ encodingCode = NSShiftJISStringEncoding;
+ } else if ( [encoding isEqualToString:@"EUC-JP"] ) {
+ encodingCode = NSJapaneseEUCStringEncoding;
+ } else if ( [encoding isEqualToString:@"ISO 2022-JP"] ) {
+ encodingCode = NSISO2022JPStringEncoding;
+ } else if ( [encoding isEqualToString:@"UTF-8"] ) {
+ encodingCode = NSUTF8StringEncoding;
+*/
+/*
+ if( [encoding isEqualToString:@"ISO Latin 1"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin1);
+ } else if( [encoding isEqualToString:@"ISO Latin 2"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin2);
+ } else if ( [encoding isEqualToString:@"ISO Cyrillic"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinCyrillic);
+ } else if ( [encoding isEqualToString:@"ISO Greek"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinGreek);
+ } else if ( [encoding isEqualToString:@"ISO Turkish"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatin5);
+ } else if ( [encoding isEqualToString:@"ISO Arabic"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinArabic);
+ } else if ( [encoding isEqualToString:@"ISO Hebrew"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinHebrew);
+ } else if ( [encoding isEqualToString:@"ISO Thai"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISOLatinThai);
+
+ } else if( [encoding isEqualToString:@"Win Latin 1"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsLatin1);
+ } else if( [encoding isEqualToString:@"Win Latin 2"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsLatin2);
+ } else if( [encoding isEqualToString:@"Win Cyrillic"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsCyrillic);
+ } else if( [encoding isEqualToString:@"Win Greek"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsGreek);
+ } else if( [encoding isEqualToString:@"Win Turkish"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsLatin5);
+ } else if( [encoding isEqualToString:@"Win Arabic"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsArabic);
+ } else if( [encoding isEqualToString:@"Win Baltic Rim"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsBalticRim);
+ } else if( [encoding isEqualToString:@"Win Korean"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsKoreanJohab);
+ } else if( [encoding isEqualToString:@"Win Vietnamese"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingWindowsVietnamese);
+
+ } else if ( [encoding isEqualToString:@"Shift-JIS"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingShiftJIS);
+ } else if ( [encoding isEqualToString:@"EUC-JP"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingEUC_JP);
+ } else if ( [encoding isEqualToString:@"ISO 2022-JP"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISO_2022_JP);
+
+ } else if ( [encoding isEqualToString:@"EUC-CN"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingEUC_CN);
+ } else if ( [encoding isEqualToString:@"EUC-TW"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingEUC_TW);
+ } else if ( [encoding isEqualToString:@"EUC-KR"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingEUC_KR);
+
+ } else if ( [encoding isEqualToString:@"ISO 2022-KR"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISO_2022_KR);
+ } else if ( [encoding isEqualToString:@"ISO 2022-CN"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingISO_2022_CN);
+
+ } else if ( [encoding isEqualToString:@"KOI8-R"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingKOI8_R);
+ } else if ( [encoding isEqualToString:@"HZ"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingHZ_GB_2312);
+
+ } else if ( [encoding isEqualToString:@"UTF-8"] ) {
+ encodingCode = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingUTF8);
+
+ } else {
+ encodingCode = NSISOLatin1StringEncoding; // default is ISO Latin 1
+ }
+
+ if(encodingCode == kCFStringEncodingInvalidId)
+ encodingCode = NSISOLatin1StringEncoding;
+*/
+}
+
+- (void)detectEncoding
+/*
+autodetects the connection encoding and sets the encoding dropdown
+*/
+{
+ id mysqlEncoding;
+
+ // mysql > 4.0
+ mysqlEncoding = [[[mySQLConnection queryString:@"SHOW VARIABLES LIKE 'character_set_connection'"] fetchRowAsDictionary] objectForKey:@"Value"];
+ if ( [mysqlEncoding isKindOfClass:[NSData class]] ) {
+ // MySQL 4.1.14 returns the mysql variables as nsdata
+ mysqlEncoding = [mySQLConnection stringWithText:mysqlEncoding];
+ }
+ if ( !mysqlEncoding ) {
+ // mysql 4.0 or older -> only default character set possible, cannot choose others using "set names xy"
+ mysqlEncoding = [[[mySQLConnection queryString:@"SHOW VARIABLES LIKE 'character_set'"] fetchRowAsDictionary] objectForKey:@"Value"];
+ [chooseEncodingButton setEnabled:NO];
+ }
+ if ( !mysqlEncoding ) {
+ // older version? -> set encoding to mysql default encoding latin1, chooseEncodingButton is already disabled
+ NSLog(@"error: no character encoding found, mysql version is %@", [self mySQLVersion]);
+ mysqlEncoding = @"latin1";
+ }
+ [mySQLConnection setEncoding:[CMMCPConnection encodingForMySQLEncoding:[mysqlEncoding cString]]];
+
+//NSLog(@"autodetected %@", mysqlEncoding);
+
+ if ( [mysqlEncoding isEqualToString:@"ucs2"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"UCS-2 Unicode (ucs2)"];
+ } else if ( [mysqlEncoding isEqualToString:@"utf8"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"UTF-8 Unicode (utf8)"];
+ } else if ( [mysqlEncoding isEqualToString:@"ascii"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"US ASCII (ascii)"];
+ } else if ( [mysqlEncoding isEqualToString:@"latin1"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"ISO Latin 1 (latin1)"];
+ } else if ( [mysqlEncoding isEqualToString:@"macroman"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Mac Roman (macroman)"];
+ } else if ( [mysqlEncoding isEqualToString:@"cp1250"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Windows Latin 2 (cp1250)"];
+ } else if ( [mysqlEncoding isEqualToString:@"latin2"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"ISO Latin 2 (latin2)"];
+ } else if ( [mysqlEncoding isEqualToString:@"cp1256"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Windows Arabic (cp1256)"];
+ } else if ( [mysqlEncoding isEqualToString:@"greek"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"ISO Greek (greek)"];
+ } else if ( [mysqlEncoding isEqualToString:@"hebrew"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"ISO Hebrew (hebrew)"];
+ } else if ( [mysqlEncoding isEqualToString:@"latin5"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"ISO Turkish (latin5)"];
+ } else if ( [mysqlEncoding isEqualToString:@"cp1257"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Windows Baltic (cp1257)"];
+ } else if ( [mysqlEncoding isEqualToString:@"cp1251"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Windows Cyrillic (cp1251)"];
+ } else if ( [mysqlEncoding isEqualToString:@"big5"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Big5 Traditional Chinese (big5)"];
+ } else if ( [mysqlEncoding isEqualToString:@"sjis"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"Shift-JIS Japanese (sjis)"];
+ } else if ( [mysqlEncoding isEqualToString:@"ujis"] ) {
+ [chooseEncodingButton selectItemWithTitle:@"EUC-JP Japanese (ujis)"];
+ } else {
+ NSLog(@"unsupported encoding %@! falling back to utf8.", mysqlEncoding);
+ [chooseEncodingButton selectItemWithTitle:@"UTF-8 Unicode (utf8)"];
+ [self setEncoding:[self getSelectedEncoding]];
+ }
+}
+
+- (NSString *)getSelectedEncoding
+/*
+gets the selected mysql encoding
+*/
+{
+ NSString *mysqlEncoding;
+ NSString *encoding = [chooseEncodingButton titleOfSelectedItem];
+
+// unicode
+ if ( [encoding isEqualToString:@"UCS-2 Unicode (ucs2)"] ) {
+ mysqlEncoding = @"ucs2";
+ } else if ( [encoding isEqualToString:@"UTF-8 Unicode (utf8)"] ) {
+ mysqlEncoding = @"utf8";
+// west european
+ } else if( [encoding isEqualToString:@"US ASCII (ascii)"] ) {
+ mysqlEncoding = @"ascii";
+ } else if ( [encoding isEqualToString:@"ISO Latin 1 (latin1)"] ) {
+ mysqlEncoding = @"latin1";
+ } else if ( [encoding isEqualToString:@"Mac Roman (macroman)"] ) {
+ mysqlEncoding = @"macroman";
+// central european
+ } else if ( [encoding isEqualToString:@"Windows Latin 2 (cp1250)"] ) {
+ mysqlEncoding = @"cp1250";
+ } else if ( [encoding isEqualToString:@"ISO Latin 2 (latin2)"] ) {
+ mysqlEncoding = @"latin2";
+// south european and middle east
+ } else if ( [encoding isEqualToString:@"Windows Arabic (cp1256)"] ) {
+ mysqlEncoding = @"cp1256";
+ } else if ( [encoding isEqualToString:@"ISO Greek (greek)"] ) {
+ mysqlEncoding = @"greek";
+ } else if ( [encoding isEqualToString:@"ISO Hebrew (hebrew)"] ) {
+ mysqlEncoding = @"hebrew";
+ } else if ( [encoding isEqualToString:@"ISO Turkish (latin5)"] ) {
+ mysqlEncoding = @"latin5";
+// baltic
+ } else if ( [encoding isEqualToString:@"Windows Baltic (cp1257)"] ) {
+ mysqlEncoding = @"cp1257";
+// cyrillic
+ } else if ( [encoding isEqualToString:@"Windows Cyrillic (cp1251)"] ) {
+ mysqlEncoding = @"cp1251";
+// asian
+ } else if ( [encoding isEqualToString:@"Big5 Traditional Chinese (big5)"] ) {
+ mysqlEncoding = @"big5";
+ } else if ( [encoding isEqualToString:@"Shift-JIS Japanese (sjis)"] ) {
+ mysqlEncoding = @"sjis";
+ } else if ( [encoding isEqualToString:@"EUC-JP Japanese (ujis)"] ) {
+ mysqlEncoding = @"ujis";
+ } else {
+// unknown encoding
+ NSLog(@"error: unknown encoding %@", encoding);
+ mysqlEncoding = @"utf8";
+ }
+
+ return [mysqlEncoding autorelease];
+}
+
+- (IBAction)chooseEncoding:(id)sender
+/*
+choose encoding
+*/
+{
+ // Set encoding
+ [self setEncoding:[self getSelectedEncoding]];
+}
+
+- (BOOL)supportsEncoding
+/*
+returny YES if MySQL server supports choosing connection and table encodings (MySQL 4.1 and newer)
+*/
+{
+ return [chooseEncodingButton isEnabled];
+}
+
+
+//other methods
+- (NSString *)host
+/*
+returns the host
+*/
+{
+ return [hostField stringValue];
+}
+
+- (void)doPerformQueryService:(NSString *)query
+/*
+passes query to tablesListInstance
+*/
+{
+ [tableWindow makeKeyAndOrderFront:self];
+ [tablesListInstance doPerformQueryService:query];
+}
+
+- (void)flushPrivileges
+/*
+flushes the mysql privileges
+*/
+{
+ [mySQLConnection queryString:@"FLUSH PRIVILEGES"];
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ //flushed privileges without errors
+ NSBeginAlertSheet(NSLocalizedString(@"Flushed Privileges", @"title of panel when successfully flushed privs"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"Succesfully flushed privileges.", @"message of panel when successfully flushed privs"));
+ } else {
+ //error while flushing privileges
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't flush privileges.\nMySQL said: %@", @"message of panel when flushing privs failed"),
+ [mySQLConnection getLastErrorMessage]]);
+ }
+}
+
+- (void)openTableOperationsSheet
+/*
+opens the sheet for table operations (check/analyze/optimize/repair/flush) and performs desired operation
+*/
+{
+ int code, operation;
+ CMMCPResult *theResult;
+ NSDictionary *theRow;
+ NSString *query;
+ NSString *operationText;
+ NSString *messageType;
+ NSString *messageText;
+
+ [NSApp beginSheet:tableOperationsSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:tableOperationsSheet];
+
+ [NSApp endSheet:tableOperationsSheet];
+ [tableOperationsSheet orderOut:nil];
+NSLog(@"%d",code);
+ if ( !code )
+ return;
+
+ // get operation
+ operation = [[chooseTableOperationButton selectedItem] tag];
+ switch ( operation ) {
+ case 0:
+ // check table
+ query = [NSString stringWithFormat:@"CHECK TABLE `%@`", [self table]];
+ break;
+ case 1:
+ // analyze table
+ query = [NSString stringWithFormat:@"ANALYZE TABLE `%@`", [self table]];
+ break;
+ case 2:
+ // optimize table
+ query = [NSString stringWithFormat:@"OPTIMIZE TABLE `%@`", [self table]];
+ break;
+ case 3:
+ // repair table
+ query = [NSString stringWithFormat:@"REPAIR TABLE `%@`", [self table]];
+ break;
+ case 4:
+ // flush table
+ query = [NSString stringWithFormat:@"FLUSH TABLE `%@`", [self table]];
+ break;
+ }
+
+ // perform operation
+ theResult = [mySQLConnection queryString:query];
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ // no errors
+ if ( operation == 4 ) {
+ // flushed -> no return values
+ operationText = [NSString stringWithString:@"flush"];
+ messageType = [NSString stringWithString:@"-"];
+ messageText = [NSString stringWithString:@"-"];
+ } else {
+ // other operations -> get return values
+ theRow = [[theResult fetch2DResultAsType:MCPTypeDictionary] lastObject];
+ operationText = [NSString stringWithString:[theRow objectForKey:@"Op"]];
+ messageType = [NSString stringWithString:[theRow objectForKey:@"Msg_type"]];
+ messageText = [NSString stringWithString:[theRow objectForKey:@"Msg_text"]];
+ }
+ NSBeginAlertSheet(NSLocalizedString(@"Successfully performed table operation", @"title of panel when successfully performed table operation"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Operation: %@\nMsg_type: %@\nMsg_text: %@", @"message of panel when successfully performed table operation"),
+ operationText, messageType, messageText]);
+ } else {
+ // error
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't perform table operation.\nMySQL said: %@", @"message of panel when table operation failed"),
+ [mySQLConnection getLastErrorMessage]]);
+ }
+}
+
+- (IBAction)doTableOperation:(id)sender
+/*
+closes the sheet and ends modal with 0 if cancel and 1 if ok
+*/
+{
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+- (void)showVariables
+/*
+shows the mysql variables
+*/
+{
+ CMMCPResult *theResult;
+ NSMutableArray *tempResult = [NSMutableArray array];
+ int i;
+
+ if ( variables ) {
+ [variables release];
+ variables = nil;
+ }
+ //get variables
+ theResult = [mySQLConnection queryString:@"SHOW VARIABLES"];
+ for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
+ [theResult dataSeek:i];
+ [tempResult addObject:[theResult fetchRowAsDictionary]];
+ }
+ variables = [[NSArray arrayWithArray:tempResult] retain];
+ [variablesTableView reloadData];
+ //show variables sheet
+ [NSApp beginSheet:variablesSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:variablesSheet];
+
+ [NSApp endSheet:variablesSheet];
+ [variablesSheet orderOut:nil];
+}
+
+- (void)showCreateTable
+/*
+shows the mysql command used to create the selected table
+*/
+{
+ id createTableSyntax;
+
+ CMMCPResult *result = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE `%@`",
+ [self table]]];
+ createTableSyntax = [[result fetchRowAsArray] objectAtIndex:1];
+ if ( [createTableSyntax isKindOfClass:[NSData class]] ) {
+ createTableSyntax = [[NSString alloc] initWithData:createTableSyntax encoding:[mySQLConnection encoding]];
+ }
+
+ [createTableSyntaxView setString:createTableSyntax];
+ [createTableSyntaxView selectAll:self];
+
+ //show createTableSyntaxSheet
+ [NSApp beginSheet:createTableSyntaxSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:createTableSyntaxSheet];
+
+ [NSApp endSheet:createTableSyntaxSheet];
+ [createTableSyntaxSheet orderOut:nil];
+}
+
+- (void)closeConnection
+{
+ [mySQLConnection disconnect];
+}
+
+
+//getter methods
+- (NSString *)database
+/*
+returns the currently selected database
+*/
+{
+ return selectedDatabase;
+}
+
+- (NSString *)table
+/*
+returns the currently selected table (passing the request to TablesList)
+*/
+{
+ return [tablesListInstance table];
+}
+
+- (NSString *)mySQLVersion
+/*
+returns the mysql version
+*/
+{
+ return mySQLVersion;
+}
+
+- (NSString *)user
+/*
+returns the mysql version
+*/
+{
+ return [userField stringValue];
+}
+
+
+//notification center methods
+- (void)willPerformQuery:(NSNotification *)notification
+/*
+invoked before a query is performed
+*/
+{
+ [queryProgressBar startAnimation:self];
+}
+
+- (void)hasPerformedQuery:(NSNotification *)notification
+/*
+invoked after a query has been performed
+*/
+{
+ [queryProgressBar stopAnimation:self];
+}
+
+- (void)applicationWillTerminate:(NSNotification *)notification
+/*
+invoked when the application will terminate
+*/
+{
+ [tablesListInstance selectionShouldChangeInTableView:nil];
+}
+
+- (void)tunnelStatusChanged:(NSNotification *)notification
+/*
+the status of the tunnel has changed
+*/
+{
+ NSLog([tunnel status]);
+}
+
+//menu methods
+- (IBAction)import:(id)sender
+/*
+passes the request to the tableDump object
+*/
+{
+ [tableDumpInstance importFile:[sender tag]];
+}
+
+- (IBAction)export:(id)sender
+/*
+passes the request to the tableDump object
+*/
+{
+ [tableDumpInstance exportFile:[sender tag]];
+}
+
+- (BOOL)validateMenuItem:(NSMenuItem *)anItem
+/*
+do menu validation
+*/
+{
+ switch ( [anItem tag] ) {
+ case 1:
+ //import dump
+ if ( ![self database] ) {
+ return NO;
+ }
+ break;
+ case 2:
+ //import CSV
+ if ( ![self database] || ![self table] ) {
+ return NO;
+ }
+ break;
+ case 5:
+ //export dump
+ if ( ![self database] ) {
+ return NO;
+ }
+ break;
+ case 6:
+ //export table content as CSV
+ if ( ![self database] || ![self table] ) {
+ return NO;
+ }
+ break;
+ case 7:
+ //export table content as XML
+ if ( ![self database] || ![self table] ) {
+ return NO;
+ }
+ break;
+ case 8:
+ //export custom result as CSV
+ return YES;
+ break;
+ case 9:
+ //export custom result as XML
+ return YES;
+ break;
+ case 10:
+ //export multiple tables as CSV
+ if ( ![self database] ) {
+ return NO;
+ }
+ break;
+ case 11:
+ //export multiple tables as XML
+ if ( ![self database] ) {
+ return NO;
+ }
+ break;
+ }
+ return YES;
+}
+
+- (IBAction)viewStructure:(id)sender
+{
+ [tableTabView selectTabViewItemAtIndex:0];
+}
+
+- (IBAction)viewContent:(id)sender
+{
+ [tableTabView selectTabViewItemAtIndex:1];
+}
+
+- (IBAction)viewQuery:(id)sender
+{
+ [tableTabView selectTabViewItemAtIndex:2];
+}
+
+- (IBAction)viewStatus:(id)sender
+{
+ [tableTabView selectTabViewItemAtIndex:3];
+}
+
+
+//toolbar methods
+- (void)setupToolbar
+/*
+set up the standard toolbar
+*/
+{
+ //create a new toolbar instance, and attach it to our document window
+ NSToolbar *toolbar = [[[NSToolbar alloc] initWithIdentifier:@"TableWindowToolbar"] autorelease];
+
+ //set up toolbar properties
+ [toolbar setAllowsUserCustomization: YES];
+ [toolbar setAutosavesConfiguration: YES];
+ [toolbar setDisplayMode:NSToolbarDisplayModeIconAndLabel];
+
+ //set ourself as the delegate
+ [toolbar setDelegate:self];
+
+ //attach the toolbar to the document window
+ [tableWindow setToolbar:toolbar];
+}
+
+- (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
+/*
+toolbar delegate method
+*/
+{
+ NSToolbarItem *toolbarItem = [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease];
+
+ if ([itemIdentifier isEqualToString:@"ToggleConsoleIdentifier"]) {
+ //set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setPaletteLabel:NSLocalizedString(@"Show/Hide Console", @"toolbar item for show/hide console")];
+ //set up tooltip and image
+ [toolbarItem setToolTip:NSLocalizedString(@"Show or hide the console which shows all MySQL commands performed by CocoaMySQL", @"tooltip for toolbar item for show/hide console")];
+ if ( [self consoleIsOpened] ) {
+ [toolbarItem setLabel:NSLocalizedString(@"Hide Console", @"toolbar item for hide console")];
+ [toolbarItem setImage:[NSImage imageNamed:@"hideconsole"]];
+ } else {
+ [toolbarItem setLabel:NSLocalizedString(@"Show Console", @"toolbar item for showconsole")];
+ [toolbarItem setImage:[NSImage imageNamed:@"showconsole"]];
+ }
+ //set up the target action
+ [toolbarItem setTarget:self];
+ [toolbarItem setAction:@selector(toggleConsole)];
+ } else if ([itemIdentifier isEqualToString:@"ClearConsoleIdentifier"]) {
+ //set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel:NSLocalizedString(@"Clear Console", @"toolbar item for clear console")];
+ [toolbarItem setPaletteLabel:NSLocalizedString(@"Clear Console", @"toolbar item for clear console")];
+ //set up tooltip and image
+ [toolbarItem setToolTip:NSLocalizedString(@"Clear the console which shows all MySQL commands performed by CocoaMySQL", @"tooltip for toolbar item for clear console")];
+ [toolbarItem setImage:[NSImage imageNamed:@"clearconsole"]];
+ //set up the target action
+ [toolbarItem setTarget:self];
+ [toolbarItem setAction:@selector(clearConsole)];
+ } else if ([itemIdentifier isEqualToString:@"FlushPrivilegesIdentifier"]) {
+ //set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel:NSLocalizedString(@"Flush Privileges", @"toolbar item for flush privileges")];
+ [toolbarItem setPaletteLabel:NSLocalizedString(@"Flush Privileges", @"toolbar item for flush privileges")];
+ //set up tooltip and image
+ [toolbarItem setToolTip:NSLocalizedString(@"Reload the MySQL privileges saved in the mysql database", @"tooltip for toolbar item for flush privileges")];
+ [toolbarItem setImage:[NSImage imageNamed:@"flushprivileges"]];
+ //set up the target action
+ [toolbarItem setTarget:self];
+ [toolbarItem setAction:@selector(flushPrivileges)];
+ } else if ([itemIdentifier isEqualToString:@"OptimizeTableIdentifier"]) {
+ //set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel:NSLocalizedString(@"Table Operations", @"toolbar item for perform table operations")];
+ [toolbarItem setPaletteLabel:NSLocalizedString(@"Table Operations", @"toolbar item for perform table operations")];
+ //set up tooltip and image
+ [toolbarItem setToolTip:NSLocalizedString(@"Perform table operations for the selected table", @"tooltip for toolbar item for perform table operations")];
+ [toolbarItem setImage:[NSImage imageNamed:@"optimizetable"]];
+ //set up the target action
+ [toolbarItem setTarget:self];
+ [toolbarItem setAction:@selector(openTableOperationsSheet)];
+ } else if ([itemIdentifier isEqualToString:@"ShowVariablesIdentifier"]) {
+ //set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel:NSLocalizedString(@"Show Variables", @"toolbar item for show variables")];
+ [toolbarItem setPaletteLabel:NSLocalizedString(@"Show Variables", @"toolbar item for show variables")];
+ //set up tooltip and image
+ [toolbarItem setToolTip:NSLocalizedString(@"Show the MySQL Variables", @"tooltip for toolbar item for show variables")];
+ [toolbarItem setImage:[NSImage imageNamed:@"showvariables"]];
+ //set up the target action
+ [toolbarItem setTarget:self];
+ [toolbarItem setAction:@selector(showVariables)];
+ } else if ([itemIdentifier isEqualToString:@"ShowCreateTableIdentifier"]) {
+ //set the text label to be displayed in the toolbar and customization palette
+ [toolbarItem setLabel:NSLocalizedString(@"Create Table Syntax", @"toolbar item for create table syntax")];
+ [toolbarItem setPaletteLabel:NSLocalizedString(@"Create Table Syntax", @"toolbar item for create table syntax")];
+ //set up tooltip and image
+ [toolbarItem setToolTip:NSLocalizedString(@"Show the MySQL command used to create the selected table", @"tooltip for toolbar item for create table syntax")];
+ [toolbarItem setImage:[NSImage imageNamed:@"createtablesyntax"]];
+ //set up the target action
+ [toolbarItem setTarget:self];
+ [toolbarItem setAction:@selector(showCreateTable)];
+ } else {
+ //itemIdentifier refered to a toolbar item that is not provided or supported by us or cocoa
+ toolbarItem = nil;
+ }
+
+ return toolbarItem;
+}
+
+- (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar
+/*
+toolbar delegate method
+*/
+{
+ return [NSArray arrayWithObjects:@"ToggleConsoleIdentifier", @"ClearConsoleIdentifier", @"ShowVariablesIdentifier", @"FlushPrivilegesIdentifier", @"OptimizeTableIdentifier", @"ShowCreateTableIdentifier", NSToolbarCustomizeToolbarItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, NSToolbarSpaceItemIdentifier, NSToolbarSeparatorItemIdentifier, nil];
+}
+
+- (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar
+/*
+toolbar delegate method
+*/
+{
+ return [NSArray arrayWithObjects:@"ToggleConsoleIdentifier", @"ClearConsoleIdentifier", NSToolbarSeparatorItemIdentifier, @"ShowVariablesIdentifier", @"FlushPrivilegesIdentifier", NSToolbarSeparatorItemIdentifier, @"OptimizeTableIdentifier", @"ShowCreateTableIdentifier", nil];
+}
+
+- (BOOL)validateToolbarItem:(NSToolbarItem *)toolbarItem;
+/*
+validates the toolbar items
+*/
+{
+ if ( [[toolbarItem itemIdentifier] isEqualToString:@"OptimizeTableIdentifier"] ) {
+ if ( ![self table] )
+ return NO;
+ } else if ( [[toolbarItem itemIdentifier] isEqualToString:@"ShowCreateTableIdentifier"] ) {
+ if ( ![self table] )
+ return NO;
+ } else if ( [[toolbarItem itemIdentifier] isEqualToString:@"ToggleConsoleIdentifier"] ) {
+ if ( [self consoleIsOpened] ) {
+ [toolbarItem setLabel:@"Hide Console"];
+ [toolbarItem setImage:[NSImage imageNamed:@"hideconsole"]];
+ } else {
+ [toolbarItem setLabel:@"Show Console"];
+ [toolbarItem setImage:[NSImage imageNamed:@"showconsole"]];
+ }
+ }
+
+ return YES;
+}
+
+
+//NSDocument methods
+- (NSString *)windowNibName
+/*
+returns the name of the nib file
+*/
+{
+ return @"DBView";
+}
+
+- (void)windowControllerDidLoadNib:(NSWindowController *) aController
+/*
+code that need to be executed once the windowController has loaded the document's window
+sets upt the interface (small fonts)
+*/
+{
+ [aController setShouldCascadeWindows:NO];
+ [super windowControllerDidLoadNib:aController];
+
+ NSEnumerator *theCols = [[variablesTableView tableColumns] objectEnumerator];
+ NSTableColumn *theCol;
+
+// [tableWindow makeKeyAndOrderFront:self];
+
+ prefs = [[NSUserDefaults standardUserDefaults] retain];
+ if ( [prefs objectForKey:@"favorites"] != nil ) {
+ favorites = [[NSArray alloc] initWithArray:[prefs objectForKey:@"favorites"]];
+ } else {
+ favorites = [[NSArray array] retain];
+ }
+ selectedFavorite = [[NSString alloc] initWithString:NSLocalizedString(@"Custom", @"menu item for custom connection")];
+
+ //register for notifications
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willPerformQuery:)
+ name:@"SMySQLQueryWillBePerformed" object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hasPerformedQuery:)
+ name:@"SMySQLQueryHasBeenPerformed" object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:)
+ name:@"NSApplicationWillTerminateNotification" object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tunnelStatusChanged:)
+ name: @"STMStatusChanged" object: nil];
+
+ //set up interface
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [consoleTextView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [createTableSyntaxView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ while ( (theCol = [theCols nextObject]) ) {
+ [[theCol dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]];
+ }
+ } else {
+ [consoleTextView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [createTableSyntaxView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ while ( (theCol = [theCols nextObject]) ) {
+ [[theCol dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+ }
+ [consoleDrawer setContentSize:NSMakeSize(110,110)];
+
+ //set up toolbar
+ [self setupToolbar];
+
+
+
+//tunnel test
+/*
+NSDictionary *args = [NSDictionary dictionaryWithObjectsAndKeys:@"CocoaMySQL Tunnel",@"connName",
+ @"xy",@"connUser",
+ @"textor.ch",@"connHost",
+ [NSNumber numberWithBool:YES],@"connAuth",
+ [NSArray arrayWithObject:[NSDictionary dictionaryWithObjectsAndKeys:@"8888",@"port",
+ @"textor.ch",@"host",
+ @"3306",@"hostport",
+ nil]],@"tunnelsLocal",
+ nil];
+tunnel = [[SSHTunnel alloc] initWithDictionary:args];
+[tunnel startTunnel];
+*/
+//sleep(3);
+//[tunnel startTunnelWithArguments:args];
+//end tunnel test
+
+
+ [self connectToDB:nil];
+}
+
+- (void)windowWillClose:(NSNotification *)aNotification
+{
+ [self closeConnection];
+
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+
+//NSWindow delegate methods
+- (BOOL)windowShouldClose:(id)sender
+/*
+invoked when the document window should close
+*/
+{
+ if ( ![tablesListInstance selectionShouldChangeInTableView:nil] ) {
+ return NO;
+ } else {
+ return YES;
+ }
+
+}
+
+
+//SMySQL delegate methods
+- (void)willQueryString:(NSString *)query
+/*
+invoked when framework will perform a query
+*/
+{
+ NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil];
+
+ [self showMessageInConsole:[NSString stringWithFormat:@"/* MySQL %@ */ %@;\n", currentTime, query]];
+}
+
+- (void)queryGaveError:(NSString *)error
+/*
+invoked when query gave an error
+*/
+{
+ NSString *currentTime = [[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S" timeZone:nil locale:nil];
+
+ [self showErrorInConsole:[NSString stringWithFormat:@"/* ERROR %@ */ %@;\n", currentTime, error]];
+}
+
+
+//splitView delegate methods
+- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview
+/*
+tells the splitView that it can collapse views
+*/
+{
+ return YES;
+}
+
+- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset
+/*
+defines max position of splitView
+*/
+{
+ return proposedMax - 600;
+}
+
+- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset
+/*
+defines min position of splitView
+*/
+{
+ return proposedMin + 160;
+}
+
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ return [variables count];
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ id theValue;
+
+ theValue = [[variables objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
+
+ if ( [theValue isKindOfClass:[NSData class]] ) {
+ theValue = [[NSString alloc] initWithData:theValue encoding:[mySQLConnection encoding]];
+ }
+
+ return theValue;
+}
+
+
+//for freeing up memory
+- (void)dealloc
+{
+// NSLog(@"TableDocument dealloc");
+
+ [mySQLConnection release];
+ [favorites release];
+ if (nil != variables )
+ {
+ [variables release];
+ }
+ [selectedDatabase release];
+ [selectedFavorite release];
+ [mySQLVersion release];
+ [prefs release];
+
+ [super dealloc];
+}
+
+@end
diff --git a/TableDump.h b/TableDump.h
new file mode 100644
index 00000000..fa7785c0
--- /dev/null
+++ b/TableDump.h
@@ -0,0 +1,136 @@
+//
+// TableDump.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+
+
+@interface TableDump : NSObject {
+
+ IBOutlet id tableDocumentInstance;
+ IBOutlet id tablesListInstance;
+ IBOutlet id tableSourceInstance;
+ IBOutlet id tableContentInstance;
+ IBOutlet id customQueryInstance;
+
+ IBOutlet id tableWindow;
+ IBOutlet id exportDumpView;
+ IBOutlet id exportCSVView;
+ IBOutlet id exportMultipleCSVView;
+ IBOutlet id exportMultipleXMLView;
+ IBOutlet id exportDumpTableView;
+ IBOutlet id exportMultipleCSVTableView;
+ IBOutlet id exportMultipleXMLTableView;
+ IBOutlet id exportFieldNamesSwitch;
+ IBOutlet id exportFieldsTerminatedField;
+ IBOutlet id exportFieldsEnclosedField;
+ IBOutlet id exportFieldsEscapedField;
+ IBOutlet id exportLinesTerminatedField;
+ IBOutlet id exportMultipleFieldNamesSwitch;
+ IBOutlet id exportMultipleFieldsTerminatedField;
+ IBOutlet id exportMultipleFieldsEnclosedField;
+ IBOutlet id exportMultipleFieldsEscapedField;
+ IBOutlet id exportMultipleLinesTerminatedField;
+ IBOutlet id importCSVView;
+ IBOutlet id importFieldNamesSwitch;
+ IBOutlet id importFieldsTerminatedField;
+ IBOutlet id importFieldsEnclosedField;
+ IBOutlet id importFieldsEscapedField;
+ IBOutlet id importLinesTerminatedField;
+ IBOutlet id addDropTableSwitch;
+ IBOutlet id addCreateTableSwitch;
+ IBOutlet id addTableContentSwitch;
+ IBOutlet id addErrorsSwitch;
+ IBOutlet id errorsSheet;
+ IBOutlet id errorsView;
+ IBOutlet id singleProgressSheet;
+ IBOutlet id singleProgressBar;
+ IBOutlet id singleProgressText;
+ IBOutlet id fieldMappingSheet;
+ IBOutlet id rowUpButton;
+ IBOutlet id rowDownButton;
+ IBOutlet id fieldMappingTableView;
+
+ CMMCPConnection *mySQLConnection;
+
+ NSMutableArray *tables;
+ NSArray *importArray;
+ NSMutableArray *fieldMappingArray;
+ int currentRow;
+ NSString *savePath;
+ NSString *openPath;
+ NSUserDefaults *prefs;
+}
+
+//IBAction methods
+- (IBAction)reloadTables:(id)sender;
+- (IBAction)selectTables:(id)sender;
+- (IBAction)closeSheet:(id)sender;
+- (IBAction)stepRow:(id)sender;
+//- (IBAction)chooseDumpType:(id)sender;
+
+//export methods
+//- (IBAction)saveDump:(id)sender;
+- (void)exportFile:(int)tag;
+- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
+
+//import methods
+//- (IBAction)openDump:(id)sender;
+- (void)importFile:(int)tag;
+- (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
+- (void)setupFieldMappingArray;
+
+//format methods
+- (NSString *)dumpForSelectedTables;
+- (NSString *)csvForArray:(NSArray *)array useFirstLine:(BOOL)firstLine terminatedBy:(NSString *)terminated
+ enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds silently:(BOOL)silently;
+- (NSArray *)arrayForCSV:(NSString *)csv terminatedBy:(NSString *)terminated
+ enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds;
+- (NSString *)xmlForArray:(NSArray *)array tableName:(NSString *)table withHeader:(BOOL)header silently:(BOOL)silently;
+- (NSString *)stringForSelectedTablesWithType:(NSString *)type;
+- (NSString *)htmlEscapeString:(NSString *)string;
+- (NSArray *)arrayForString:(NSString *)string enclosed:(NSString *)enclosed
+ escaped:(NSString *)escaped terminated:(NSString *)terminated;
+- (NSArray *)splitQueries:(NSString *)query;
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//last but not least
+- (id)init;
+- (void)dealloc;
+
+@end
diff --git a/TableDump.m b/TableDump.m
new file mode 100644
index 00000000..648a91c1
--- /dev/null
+++ b/TableDump.m
@@ -0,0 +1,1451 @@
+//
+// TableDump.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "TableDump.h"
+#import "TableDocument.h"
+#import "TablesList.h"
+#import "TableSource.h"
+#import "TableContent.h"
+#import "CustomQuery.h"
+
+
+@implementation TableDump
+
+//IBAction methods
+- (IBAction)reloadTables:(id)sender
+/*
+get the tables in db
+*/
+{
+ CMMCPResult *queryResult;
+ int i;
+
+//get tables
+ [tables removeAllObjects];
+ queryResult = [mySQLConnection listTables];
+ for ( i = 0 ; i < [queryResult numOfRows] ; i++ ) {
+ [queryResult dataSeek:i];
+ [tables addObject:[NSMutableArray arrayWithObjects:
+ [NSNumber numberWithBool:YES], [[queryResult fetchRowAsArray] objectAtIndex:0], nil]];
+ }
+
+ [exportDumpTableView reloadData];
+ [exportMultipleCSVTableView reloadData];
+ [exportMultipleXMLTableView reloadData];
+/*
+//disable buttons if there are no tables in db (or no db is selected)
+ if ( ![tables count] ) {
+ [dumpButton setEnabled:NO];
+ } else {
+ [dumpButton setEnabled:YES];
+ }
+ if ( ![tableDocumentInstance database] ) {
+ [readButton setEnabled:NO];
+ } else {
+ [readButton setEnabled:YES];
+ }
+*/
+}
+
+- (IBAction)selectTables:(id)sender
+/*
+selects or deselects all tables
+*/
+{
+ NSEnumerator *enumerator;
+ id theObject;
+
+ [self reloadTables:self];
+
+ enumerator = [tables objectEnumerator];
+ while ( (theObject = [enumerator nextObject]) ) {
+ if ( [sender tag] ) {
+ [theObject replaceObjectAtIndex:0 withObject:[NSNumber numberWithBool:YES]];
+ } else {
+ [theObject replaceObjectAtIndex:0 withObject:[NSNumber numberWithBool:NO]];
+ }
+ }
+
+ [exportDumpTableView reloadData];
+ [exportMultipleCSVTableView reloadData];
+ [exportMultipleXMLTableView reloadData];
+}
+
+- (IBAction)closeSheet:(id)sender
+/*
+ends the modal session
+*/
+{
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+- (IBAction)stepRow:(id)sender
+/*
+displays next/previous row in fieldMapping tableView
+*/
+{
+ if ( [sender tag] == 0 ) {
+ currentRow--;
+ [self setupFieldMappingArray];
+ } else {
+ currentRow++;
+ [self setupFieldMappingArray];
+ }
+
+ //enable/disable buttons
+ if ( currentRow == 0 ) {
+ [rowDownButton setEnabled:NO];
+ [rowUpButton setEnabled:YES];
+ } else if ( currentRow == ([importArray count]-1) ) {
+ [rowDownButton setEnabled:YES];
+ [rowUpButton setEnabled:NO];
+ } else {
+ [rowDownButton setEnabled:YES];
+ [rowUpButton setEnabled:YES];
+ }
+}
+
+
+//export methods
+- (void)exportFile:(int)tag
+/*
+invoked when user clicks on an export menuItem
+*/
+{
+ NSString *file;
+ NSString *contextInfo;
+ NSSavePanel *savePanel = [NSSavePanel savePanel];
+ NSString *currentDate = [[NSDate date] descriptionWithCalendarFormat:@"%d.%m.%Y" timeZone:nil locale:nil];
+
+ switch ( tag ) {
+ case 5:
+ //export dump
+ [self reloadTables:self];
+ file = [NSString stringWithFormat:@"%@_dump %@.sql", [tableDocumentInstance database], currentDate];
+ [savePanel setAccessoryView:exportDumpView];
+ contextInfo = @"exportDump";
+ break;
+ case 6:
+ //export table content as CSV
+ file = [NSString stringWithFormat:@"%@.csv", [tableDocumentInstance table]];
+ [savePanel setAccessoryView:exportCSVView];
+ contextInfo = @"exportTableContentAsCSV";
+ break;
+ case 7:
+ //export table content as XML
+ file = [NSString stringWithFormat:@"%@.xml", [tableDocumentInstance table]];
+ contextInfo = @"exportTableContentAsXML";
+ break;
+ case 8:
+ //export custom result as CSV
+ file = @"customresult.csv";
+ [savePanel setAccessoryView:exportCSVView];
+ contextInfo = @"exportCustomResultAsCSV";
+ break;
+ case 9:
+ //export custom result as XML
+ file = @"customresult.xml";
+ contextInfo = @"exportCustomResultAsXML";
+ break;
+ case 10:
+ //export multiple tables as CSV
+ [self reloadTables:self];
+ file = [NSString stringWithFormat:@"%@.csv", [tableDocumentInstance database]];
+ [savePanel setAccessoryView:exportMultipleCSVView];
+ contextInfo = @"exportMultipleTablesAsCSV";
+ break;
+ case 11:
+ //export multiple tables as XML
+ [self reloadTables:self];
+ file = [NSString stringWithFormat:@"%@.xml", [tableDocumentInstance database]];
+ [savePanel setAccessoryView:exportMultipleXMLView];
+ contextInfo = @"exportMultipleTablesAsXML";
+ break;
+ default:
+ NSLog(@"ERROR: unknown export item with tag %d", tag);
+ return;
+ break;
+ }
+ //open savePanel
+ [savePanel beginSheetForDirectory:[prefs objectForKey:@"savePath"]
+ file:file modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:@selector(savePanelDidEnd:returnCode:contextInfo:) contextInfo:contextInfo];
+}
+
+- (void)savePanelDidEnd:(NSSavePanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+/*
+saves the export file
+*/
+{
+ NSString *testString = @"";
+ NSError **errorStr;
+ id fileContent;
+ BOOL success;
+
+ [sheet orderOut:self];
+ if ( returnCode != NSOKButton )
+ return;
+//save path to preferences
+ [prefs setObject:[sheet directory] forKey:@"savePath"];
+
+//error if file exists and is not writable
+ if ( [[NSFileManager defaultManager] fileExistsAtPath:[sheet filename]] ) {
+ if ( ![[NSFileManager defaultManager] isWritableFileAtPath:[sheet filename]] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, 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;
+ }
+ } else {
+//error if file cannot be written
+ if ( ![testString writeToFile:[sheet filename] atomically:YES] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, 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;
+ }
+ }
+
+ if ( [contextInfo isEqualToString:@"exportDump"] ) {
+ //export dump of selected database
+ fileContent = [self dumpForSelectedTables];
+ } else if ( [contextInfo isEqualToString:@"exportCustomResultAsCSV"] ) {
+ //export custom query result as csv
+ fileContent = [self csvForArray:[customQueryInstance currentResult] useFirstLine:[exportFieldNamesSwitch state]
+ terminatedBy:[exportFieldsTerminatedField stringValue]
+ enclosedBy:[exportFieldsEnclosedField stringValue]
+ escapedBy:[exportFieldsEscapedField stringValue]
+ lineEnds:[exportLinesTerminatedField stringValue]
+ silently:NO];
+ } else if ( [contextInfo isEqualToString:@"exportTableContentAsCSV"] ) {
+ //export table content as csv
+ fileContent = [self csvForArray:[tableContentInstance currentResult] useFirstLine:[exportFieldNamesSwitch state]
+ terminatedBy:[exportFieldsTerminatedField stringValue]
+ enclosedBy:[exportFieldsEnclosedField stringValue]
+ escapedBy:[exportFieldsEscapedField stringValue]
+ lineEnds:[exportLinesTerminatedField stringValue]
+ silently:NO];
+ } else if ( [contextInfo isEqualToString:@"exportMultipleTablesAsCSV"] ) {
+ //export multiple tables as CSV
+ fileContent = [self stringForSelectedTablesWithType:@"csv"];
+ } else if ( [contextInfo isEqualToString:@"exportCustomResultAsXML"] ) {
+ //export custom query result as XML
+ fileContent = [self xmlForArray:[customQueryInstance currentResult]
+ tableName:@"custom"
+ withHeader:YES
+ silently:NO];
+ } else if ( [contextInfo isEqualToString:@"exportTableContentAsXML"] ) {
+ //export table content as XML
+ fileContent = [self xmlForArray:[tableContentInstance currentResult]
+ tableName:[tableDocumentInstance table]
+ withHeader:YES
+ silently:NO];
+ } else if ( [contextInfo isEqualToString:@"exportMultipleTablesAsXML"] ) {
+ //export multiple tables as XML
+ fileContent = [self stringForSelectedTablesWithType:@"xml"];
+ } else {
+ //unknown operation
+ NSLog(@"unknown operation %@", [contextInfo description]);
+ fileContent = @"";
+ }
+
+ if ( [fileContent respondsToSelector:@selector(writeToFile:atomically:encoding:error:)] ) {
+ // mac os 10.4 or later
+ success = [fileContent writeToFile:[sheet filename] atomically:YES encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance getSelectedEncoding] cString]] error:errorStr];
+ } else {
+ // mac os pre 10.4
+ success = [fileContent writeToFile:[sheet filename] atomically:YES];
+ }
+ if ( !success ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"Couldn't write to file. Be sure that you have the necessary privileges.", @"message of panel when file cannot be written"));
+ }
+
+}
+
+//import methods
+/*
+- (IBAction)openDump:(id)sender
+
+opens the NSOpenPanel
+
+{
+ [[NSOpenPanel openPanel] beginSheetForDirectory:[prefs objectForKey:@"openPath"] file:nil types:nil
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:nil];
+}
+*/
+
+- (void)importFile:(int)tag
+/*
+invoked when user clicks on an export menuItem
+*/
+{
+ NSString *contextInfo;
+ NSOpenPanel *openPanel = [NSOpenPanel openPanel];
+
+ switch ( tag ) {
+ case 1:
+ //import dump
+ contextInfo = @"importDump";
+ break;
+ case 2:
+ //import CSV file
+ [openPanel setAccessoryView:importCSVView];
+ contextInfo = @"importCSVFile";
+ break;
+ default:
+ NSLog(@"ERROR: unknown import item with tag %d", tag);
+ return;
+ break;
+ }
+ //open savePanel
+ [openPanel beginSheetForDirectory:[prefs objectForKey:@"openPath"]
+ file:nil modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:contextInfo];
+}
+
+- (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+/*
+reads mysql-dumpfile
+*/
+{
+ NSString *dumpFile;
+ NSError **errorStr;
+ NSMutableString *errors = [NSMutableString string];
+
+ [sheet orderOut:self];
+ if ( returnCode != NSOKButton )
+ return;
+//save path to preferences
+ [prefs setObject:[sheet directory] forKey:@"openPath"];
+
+//load file into string
+ if ( [NSString respondsToSelector:@selector(stringWithContentsOfFile:encoding:error:)] ) {
+ // mac os 10.4 or later
+ dumpFile = [NSString stringWithContentsOfFile:[sheet filename] encoding:[CMMCPConnection encodingForMySQLEncoding:[[tableDocumentInstance getSelectedEncoding] cString]] error:errorStr];
+ } else {
+ // mac os pre 10.4
+ dumpFile = [NSString stringWithContentsOfFile:[sheet filename]];
+ }
+ if ( !dumpFile ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"Couldn't open file. Be sure that the path is correct and that you have the necessary privileges.", @"message of panel when file cannot be opened"));
+ return;
+ }
+
+//reset interface
+ [errorsView setString:@""];
+ [errorsView displayIfNeeded];
+ [singleProgressText setStringValue:NSLocalizedString(@"Reading...", @"text showing that app is reading dump")];
+ [singleProgressText displayIfNeeded];
+ [singleProgressBar setDoubleValue:0];
+ [singleProgressBar displayIfNeeded];
+
+ if ( [contextInfo isEqualToString:@"importDump"] ) {
+//import dump file
+ NSArray *queries;
+ int i;
+
+ //open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [singleProgressBar setIndeterminate:YES];
+ [singleProgressBar setUsesThreadedAnimation:YES];
+ [singleProgressBar startAnimation:self];
+ //get array with an object for each mysql-query
+// queries = [dumpFile componentsSeparatedByString:@";\n"];
+ queries = [self splitQueries:dumpFile];
+
+ [singleProgressBar stopAnimation:self];
+ [singleProgressBar setUsesThreadedAnimation:NO];
+ [singleProgressBar setIndeterminate:NO];
+ //perform all mysql-queries
+ for ( i = 0 ; i < [queries count] ; i++ ) {
+ [singleProgressBar setDoubleValue:((i+1)*100/[queries count])];
+ [singleProgressBar displayIfNeeded];
+ [mySQLConnection queryString:[queries objectAtIndex:i]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""]
+ && ![[mySQLConnection getLastErrorMessage] isEqualToString:@"Query was empty"])
+ [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in query %d] %@\n", @"error text when multiple custom query failed"), (i+1),[mySQLConnection getLastErrorMessage]]];
+ }
+ //close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+ //display errors
+ if ( [errors length] ) {
+ [errorsView setString:errors];
+ [NSApp beginSheet:errorsSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:errorsSheet];
+
+ [NSApp endSheet:errorsSheet];
+ [errorsSheet orderOut:nil];
+ }
+ } else if ( [contextInfo isEqualToString:@"importCSVFile"] ) {
+//import csv file
+ int code;
+ NSPopUpButtonCell *buttonCell = [[NSPopUpButtonCell alloc] init];
+
+ //open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [singleProgressBar setIndeterminate:YES];
+ [singleProgressBar setUsesThreadedAnimation:YES];
+ [singleProgressBar startAnimation:self];
+ //put file in array
+ if ( importArray )
+ [importArray release];
+ importArray = [[self arrayForCSV:dumpFile
+ terminatedBy:[importFieldsTerminatedField stringValue]
+ enclosedBy:[importFieldsEnclosedField stringValue]
+ escapedBy:[importFieldsEscapedField stringValue]
+ lineEnds:[importLinesTerminatedField stringValue]] retain];
+ //close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+ [singleProgressBar stopAnimation:self];
+ [singleProgressBar setUsesThreadedAnimation:NO];
+ [singleProgressBar setIndeterminate:NO];
+ //show fieldMapping sheet
+ //set up tableView
+ currentRow = 0;
+ fieldMappingArray = nil;
+ [self setupFieldMappingArray];
+ [rowDownButton setEnabled:NO];
+ if ( [importArray count] > 1 ) {
+ [rowUpButton setEnabled:YES];
+ } else {
+ [rowUpButton setEnabled:NO];
+ }
+ //set up tableView buttons
+ [buttonCell setControlSize:NSSmallControlSize];
+ [buttonCell setFont:[NSFont labelFontOfSize:[NSFont smallSystemFontSize]]];
+ [buttonCell addItemWithTitle:NSLocalizedString(@"Do not import", @"text for csv import drop downs")];
+ [buttonCell addItemsWithTitles:[tableSourceInstance fieldNames]];
+ [[fieldMappingTableView tableColumnWithIdentifier:@"1"] setDataCell:buttonCell];
+ [NSApp beginSheet:fieldMappingSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:fieldMappingSheet];
+
+ [NSApp endSheet:fieldMappingSheet];
+ [fieldMappingSheet orderOut:nil];
+
+ if ( code ) {
+ //import array into db
+ NSMutableString *fNames = [NSMutableString string];
+ NSMutableArray *fValuesIndexes = [NSMutableArray array];
+ NSMutableString *fValues = [NSMutableString string];
+ int i,j;
+
+ //open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+
+ //get fields to be imported
+ for ( i = 0 ; i < [fieldMappingArray count] ; i++ ) {
+ if ( [[[fieldMappingArray objectAtIndex:i] objectAtIndex:1] intValue] > 0 ) {
+ //field marked for import
+ if ( [fNames length] )
+ [fNames appendString:@","];
+ [fNames appendString:[NSString stringWithFormat:@"`%@`",
+ [[tableSourceInstance fieldNames] objectAtIndex:([[[fieldMappingArray objectAtIndex:i] objectAtIndex:1] intValue]-1)]]];
+ [fValuesIndexes addObject:[NSNumber numberWithInt:i]];
+ }
+ }
+ //import array
+ for ( i = 0 ; i < [importArray count] ; i++ ) {
+ //show progress bar
+ [singleProgressBar setDoubleValue:((i+1)*100/[importArray count])];
+ [singleProgressBar displayIfNeeded];
+ if ( ![importFieldNamesSwitch state] || (i != 0) ) {
+ //put values in string
+ [fValues setString:@""];
+ for ( j = 0 ; j < [fValuesIndexes count] ; j++ ) {
+ if ( [fValues length] )
+ [fValues appendString:@","];
+ if ( [[[importArray objectAtIndex:i] objectAtIndex:[[fValuesIndexes objectAtIndex:j] intValue]]
+ isMemberOfClass:[NSNull class]] ) {
+ [fValues appendString:@"NULL"];
+ } else {
+ [fValues appendString:[NSString stringWithFormat:@"'%@'",
+ [mySQLConnection prepareString:
+ [[importArray objectAtIndex:i] objectAtIndex:[[fValuesIndexes objectAtIndex:j] intValue]]]]];
+// [fValues appendString:[NSString stringWithFormat:@"\"%@\"",
+// [mySQLConnection prepareString:
+// [[importArray objectAtIndex:i] objectAtIndex:[[fValuesIndexes objectAtIndex:j] intValue]]]]];
+ }
+ }
+ //perform query
+ [mySQLConnection queryString:[NSString stringWithFormat:@"INSERT INTO `%@` (%@) VALUES (%@)",
+ [tablesListInstance table],
+ fNames,
+ fValues]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] )
+ [errors appendString:[NSString stringWithFormat:NSLocalizedString(@"[ERROR in line %d] %@\n", @"error text when reading of csv file gave errors"), (i+1),[mySQLConnection getLastErrorMessage]]];
+ }
+ }
+ //close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+ }
+ //display errors
+ if ( [errors length] ) {
+ [errorsView setString:errors];
+ [NSApp beginSheet:errorsSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:errorsSheet];
+
+ [NSApp endSheet:errorsSheet];
+ [errorsSheet orderOut:nil];
+ }
+ //free arrays
+ fieldMappingArray = nil;
+ importArray = nil;
+ }
+}
+
+- (void)setupFieldMappingArray
+/*
+sets up the fieldMapping array to be shown in the tableView
+*/
+{
+ int i, value;
+
+ if ( fieldMappingArray ) {
+ for ( i = 0 ; i < [fieldMappingArray count] ; i++ ) {
+ if ( [[[importArray objectAtIndex:currentRow] objectAtIndex:i] isKindOfClass:[NSNull class]] ) {
+ [[fieldMappingArray objectAtIndex:i] replaceObjectAtIndex:0 withObject:@"NULL"];
+ } else {
+ [[fieldMappingArray objectAtIndex:i] replaceObjectAtIndex:0 withObject:[[importArray objectAtIndex:currentRow] objectAtIndex:i]];
+ }
+ }
+ } else {
+ fieldMappingArray = [NSMutableArray array];
+ for ( i = 0 ; i < [[importArray objectAtIndex:currentRow] count] ; i++ ) {
+ if ( i < [[tableSourceInstance fieldNames] count] ) {
+ value = i + 1;
+ } else {
+ value = 0;
+ }
+ if ( [[[importArray objectAtIndex:currentRow] objectAtIndex:i] isKindOfClass:[NSNull class]] ) {
+ [fieldMappingArray addObject:[NSMutableArray arrayWithObjects:@"NULL", [NSNumber numberWithInt:value], nil]];
+ } else {
+ [fieldMappingArray addObject:[NSMutableArray arrayWithObjects:[[importArray objectAtIndex:currentRow] objectAtIndex:i], [NSNumber numberWithInt:value], nil]];
+ }
+ }
+ [fieldMappingArray retain];
+ }
+ [fieldMappingTableView reloadData];
+}
+
+
+//format methods
+- (NSString *)dumpForSelectedTables
+/*
+returns a dump string for the selected tables
+*/
+{
+ int i,j,k,t,rowCount,tableCount;
+ CMMCPResult *queryResult;
+ NSString *tableName;
+ NSArray *fieldNames;
+ NSArray *theRow;
+ NSMutableString *rowValue = [NSMutableString string];
+ NSMutableArray *fieldValues;
+ NSMutableString *dump = [NSMutableString string];
+ NSMutableString *errors = [NSMutableString string];
+ id createTableSyntax;
+
+//reset interface
+ [errorsView setString:@""];
+ [errorsView displayIfNeeded];
+ [singleProgressText setStringValue:NSLocalizedString(@"Dumping...", @"text showing that app is writing dump")];
+ [singleProgressText displayIfNeeded];
+ [singleProgressBar setDoubleValue:0];
+ [singleProgressBar displayIfNeeded];
+
+//open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+
+//count tables
+ tableCount = 0;
+ for ( i = 0 ; i < [tables count] ; i++ ) {
+ if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) {
+ tableCount++;
+ }
+ }
+ k = 0;
+
+//add header of dump-file
+// [dump appendString:[NSString stringWithFormat:@"# Tables dumped %@\n# Created by CocoaMySQL (Copyright (c) 2002-2003 Lorenz Textor)\n#\n# Host: %@ Database: %@\n# ******************************\n\n", [NSDate date], [tableDocumentInstance host], [tableDocumentInstance database]]];
+ [dump appendString:@"# CocoaMySQL dump\n"];
+ [dump appendString:[NSString stringWithFormat:@"# Version %@\n",
+ [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]];
+ [dump appendString:@"# http://cocoamysql.sourceforge.net\n#\n"];
+ [dump appendString:[NSString stringWithFormat:@"# Host: %@ (MySQL %@)\n",
+ [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]];
+ [dump appendString:[NSString stringWithFormat:@"# Database: %@\n", [tableDocumentInstance database]]];
+ [dump appendString:[NSString stringWithFormat:@"# Generation Time: %@\n", [NSDate date]]];
+ [dump appendString:@"# ************************************************************\n\n"];
+
+ for ( i = 0 ; i < [tables count] ; i++ ) {
+ if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) {
+ k++;
+//set progressbar and text
+ tableName = [[tables objectAtIndex:i] objectAtIndex:1];
+ [singleProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Dumping table %@...", @"text showing that app is dumping table"), tableName]];
+ [singleProgressText displayIfNeeded];
+//add name of table
+ [dump appendString:[NSString stringWithFormat:@"# Dump of table %@\n# ------------------------------------------------------------\n\n", tableName]];
+//add drop table
+ if ( [addDropTableSwitch state] == NSOnState )
+ [dump appendString:[NSString stringWithFormat:@"DROP TABLE IF EXISTS `%@`;\n\n", tableName]];
+//add create syntax for table
+ if ( [addCreateTableSwitch state] == NSOnState ) {
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", tableName]];
+ if ( [queryResult numOfRows] ) {
+ createTableSyntax = [[queryResult fetchRowAsDictionary] objectForKey:@"Create Table"];
+ if ( [createTableSyntax isKindOfClass:[NSData class]] ) {
+ createTableSyntax = [[[NSString alloc] initWithData:createTableSyntax encoding:[mySQLConnection encoding]] autorelease];
+ }
+ [dump appendString:[NSString stringWithFormat:@"%@;\n\n", createTableSyntax]];
+ }
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [errors appendString:[NSString stringWithFormat:@"%@\n", [mySQLConnection getLastErrorMessage]]];
+ if ( [addErrorsSwitch state] == NSOnState ) {
+ [dump appendString:[NSString stringWithFormat:@"# Error: %@\n", [mySQLConnection getLastErrorMessage]]];
+ }
+ }
+ }
+//add table content
+ if ( [addTableContentSwitch state] == NSOnState ) {
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@`", tableName]];
+ fieldNames = [queryResult fetchFieldNames];
+ rowCount = [queryResult numOfRows];
+ for ( j = 0 ; j < rowCount ; j++ ) {
+ [queryResult dataSeek:j];
+ theRow = [queryResult fetchRowAsArray];
+ fieldValues = [NSMutableArray array];
+ for ( t = 0 ; t < [theRow count] ; t++ ) {
+ if ( [[theRow objectAtIndex:t] isKindOfClass:[NSData class]] ) {
+ //escape special characters
+ [rowValue setString:[mySQLConnection prepareBinaryData:[theRow objectAtIndex:t]]];
+ } else {
+ [rowValue setString:[[theRow objectAtIndex:t] description]];
+ //escape special characters
+ [rowValue setString:[mySQLConnection prepareString:rowValue]];
+ }
+ if ( [[theRow objectAtIndex:t] isMemberOfClass:[NSNull class]] ) {
+ [fieldValues addObject:@"NULL"];
+ } else {
+// [fieldValues addObject:[NSString stringWithFormat:@"\"%@\"", rowValue]];
+ [fieldValues addObject:[NSString stringWithFormat:@"'%@'", rowValue]];
+ }
+ }
+ [dump appendString:[NSString stringWithFormat:@"INSERT INTO `%@` (`%@`) VALUES (%@);\n",
+ tableName, [fieldNames componentsJoinedByString:@"`,`"],
+ [fieldValues componentsJoinedByString:@","]]];
+ }
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [errors appendString:[NSString stringWithFormat:@"%@\n", [mySQLConnection getLastErrorMessage]]];
+ if ( [addErrorsSwitch state] == NSOnState ) {
+ [dump appendString:[NSString stringWithFormat:@"# Error: %@\n", [mySQLConnection getLastErrorMessage]]];
+ }
+ }
+ }
+//set progressbar and text
+ [singleProgressBar setDoubleValue:(k*100/tableCount)];
+ [singleProgressBar displayIfNeeded];
+ [dump appendString:@"\n\n"];
+ }
+ }
+
+//close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+
+//show errors sheet if there have been errors
+ if ( [errors length] ) {
+ [errorsView setString:errors];
+ [NSApp beginSheet:errorsSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:errorsSheet];
+
+ [NSApp endSheet:errorsSheet];
+ [errorsSheet orderOut:nil];
+ }
+
+ return [NSString stringWithString:dump];
+}
+
+- (NSString *)csvForArray:(NSArray *)array useFirstLine:(BOOL)firstLine terminatedBy:(NSString *)terminated
+ enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds silently:(BOOL)silently;
+/*
+takes an array and returns it as a csv string
+*/
+{
+ NSMutableString *string = [NSMutableString string];
+ NSMutableString *rowValue = [NSMutableString string];
+ NSMutableArray *tempRow = [NSMutableArray array];
+ NSMutableString *tempTerminated, *tempLineEnds;
+ int i,j;
+
+//repare tabs and line ends
+ tempTerminated = [NSMutableString stringWithString:terminated];
+ [tempTerminated replaceOccurrencesOfString:@"\\t" withString:@"\t"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempTerminated length])];
+ [tempTerminated replaceOccurrencesOfString:@"\\n" withString:@"\n"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempTerminated length])];
+ [tempTerminated replaceOccurrencesOfString:@"\\r" withString:@"\r"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempTerminated length])];
+ terminated = [NSString stringWithString:tempTerminated];
+ tempLineEnds = [NSMutableString stringWithString:lineEnds];
+ [tempLineEnds replaceOccurrencesOfString:@"\\t" withString:@"\t"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempLineEnds length])];
+ [tempLineEnds replaceOccurrencesOfString:@"\\n" withString:@"\n"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempLineEnds length])];
+ [tempLineEnds replaceOccurrencesOfString:@"\\r" withString:@"\r"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempLineEnds length])];
+ lineEnds = [NSString stringWithString:tempLineEnds];
+
+ if ( !silently ) {
+ //reset interface
+ [singleProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")];
+ [singleProgressText displayIfNeeded];
+ [singleProgressBar setDoubleValue:0];
+ [singleProgressBar displayIfNeeded];
+ //open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ }
+
+ for ( i = 0 ; i < [array count] ; i++ ) {
+ if ( !silently ) {
+// [singleProgressText setStringValue:[NSString stringWithFormat:@"Writing row %d of %d", i+1, [array count]]];
+// [singleProgressText displayIfNeeded];
+ [singleProgressBar setDoubleValue:((i+1)*100/[array count])];
+ [singleProgressBar displayIfNeeded];
+ }
+ if ( (i > 0) || ((i == 0) && firstLine) ) {
+ [tempRow removeAllObjects];
+ for ( j = 0 ; j < [[array objectAtIndex:i] count] ; j++ ) {
+ //escape "enclosed by" character
+/*
+ [rowValue setString:@""];
+ scanner = [NSScanner scannerWithString:[[[array objectAtIndex:i] objectAtIndex:j] description]];
+ [scanner setCharactersToBeSkipped:nil];
+ while ( ![scanner isAtEnd] ) {
+ if ( [scanner scanUpToString:enclosed intoString:&tempString] ) {
+ [rowValue appendString:tempString];
+ }
+ if ( [scanner scanString:enclosed intoString:nil] ) {
+ [rowValue appendString:[NSString stringWithFormat:@"%@%@", escaped, enclosed]];
+ }
+ }
+*/
+ [rowValue setString:[[[array objectAtIndex:i] objectAtIndex:j] description]];
+ if ( [rowValue isEqualToString:[prefs objectForKey:@"nullValue"]] ) {
+ [tempRow addObject:@"NULL"];
+ } else {
+ [rowValue replaceOccurrencesOfString:escaped
+ withString:[NSString stringWithFormat:@"%@%@", escaped, escaped]
+ options:NSLiteralSearch
+ range:NSMakeRange(0,[rowValue length])];
+ if ( ![escaped isEqualToString:enclosed] ) {
+ [rowValue replaceOccurrencesOfString:enclosed
+ withString:[NSString stringWithFormat:@"%@%@", escaped, enclosed]
+ options:NSLiteralSearch
+ range:NSMakeRange(0,[rowValue length])];
+ }
+ [rowValue replaceOccurrencesOfString:lineEnds
+ withString:[NSString stringWithFormat:@"%@%@", escaped, lineEnds]
+ options:NSLiteralSearch
+ range:NSMakeRange(0,[rowValue length])];
+ if ( [enclosed isEqualToString:@""] ) {
+ [rowValue replaceOccurrencesOfString:terminated
+ withString:[NSString stringWithFormat:@"%@%@", escaped, terminated]
+ options:NSLiteralSearch
+ range:NSMakeRange(0,[rowValue length])];
+ }
+ [tempRow addObject:[NSString stringWithFormat:@"%@%@%@", enclosed, rowValue, enclosed]];
+ }
+ }
+ [string appendString:[tempRow componentsJoinedByString:terminated]];
+ [string appendString:lineEnds];
+ }
+ }
+/*
+ //remove last line end
+ [string deleteCharactersInRange:NSMakeRange(([string length]-[lineEnds length]),([lineEnds length]))];
+*/
+ if ( !silently ) {
+ //close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+ }
+
+ return [NSString stringWithString:string];
+}
+
+- (NSArray *)arrayForCSV:(NSString *)csv terminatedBy:(NSString *)terminated
+ enclosedBy:(NSString *)enclosed escapedBy:(NSString *)escaped lineEnds:(NSString *)lineEnds
+/*
+loads a csv string into an array
+*/
+{
+ NSMutableString *tempTerminated, *tempLineEnds;
+ NSMutableArray *tempArray = [NSMutableArray array];
+ NSMutableArray *tempRowArray = [NSMutableArray array];
+ NSMutableString *mutableField;
+ NSScanner *scanner;
+ NSString *scanString;
+ NSMutableString *tempString = [NSMutableString string];
+ NSMutableArray *linesArray = [NSMutableArray array];
+ BOOL isEscaped, br;
+ int fieldCount = nil;
+ int x,i,j;
+
+//repare tabs and line ends
+ tempTerminated = [NSMutableString stringWithString:terminated];
+ [tempTerminated replaceOccurrencesOfString:@"\\t" withString:@"\t"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempTerminated length])];
+ [tempTerminated replaceOccurrencesOfString:@"\\n" withString:@"\n"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempTerminated length])];
+ [tempTerminated replaceOccurrencesOfString:@"\\r" withString:@"\r"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempTerminated length])];
+ terminated = [NSString stringWithString:tempTerminated];
+ tempLineEnds = [NSMutableString stringWithString:lineEnds];
+ [tempLineEnds replaceOccurrencesOfString:@"\\t" withString:@"\t"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempLineEnds length])];
+ [tempLineEnds replaceOccurrencesOfString:@"\\n" withString:@"\n"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempLineEnds length])];
+ [tempLineEnds replaceOccurrencesOfString:@"\\r" withString:@"\r"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [tempLineEnds length])];
+ lineEnds = [NSString stringWithString:tempLineEnds];
+
+//array with one line per object
+ scanner = [NSScanner scannerWithString:csv];
+ [scanner setCharactersToBeSkipped:nil];
+ while ( ![scanner isAtEnd] ) {
+ [tempString setString:@""];
+ br = NO;
+ while ( !br ) {
+ scanString = @"";
+ [scanner scanUpToString:lineEnds intoString:&scanString];
+ [tempString appendString:scanString];
+ [scanner scanString:lineEnds intoString:&scanString];
+ //test if lineEnds-character is escaped
+ isEscaped = NO;
+ j = 1;
+ if ( ![escaped isEqualToString:enclosed] && ![escaped isEqualToString:@""] ) {
+ while ( ((j*[escaped length])<=[tempString length]) &&
+ ([[tempString substringWithRange:NSMakeRange(([tempString length]-(j*[escaped length])),[escaped length])] isEqualToString:escaped]) ) {
+ isEscaped = !isEscaped;
+ j++;
+ }
+ }
+ if ( !isEscaped || [scanner isAtEnd] ) {
+ //end of row
+ br = YES;
+ } else {
+ //lineEnds-character was escaped
+ [tempString appendString:scanString];
+ }
+ }
+ //add line to array
+ [linesArray addObject:[NSString stringWithString:tempString]];
+ }
+ for ( x = 0 ; x < [linesArray count] ; x++ ) {
+ //separate fields
+ [tempRowArray removeAllObjects];
+ [tempRowArray addObjectsFromArray:[self arrayForString:[linesArray objectAtIndex:x] enclosed:enclosed escaped:escaped terminated:terminated]];
+ if ( x == 0 ) {
+ fieldCount = [tempRowArray count];
+ } else {
+ while ( [tempRowArray count] < fieldCount ) {
+ [tempRowArray addObject:@"NULL"];
+ }
+ }
+ for ( i = 0 ; i < [tempRowArray count] ; i++ ) {
+ if ( [[tempRowArray objectAtIndex:i] isEqualToString:@"NULL"] || [[tempRowArray objectAtIndex:i] isEqualToString:@"\\N"] || [[tempRowArray objectAtIndex:i] isEqualToString:[prefs objectForKey:@"nullValue"]] ) {
+ //put nsnull object to array if field contains un-enclosed NULL string
+ [tempRowArray replaceObjectAtIndex:i withObject:[NSNull null]];
+ } else {
+ //strip enclosed and escaped characters
+ mutableField = [NSMutableString stringWithString:[tempRowArray objectAtIndex:i]];
+ //strip enclosed characters
+ if ( [mutableField length] >= (2*[enclosed length]) ) {
+ if ( [[mutableField substringToIndex:[enclosed length]] isEqualToString:enclosed] ) {
+ [mutableField deleteCharactersInRange:NSMakeRange(0,[enclosed length])];
+ }
+ if ( [[mutableField substringFromIndex:([mutableField length]-[enclosed length])] isEqualToString:enclosed] ) {
+ [mutableField deleteCharactersInRange:NSMakeRange(([mutableField length]-[enclosed length]),[enclosed length])];
+ }
+ }
+ //strip escaped characters
+ if ( ![enclosed isEqualToString:@""] ) {
+ [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, enclosed] withString:enclosed options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])];
+ } else {
+ [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, terminated] withString:terminated options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])];
+ }
+ if ( ![lineEnds isEqualToString:@""] ) {
+ [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, lineEnds] withString:lineEnds options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])];
+ }
+ if ( ![escaped isEqualToString:@""] && ![escaped isEqualToString:enclosed] ) {
+ [mutableField replaceOccurrencesOfString:[NSString stringWithFormat:@"%@%@", escaped, escaped] withString:escaped options:NSLiteralSearch range:NSMakeRange(0, [mutableField length])];
+ }
+ //add field to tempRowArray
+ [tempRowArray replaceObjectAtIndex:i withObject:[NSString stringWithString:mutableField]];
+ }
+ }
+ //add row to tempArray
+ [tempArray addObject:[NSArray arrayWithArray:tempRowArray]];
+ }
+
+ return [NSArray arrayWithArray:tempArray];
+}
+
+
+- (NSString *)xmlForArray:(NSArray *)array tableName:(NSString *)table withHeader:(BOOL)header silently:(BOOL)silently
+/*
+takes an array and returns it as a xml string
+*/
+{
+ NSMutableString *string = [NSMutableString string];
+ int i,j;
+
+ if ( !silently ) {
+ //reset interface
+ [singleProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")];
+ [singleProgressText displayIfNeeded];
+ [singleProgressBar setDoubleValue:0];
+ [singleProgressBar displayIfNeeded];
+ //open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ }
+
+ if ( header ) {
+//add header
+ [string appendString:@"<?xml version=\"1.0\"?>\n\n"];
+ [string appendString:@"<!--\n-\n"];
+ [string appendString:@"- CocoaMySQL dump\n"];
+ [string appendString:[NSString stringWithFormat:@"- Version %@\n",
+ [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]];
+ [string appendString:@"- http://cocoamysql.sourceforge.net\n-\n"];
+ [string appendString:[NSString stringWithFormat:@"- Host: %@ (MySQL %@)\n",
+ [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]];
+ [string appendString:[NSString stringWithFormat:@"- Database: %@\n", [tableDocumentInstance database]]];
+ [string appendString:[NSString stringWithFormat:@"- Generation Time: %@\n", [NSDate date]]];
+ [string appendString:@"-\n-->\n\n"];
+ }
+//add table name
+ [string appendString:[NSString stringWithFormat:@"\t<%@>\n", [self htmlEscapeString:table]]];
+
+ for ( i = 1 ; i < [array count] ; i++ ) {
+ if ( !silently ) {
+ [singleProgressBar setDoubleValue:((i+1)*100/[array count])];
+ [singleProgressBar displayIfNeeded];
+ }
+//add rows
+ [string appendString:@"\t<row>\n"];
+ for ( j = 0 ; j < [[array objectAtIndex:i] count] ; j++ ) {
+ [string appendString:[NSString stringWithFormat:@"\t\t<%@>%@</%@>\n",
+ [self htmlEscapeString:[[[array objectAtIndex:0] objectAtIndex:j] description]],
+ [self htmlEscapeString:[[[array objectAtIndex:i] objectAtIndex:j] description]],
+ [self htmlEscapeString:[[[array objectAtIndex:0] objectAtIndex:j] description]]]];
+ }
+ [string appendString:@"\t</row>\n"];
+ }
+//end table name
+ [string appendString:[NSString stringWithFormat:@"\t</%@>", [self htmlEscapeString:table]]];
+
+ if ( !silently ) {
+ //close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+ }
+
+ return [NSString stringWithString:string];
+}
+
+- (NSString *)stringForSelectedTablesWithType:(NSString *)type
+/*
+returns a csv/xml string for the selected tables
+type has to be "csv" or "xml"
+*/
+{
+ int i,j,k,t,rowCount,tableCount;
+ CMMCPResult *queryResult;
+ NSString *tableName;
+ NSArray *fieldNames;
+ NSArray *theRow;
+ NSMutableArray *tableArray = [NSMutableArray array];
+ NSMutableString *rowValue = [NSMutableString string];
+ NSMutableArray *fieldValues;
+ NSMutableString *dump = [NSMutableString string];
+ NSMutableString *errors = [NSMutableString string];
+
+//reset interface
+ [errorsView setString:@""];
+ [errorsView displayIfNeeded];
+ [singleProgressText setStringValue:NSLocalizedString(@"Writing...", @"text showing that app is writing text file")];
+ [singleProgressText displayIfNeeded];
+ [singleProgressBar setDoubleValue:0];
+ [singleProgressBar displayIfNeeded];
+
+//open progress sheet
+ [NSApp beginSheet:singleProgressSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+
+//count tables
+ tableCount = 0;
+ for ( i = 0 ; i < [tables count] ; i++ ) {
+ if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) {
+ tableCount++;
+ }
+ }
+ k = 0;
+
+//add header of dump-file
+ if ( [type isEqualToString:@"csv"] ) {
+ [dump appendString:[NSString stringWithFormat:@"Host: %@ Database: %@ Generation Time: %@\n\n",
+ [tableDocumentInstance host], [tableDocumentInstance database], [NSDate date]]];
+ } else if ( [type isEqualToString:@"xml"] ) {
+ [dump appendString:@"<?xml version=\"1.0\"?>\n\n"];
+ [dump appendString:@"<!--\n-\n"];
+ [dump appendString:@"- CocoaMySQL dump\n"];
+ [dump appendString:[NSString stringWithFormat:@"- Version %@\n",
+ [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]]];
+ [dump appendString:@"- http://cocoamysql.sourceforge.net\n-\n"];
+ [dump appendString:[NSString stringWithFormat:@"- Host: %@ (MySQL %@)\n",
+ [tableDocumentInstance host], [tableDocumentInstance mySQLVersion]]];
+ [dump appendString:[NSString stringWithFormat:@"- Database: %@\n", [tableDocumentInstance database]]];
+ [dump appendString:[NSString stringWithFormat:@"- Generation Time: %@\n", [NSDate date]]];
+ [dump appendString:@"-\n-->\n\n\n"];
+ [dump appendString:[NSString stringWithFormat:@"<%@>\n\n\n",
+ [self htmlEscapeString:[tableDocumentInstance database]]]];
+ }
+ for ( i = 0 ; i < [tables count] ; i++ ) {
+ if ( [[[tables objectAtIndex:i] objectAtIndex:0] boolValue] ) {
+ k++;
+//set progressbar and text
+ tableName = [[tables objectAtIndex:i] objectAtIndex:1];
+ [singleProgressText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"Writing table %@...", @"text showing that app is writing table to text file"), tableName]];
+ [singleProgressText displayIfNeeded];
+//add name of table
+ if ( [type isEqualToString:@"csv"] ) {
+ [dump appendString:[NSString stringWithFormat:@"Table %@\n\n", tableName]];
+ }
+//add table content
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@`", tableName]];
+ fieldNames = [queryResult fetchFieldNames];
+ rowCount = [queryResult numOfRows];
+ [tableArray removeAllObjects];
+ //add field names
+ [tableArray addObject:fieldNames];
+ for ( j = 0 ; j < rowCount ; j++ ) {
+ [queryResult dataSeek:j];
+ theRow = [queryResult fetchRowAsArray];
+ fieldValues = [NSMutableArray array];
+ for ( t = 0 ; t < [theRow count] ; t++ ) {
+ if ( [[theRow objectAtIndex:t] isKindOfClass:[NSData class]] ) {
+ //convert data to string
+ [rowValue setString:[[NSString alloc] initWithData:[theRow objectAtIndex:t]
+ encoding:[mySQLConnection encoding]]];
+ } else if ( [[theRow objectAtIndex:t] isMemberOfClass:[NSNull class]] ) {
+ [rowValue setString:[prefs objectForKey:@"nullValue"]];
+ } else {
+ [rowValue setString:[[theRow objectAtIndex:t] description]];
+ }
+ [fieldValues addObject:[NSString stringWithString:rowValue]];
+ }
+ [tableArray addObject:[NSArray arrayWithArray:fieldValues]];
+ }
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [errors appendString:[NSString stringWithFormat:@"%@\n", [mySQLConnection getLastErrorMessage]]];
+ }
+ if ( [type isEqualToString:@"csv"] ) {
+ [dump appendString:[self csvForArray:tableArray
+ useFirstLine:[exportMultipleFieldNamesSwitch state]
+ terminatedBy:[exportMultipleFieldsTerminatedField stringValue]
+ enclosedBy:[exportMultipleFieldsEnclosedField stringValue]
+ escapedBy:[exportMultipleFieldsEscapedField stringValue]
+ lineEnds:[exportMultipleLinesTerminatedField stringValue]
+ silently:YES]];
+ } else if ( [type isEqualToString:@"xml"] ) {
+ [dump appendString:[self xmlForArray:tableArray tableName:tableName withHeader:NO silently:YES]];
+ }
+//set progressbar and text
+ [singleProgressBar setDoubleValue:(k*100/tableCount)];
+ [singleProgressBar displayIfNeeded];
+ [dump appendString:@"\n\n\n"];
+ }
+ }
+
+//write xml end
+ if ( [type isEqualToString:@"xml"] ) {
+ [dump appendString:[NSString stringWithFormat:@"</%@>",
+ [self htmlEscapeString:[tableDocumentInstance database]]]];
+ }
+
+//close progress sheet
+ [NSApp endSheet:singleProgressSheet];
+ [singleProgressSheet orderOut:nil];
+
+//show errors sheet if there have been errors
+ if ( [errors length] ) {
+ [errorsView setString:errors];
+ [NSApp beginSheet:errorsSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ [NSApp runModalForWindow:errorsSheet];
+
+ [NSApp endSheet:errorsSheet];
+ [errorsSheet orderOut:nil];
+ }
+
+ return [NSString stringWithString:dump];
+}
+
+- (NSString *)htmlEscapeString:(NSString *)string
+/*
+html escapes a string
+*/
+{
+ NSMutableString *mutableString = [NSMutableString stringWithString:string];
+
+ [mutableString replaceOccurrencesOfString:@"&" withString:@"&amp;"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [mutableString length])];
+ [mutableString replaceOccurrencesOfString:@"<" withString:@"&lt;"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [mutableString length])];
+ [mutableString replaceOccurrencesOfString:@">" withString:@"&gt;"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [mutableString length])];
+ [mutableString replaceOccurrencesOfString:@"\"" withString:@"&quot;"
+ options:NSLiteralSearch
+ range:NSMakeRange(0, [mutableString length])];
+
+ return [NSString stringWithString:mutableString];
+}
+
+- (NSArray *)arrayForString:(NSString *)string enclosed:(NSString *)enclosed
+ escaped:(NSString *)escaped terminated:(NSString *)terminated
+/*
+split a string by the terminated-character if this is not escaped
+if enclosed-character is given, ignores characters inside enclosed-characters
+*/
+{
+ NSMutableArray *tempArray = [NSMutableArray array];
+ BOOL inString = NO;
+ BOOL isEscaped = NO;
+ BOOL br = NO;
+ unsigned i, j, start;
+ char enc = nil;
+ char esc = nil;
+ char ter = nil;
+
+ //we take only first character by now (too complicated otherwise)
+ if ( [enclosed length] ) {
+ enc = [enclosed characterAtIndex:0];
+ }
+ if ( [escaped length] ) {
+ esc = [escaped characterAtIndex:0];
+ }
+ if ( [terminated length] ) {
+ ter = [terminated characterAtIndex:0];
+ }
+
+ start = 0;
+
+ for ( i = 0 ; i < [string length] ; i++ ) {
+ if ( inString ) {
+ //we are in a string
+ br = NO;
+ while ( !br ) {
+ if ( i >= [string length] ) {
+ //end of string -> no second enclose character found
+ br = YES;
+ } else if ( [string characterAtIndex:i] == enc ) {
+ //second enclose-character found
+ //enclose-character escaped?
+ isEscaped = NO;
+ j = 1;
+ while ( (i-j>0) && ([string characterAtIndex:(i-j)] == esc) ) {
+ isEscaped = !isEscaped;
+ j++;
+ }
+ if ( !isEscaped ) {
+ inString = NO;
+ br = YES;
+ }
+ }
+ if ( !br )
+ i++;
+ }
+ } else if ( [string characterAtIndex:i] == ter ) {
+ //terminated-character found
+ if ( [enclosed isEqualToString:@""] ) {
+ //check if terminated character is escaped
+ isEscaped = NO;
+ j = 1;
+ while ( (i-j>0) && ([string characterAtIndex:(i-j)] == esc) ) {
+ isEscaped = !isEscaped;
+ j++;
+ }
+ if ( !isEscaped ) {
+ [tempArray addObject:[string substringWithRange:NSMakeRange(start,(i-start))]];
+ start = i + 1;
+ }
+ } else {
+ //add object to array
+//NSLog([string substringWithRange:NSMakeRange(start,(i-start))]);
+ [tempArray addObject:[string substringWithRange:NSMakeRange(start,(i-start))]];
+ start = i + 1;
+ }
+ } else if ( [string characterAtIndex:i] == enc ) {
+ //enclosed-character found
+ inString = YES;
+ }
+ }
+//add rest of string to array
+ [tempArray addObject:[string substringWithRange:NSMakeRange(start,([string length]-start))]];
+
+ return [NSArray arrayWithArray:tempArray];
+}
+
+- (NSArray *)splitQueries:(NSString *)query
+/*
+splits the queries by ;'s which aren't inside any ", ' or ` characters
+*/
+{
+ NSMutableString *queries = [NSMutableString stringWithString:query];
+ NSMutableArray *queryArray = [NSMutableArray array];
+ char stringType = nil;
+ BOOL inString = NO;
+ BOOL escaped;
+ unsigned lineStart = 0;
+ unsigned i, j, x, currentLineLength;
+
+ //parse string
+ for ( i = 0 ; i < [queries length] ; i++ ) {
+ if ( inString ) {
+ //we are in a string
+ //look for end of string
+ for ( ; i < [queries length] ; i++ ) {
+ if ( (([queries characterAtIndex:i] == '`') && (stringType == '`')) ||
+ (([queries characterAtIndex:i] == stringType) && ([queries characterAtIndex:i-1] != '\\')) ) {
+ //back-tick or no backslash before string end -> end of string
+ inString = NO;
+ break;
+ } else if ( [queries characterAtIndex:i] == stringType ) {
+ //check if string end isn't escaped
+ escaped = YES;
+ j = 2;
+ currentLineLength = i - lineStart;
+ while ( ((currentLineLength-j)>0) && ([queries characterAtIndex:i-j] == '\\') ) {
+ escaped = !escaped;
+ j++;
+ }
+ if ( !escaped ) {
+ //it's really the end of the string
+ inString = NO;
+ }
+ }
+ }
+ } else if ( ([queries characterAtIndex:i] == '#') ||
+ ((i+2<[queries length]) &&
+ ([queries characterAtIndex:i] == '-') &&
+ ([queries characterAtIndex:i+1] == '-') &&
+ ([queries characterAtIndex:i+2] == ' ')) ) {
+ //it's a comment -> delete it
+ x = i;
+ while ( (x<[queries length]) && ([queries characterAtIndex:x] != '\r') && ([queries characterAtIndex:x] != '\n') ) {
+ x++;
+ }
+ [queries deleteCharactersInRange:NSMakeRange(i,x-i)];
+ } else if ( [queries characterAtIndex:i] == ';' ) {
+ //we are at the end of a query
+ [queryArray addObject:[queries substringWithRange:NSMakeRange(lineStart, (i-lineStart))]];
+ while ( ((i+1)<[queries length]) && (([queries characterAtIndex:i+1]=='\n') || ([queries characterAtIndex:i+1]=='\r') || ([queries characterAtIndex:i+1]==' ')) ) {
+ i++;
+ }
+ lineStart = i + 1;
+ } else if ( ([queries characterAtIndex:i] == '\'') ||
+ ([queries characterAtIndex:i] == '"') ||
+ ([queries characterAtIndex:i] == '`') ) {
+ //we are entering a string
+ inString = YES;
+ stringType = [queries characterAtIndex:i];
+ }
+ }
+ //add rest of string to array (if last line has not ended with a ";")
+ if ( lineStart < [queries length] ) {
+ [queryArray addObject:[queries substringWithRange:NSMakeRange(lineStart, ([queries length]-lineStart))]];
+ }
+ //return array
+ return [NSArray arrayWithArray:queryArray];
+}
+
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection
+/*
+sets the connection (received from TableDocument) and makes things that have to be done only once
+*/
+{
+ NSButtonCell *switchButton = [[NSButtonCell alloc] init];
+
+ prefs = [[NSUserDefaults standardUserDefaults] retain];
+
+ mySQLConnection = theConnection;
+
+//set up the interface
+ [switchButton setButtonType:NSSwitchButton];
+ [switchButton setControlSize:NSSmallControlSize];
+ [[exportDumpTableView tableColumnWithIdentifier:@"switch"] setDataCell:switchButton];
+ [[exportMultipleCSVTableView tableColumnWithIdentifier:@"switch"] setDataCell:switchButton];
+ [[exportMultipleXMLTableView tableColumnWithIdentifier:@"switch"] setDataCell:switchButton];
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [[[exportDumpTableView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [[[exportMultipleCSVTableView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [[[exportMultipleXMLTableView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [[[fieldMappingTableView tableColumnWithIdentifier:@"0"] dataCell]
+ setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ [errorsView setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ } else {
+ [[[exportDumpTableView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[[exportMultipleCSVTableView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[[exportMultipleXMLTableView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[[fieldMappingTableView tableColumnWithIdentifier:@"0"] dataCell]
+ setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [errorsView setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ }
+// [self reloadTables:self];
+}
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+{
+ if ( aTableView == fieldMappingTableView ) {
+ return [fieldMappingArray count];
+ } else {
+ return [tables count];
+ }
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ if ( aTableView == fieldMappingTableView ) {
+ return [[fieldMappingArray objectAtIndex:rowIndex] objectAtIndex:[[aTableColumn identifier] intValue]];
+ } else {
+ if ( [[aTableColumn identifier] isEqualToString:@"switch"] ) {
+ return [[tables objectAtIndex:rowIndex] objectAtIndex:0];
+ } else {
+ return [[tables objectAtIndex:rowIndex] objectAtIndex:1];
+ }
+ }
+}
+
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ if ( aTableView == fieldMappingTableView ) {
+ int i;
+ for ( i = 0 ; i < [fieldMappingArray count] ; i++ ) {
+ //check that field isn't already used
+ if ( [[[fieldMappingArray objectAtIndex:i] objectAtIndex:1] isEqualToNumber:anObject]
+ && (rowIndex != i)
+ && ![anObject isEqualToNumber:[NSNumber numberWithInt:0]] ) {
+ return;
+ }
+ }
+ [[fieldMappingArray objectAtIndex:rowIndex] replaceObjectAtIndex:[[aTableColumn identifier] intValue] withObject:anObject];
+ } else {
+ [[tables objectAtIndex:rowIndex] replaceObjectAtIndex:0 withObject:anObject];
+ }
+}
+
+
+//last but not least
+- (id)init;
+{
+ self = [super init];
+
+ tables = [[NSMutableArray alloc] init];
+
+ return self;
+}
+
+- (void)dealloc
+{
+// NSLog(@"TableDump dealloc");
+
+ [tables release];
+ [importArray release];
+ [fieldMappingArray release];
+ [savePath release];
+ [openPath release];
+ [prefs release];
+
+ [super dealloc];
+}
+
+
+@end
diff --git a/TableSource.h b/TableSource.h
new file mode 100644
index 00000000..2346313a
--- /dev/null
+++ b/TableSource.h
@@ -0,0 +1,125 @@
+//
+// TableSource.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+
+
+@interface TableSource : NSObject {
+
+ IBOutlet id tablesListInstance;
+
+ IBOutlet id tableWindow;
+ IBOutlet id indexSheet;
+ IBOutlet id keySheet;
+ IBOutlet id tableSourceView;
+ IBOutlet id indexView;
+ IBOutlet id addFieldButton;
+ IBOutlet id copyFieldButton;
+ IBOutlet id removeFieldButton;
+ IBOutlet id addIndexButton;
+ IBOutlet id removeIndexButton;
+ IBOutlet id indexTypeField;
+ IBOutlet id indexNameField;
+ IBOutlet id indexedColumnsField;
+ IBOutlet id chooseKeyButton;
+ IBOutlet id tableTypeButton;
+
+ CMMCPConnection *mySQLConnection;
+ CMMCPResult *tableSourceResult;
+ CMMCPResult *indexResult;
+
+ NSString *selectedTable;
+ NSString *tableType;
+ NSMutableArray *tableFields, *indexes;
+ NSMutableDictionary *oldRow, *enumFields;
+ NSDictionary *defaultValues;
+ BOOL isEditingRow, isEditingNewRow, alertSheetOpened;
+ NSUserDefaults *prefs;
+}
+
+//table methods
+- (void)loadTable:(NSString *)aTable;
+- (IBAction)reloadTable:(id)sender;
+
+//edit methods
+- (IBAction)addField:(id)sender;
+- (IBAction)copyField:(id)sender;
+- (IBAction)addIndex:(id)sender;
+- (IBAction)removeField:(id)sender;
+- (IBAction)removeIndex:(id)sender;
+- (IBAction)typeChanged:(id)sender;
+
+//index sheet methods
+- (IBAction)openIndexSheet:(id)sender;
+- (IBAction)closeIndexSheet:(id)sender;
+- (IBAction)chooseIndexType:(id)sender;
+- (void)closeAlertSheet;
+
+//key sheet methods
+- (IBAction)closeKeySheet:(id)sender;
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection;
+- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult;
+- (BOOL)addRowToDB;
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
+
+//getter methods
+- (NSString *)defaultValueForField:(NSString *)field;
+- (NSArray *)fieldNames;
+- (NSDictionary *)enumFields;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//tableView drag&drop datasource methods
+- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard;
+- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+ proposedDropOperation:(NSTableViewDropOperation)operation;
+- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation;
+
+//tableView delegate methods
+- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command;
+
+//slitView delegate methods
+- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview;
+- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset;
+- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset;
+
+//last but not least
+- (id)init;
+- (void)dealloc;
+
+@end
diff --git a/TableSource.m b/TableSource.m
new file mode 100644
index 00000000..cd2d0132
--- /dev/null
+++ b/TableSource.m
@@ -0,0 +1,1157 @@
+//
+// TableSource.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "TableSource.h"
+#import "TablesList.h"
+
+
+@implementation TableSource
+
+- (void)loadTable:(NSString *)aTable
+/*
+loads aTable, put it in an array, update the tableViewColumns and reload the tableView
+*/
+{
+ NSEnumerator *enumerator;
+ id field;
+ NSScanner *scanner = [NSScanner alloc];
+ NSArray *extrasArray;
+ NSMutableDictionary *tempDefaultValues;
+ NSEnumerator *extrasEnumerator;
+ id extra;
+ int i;
+
+ selectedTable = aTable;
+ [tableSourceView deselectAll:self];
+ if ( isEditingRow )
+ return;
+
+ // empty variables
+ [enumFields removeAllObjects];
+
+ //query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ if ( [aTable isEqualToString:@""] || !aTable ) {
+ [tableFields removeAllObjects];
+ [indexes removeAllObjects];
+ [tableSourceView reloadData];
+ [indexView reloadData];
+ [addFieldButton setEnabled:NO];
+ [copyFieldButton setEnabled:NO];
+ [removeFieldButton setEnabled:NO];
+ [addIndexButton setEnabled:NO];
+ [removeIndexButton setEnabled:NO];
+
+ // set the table type menu back to the default, and disable it
+ [tableTypeButton selectItemAtIndex:0];
+ [tableTypeButton setEnabled:NO];
+ tableType = nil;
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ [scanner release];
+
+ return;
+ }
+
+//perform queries and load results in array (each row as a dictionary)
+ tableSourceResult = [[mySQLConnection queryString:[NSString stringWithFormat:@"SHOW COLUMNS FROM `%@`", selectedTable]] retain];
+// listFieldsFromTable is broken in the current version of the framework (no back-ticks for table name)!
+// tableSourceResult = [[mySQLConnection listFieldsFromTable:selectedTable] retain];
+// [tableFields setArray:[[self fetchResultAsArray:tableSourceResult] retain]];
+ [tableFields setArray:[self fetchResultAsArray:tableSourceResult]];
+ [tableSourceResult release];
+ indexResult = [[mySQLConnection queryString:[NSString stringWithFormat:@"SHOW INDEX FROM `%@`", selectedTable]] retain];
+// [indexes setArray:[[self fetchResultAsArray:indexResult] retain]];
+ [indexes setArray:[self fetchResultAsArray:indexResult]];
+ [indexResult release];
+ CMMCPResult *tableStatusResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", selectedTable]];
+ [tableType release];
+ NSDictionary *tempRow = [tableStatusResult fetchRowAsDictionary];
+ if ( [tempRow objectForKey:@"Type"]) {
+ tableType = [tempRow objectForKey:@"Type"];
+ } else {
+ tableType = [tempRow objectForKey:@"Engine"];
+ }
+ [tableType retain];
+//get table default values
+ if ( defaultValues ) {
+ [defaultValues release];
+ defaultValues = nil;
+ }
+ tempDefaultValues = [NSMutableDictionary dictionary];
+ for ( i = 0 ; i < [tableFields count] ; i++ ) {
+ [tempDefaultValues setObject:[[tableFields objectAtIndex:i] objectForKey:@"Default"] forKey:[[tableFields objectAtIndex:i] objectForKey:@"Field"]];
+ }
+ defaultValues = [[NSDictionary dictionaryWithDictionary:tempDefaultValues] retain];
+//put field length and extras in separate key
+ enumerator = [tableFields objectEnumerator];
+ while ( (field = [enumerator nextObject]) ) {
+ NSString *type;
+ NSString *length;
+ NSString *extras;
+ // scan for length and extras like unsigned
+ [scanner initWithString:[field objectForKey:@"Type"]];
+ [scanner scanUpToString:@"(" intoString:&type];
+ [scanner scanString:@"(" intoString:nil];
+ if ( ![scanner scanUpToString:@")" intoString:&length] )
+ length = @"";
+ [scanner scanString:@")" intoString:nil];
+ if ( ![scanner scanUpToString:@"" intoString:&extras] ) {
+ extras = @"";
+ }
+ // get possible values if field is enum or set
+ if ( [type isEqualToString:@"enum"] || [type isEqualToString:@"set"] ) {
+ NSMutableArray *possibleValues = [[[length substringWithRange:NSMakeRange(1,[length length]-2)] componentsSeparatedByString:@"','"] mutableCopy];
+ NSMutableString *possibleValue = [NSMutableString string];
+ for ( i = 0 ; i < [possibleValues count] ; i++ ) {
+ [possibleValue setString:[possibleValues objectAtIndex:i]];
+ [possibleValue replaceOccurrencesOfString:@"''" withString:@"'" options:nil range:NSMakeRange(0,[possibleValue length])];
+ [possibleValue replaceOccurrencesOfString:@"\\\\" withString:@"\\" options:nil range:NSMakeRange(0,[possibleValue length])];
+ [possibleValues replaceObjectAtIndex:i withObject:[NSString stringWithString:possibleValue]];
+ }
+ [enumFields setObject:[NSArray arrayWithArray:possibleValues] forKey:[field objectForKey:@"Field"]];
+ [possibleValues release];
+ }
+
+ // scan extras for values like unsigned, zerofill, binary
+ extrasArray = [extras componentsSeparatedByString:@" "];
+ extrasEnumerator = [extrasArray objectEnumerator];
+ while ( (extra = [extrasEnumerator nextObject]) ) {
+ if ( [extra isEqualToString:@"unsigned"] ) {
+ [field setObject:@"1" forKey:@"unsigned"];
+ } else if ( [extra isEqualToString:@"zerofill"] ) {
+ [field setObject:@"1" forKey:@"zerofill"];
+ } else if ( [extra isEqualToString:@"binary"] ) {
+ [field setObject:@"1" forKey:@"binary"];
+ } else {
+ if ( ![extra isEqualToString:@""] )
+ NSLog(@"ERROR: unknown option in field definition: %@", extra);
+ }
+ }
+ [field setObject:type forKey:@"Type"];
+ [field setObject:length forKey:@"Length"];
+ }
+
+// Determine the table type
+ if ( ![tableType isKindOfClass:[NSNull class]] ) {
+ [tableTypeButton selectItemWithTitle:tableType];
+ [tableTypeButton setEnabled:YES];
+ } else {
+ [tableTypeButton selectItemWithTitle:@"--"];
+ [tableTypeButton setEnabled:NO];
+ }
+
+//enable buttons
+ [addFieldButton setEnabled:YES];
+ [copyFieldButton setEnabled:YES];
+ [removeFieldButton setEnabled:YES];
+ [addIndexButton setEnabled:YES];
+ [removeIndexButton setEnabled:YES];
+
+//add columns to indexedColumnsField
+ [indexedColumnsField removeAllItems];
+ enumerator = [tableFields objectEnumerator];
+ while ( (field = [enumerator nextObject]) ) {
+ [indexedColumnsField addItemWithObjectValue:[field objectForKey:@"Field"]];
+ }
+ if ( [tableFields count] < 10 ) {
+ [indexedColumnsField setNumberOfVisibleItems:[tableFields count]];
+ } else {
+ [indexedColumnsField setNumberOfVisibleItems:10];
+ }
+
+ [tableSourceView reloadData];
+ [indexView reloadData];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ [scanner release];
+}
+
+- (IBAction)reloadTable:(id)sender
+/*
+reloads the table (performing a new mysql-query)
+*/
+{
+ [self loadTable:selectedTable];
+}
+
+
+//edit methods
+- (IBAction)addField:(id)sender
+/*
+adds an empty row to the tableSource-array and goes into edit mode
+*/
+{
+/*
+ if ( ![self addRowToDB] )
+ return;
+*/
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ [tableFields addObject:[NSMutableDictionary
+ dictionaryWithObjects:[NSArray arrayWithObjects:@"",@"int",@"",@"0",@"0",@"0",@"YES",@"",[prefs stringForKey:@"nullValue"],@"None",nil]
+ forKeys:[NSArray arrayWithObjects:@"Field",@"Type",@"Length",@"unsigned",@"zerofill",@"binary",@"Null",@"Key",@"Default",@"Extra",nil]]];
+
+ isEditingRow = YES;
+ isEditingNewRow = YES;
+ [tableSourceView reloadData];
+ [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO];
+ [tableSourceView editColumn:0 row:[tableSourceView numberOfRows]-1 withEvent:nil select:YES];
+}
+
+- (IBAction)copyField:(id)sender
+/*
+copies a field and goes in edit mode for the new field
+*/
+{
+ NSMutableDictionary *tempRow;
+
+ if ( ![tableSourceView numberOfSelectedRows] )
+ return;
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ //add copy of selected row and go in edit mode
+ tempRow = [NSMutableDictionary dictionaryWithDictionary:[tableFields objectAtIndex:[tableSourceView selectedRow]]];
+ [tempRow setObject:[[tempRow objectForKey:@"Field"] stringByAppendingString:@"Copy"] forKey:@"Field"];
+ [tempRow setObject:@"" forKey:@"Key"];
+ [tempRow setObject:@"None" forKey:@"Extra"];
+ [tableFields addObject:tempRow];
+ isEditingRow = YES;
+ isEditingNewRow = YES;
+ [tableSourceView reloadData];
+ [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO];
+ [tableSourceView editColumn:0 row:[tableSourceView numberOfRows]-1 withEvent:nil select:YES];
+}
+
+- (IBAction)addIndex:(id)sender
+/*
+adds the index to the mysql-db and stops modal session with code 1 when success, 0 when error and -1 when no columns specified
+*/
+{
+ NSString *indexName;
+ NSArray *indexedColumns;
+ NSMutableArray *tempIndexedColumns = [NSMutableArray array];
+ NSEnumerator *enumerator;
+ NSString *string;
+
+ if ( [[indexedColumnsField stringValue] isEqualToString:@""] ) {
+ [NSApp stopModalWithCode:-1];
+ } else {
+ if ( [[indexNameField stringValue] isEqualToString:@"PRIMARY"] ) {
+ indexName = @"";
+ } else {
+ if ( [[indexNameField stringValue] isEqualToString:@""] )
+ {
+ indexName = @"";
+ } else {
+ indexName = [NSString stringWithFormat:@"`%@`", [indexNameField stringValue]];
+ }
+ }
+ indexedColumns = [[indexedColumnsField stringValue] componentsSeparatedByString:@","];
+ enumerator = [indexedColumns objectEnumerator];
+ while ( (string = [enumerator nextObject]) ) {
+ if ( ([string characterAtIndex:0] == ' ') ) {
+ [tempIndexedColumns addObject:[string substringWithRange:NSMakeRange(1,([string length]-1))]];
+ } else {
+ [tempIndexedColumns addObject:[NSString stringWithString:string]];
+ }
+ }
+
+ [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` ADD %@ %@ (`%@`)",
+ selectedTable, [indexTypeField titleOfSelectedItem], indexName,
+ [tempIndexedColumns componentsJoinedByString:@"`,`"]]];
+
+/*
+NSLog([NSString stringWithFormat:@"ALTER TABLE `%@` ADD %@ %@ (`%@`)",
+ selectedTable, [indexTypeField titleOfSelectedItem], indexName,
+ [[[indexedColumnsField stringValue] componentsSeparatedByString:@","] componentsJoinedByString:@"`,`"]]);
+*/
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [self loadTable:selectedTable];
+ [NSApp stopModalWithCode:1];
+ } else {
+ [NSApp stopModalWithCode:0];
+ }
+ }
+}
+
+- (IBAction)removeField:(id)sender
+/*
+opens alertsheet and asks for confirmation
+*/
+{
+ if ( ![tableSourceView numberOfSelectedRows] )
+ return;
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"removefield", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the field %@?", @"message of panel asking for confirmation for deleting field"),
+ [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"Field"]] );
+}
+
+- (IBAction)removeIndex:(id)sender
+/*
+opens alertsheet and asks for confirmation
+*/
+{
+ if ( ![indexView numberOfSelectedRows] )
+ return;
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"removeindex", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the index %@?", @"message of panel asking for confirmation for deleting index"),
+ [[indexes objectAtIndex:[indexView selectedRow]] objectForKey:@"Key_name"]] );
+}
+
+- (IBAction)typeChanged:(id)sender
+{
+ NSString* selectedItem = [sender titleOfSelectedItem];
+ if([selectedItem isEqualToString:@"--"] || [tableType isEqualToString:selectedItem]) {
+ [sender selectItemWithTitle:tableType];
+ } else {
+ // alert any listeners that we are about to perform a query.
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ NSString *query = [NSString stringWithFormat:@"ALTER TABLE `%@` TYPE = %@",selectedTable,selectedItem];
+ [mySQLConnection queryString:query];
+
+ // The query is now complete.
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ // Did the alter work? If so, we need to record the new data. If not, we must revert back to
+ // the previous state.
+ if([mySQLConnection getLastErrorID] == 0)
+ {
+ // Make sure "tableType" is changed and the status tab is flagged for reload...
+ [tableType release];
+ tableType = selectedItem;
+ [tableType retain];
+
+// [[NSNotificationCenter defaultCenter] postNotificationName:@"SelectedTableStatusHasChanged" object:self];
+ } else {
+ [sender selectItemWithTitle:tableType];
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't change table type.\nMySQL said: %@", @"message of panel when table type cannot be removed"), [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+}
+
+
+//index sheet methods
+- (IBAction)openIndexSheet:(id)sender
+/*
+opens the indexSheet
+*/
+{
+ int code = 0;
+
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return;
+
+ [indexTypeField selectItemAtIndex:0];
+ [indexNameField setEnabled:NO];
+ [indexNameField setStringValue:@"PRIMARY"];
+ [indexedColumnsField setStringValue:@""];
+
+ [NSApp beginSheet:indexSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:indexSheet];
+
+ [NSApp endSheet:indexSheet];
+ [indexSheet orderOut:nil];
+
+//code == -1 -> no columns specified
+//code == 0 -> error while adding index
+//code == 1 -> index added with succes OR sheet closed without adding index
+ if ( code == 0 ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't add index.\nMySQL said: %@", @"message of panel when index cannot be created"), [mySQLConnection getLastErrorMessage]]);
+ } else if ( code == -1 ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, @selector(closeAlertSheet), nil,
+ NSLocalizedString(@"Please insert the columns you want to index.", @"message of panel when no columns are specified to be indexed"));
+ }
+}
+
+- (IBAction)closeIndexSheet:(id)sender
+/*
+closes the indexSheet without adding the index (stops modal session with code 1)
+*/
+{
+ [NSApp stopModalWithCode:1];
+}
+
+- (IBAction)chooseIndexType:(id)sender
+/*
+invoked when user chooses an index type
+*/
+{
+ if ( [[indexTypeField titleOfSelectedItem] isEqualToString:@"PRIMARY KEY"] ) {
+ [indexNameField setEnabled:NO];
+ [indexNameField setStringValue:@"PRIMARY"];
+ } else {
+ [indexNameField setEnabled:YES];
+ if ( [[indexNameField stringValue] isEqualToString:@"PRIMARY"] )
+ [indexNameField setStringValue:@""];
+ }
+}
+
+- (void)closeAlertSheet
+/*
+reopens indexSheet after errorSheet (no columns specified)
+*/
+{
+ [self openIndexSheet:self];
+}
+
+//key sheet methods
+- (IBAction)closeKeySheet:(id)sender
+/*
+closes the keySheet
+*/
+{
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+
+//additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection
+/*
+sets the connection (received from TableDocument) and makes things that have to be done only once
+*/
+{
+ NSEnumerator *indexColumnsEnumerator = [[indexView tableColumns] objectEnumerator];
+ NSEnumerator *fieldColumnsEnumerator = [[tableSourceView tableColumns] objectEnumerator];
+ id indexColumn;
+ id fieldColumn;
+
+ mySQLConnection = theConnection;
+
+ prefs = [[NSUserDefaults standardUserDefaults] retain];
+
+//set up tableView
+ [tableSourceView registerForDraggedTypes:[NSArray arrayWithObjects:@"CocoaMySQLPasteboard", nil]];
+
+// [[[tableSourceView tableColumnWithIdentifier:@"Null"] dataCell] addItemsWithTitles:[NSArray arrayWithObjects:@"YES", @"NO", nil]];
+ [[[tableSourceView tableColumnWithIdentifier:@"unsigned"] dataCell] setImagePosition:NSImageOnly];
+ [[[tableSourceView tableColumnWithIdentifier:@"zerofill"] dataCell] setImagePosition:NSImageOnly];
+ [[[tableSourceView tableColumnWithIdentifier:@"binary"] dataCell] setImagePosition:NSImageOnly];
+
+ while ( (indexColumn = [indexColumnsEnumerator nextObject]) ) {
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [[indexColumn dataCell] setFont:[NSFont fontWithName:@"Monaco" size:10]];
+ }
+ }
+ while ( (fieldColumn = [fieldColumnsEnumerator nextObject]) ) {
+ if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ [[fieldColumn dataCell] setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ }
+ }
+}
+
+- (NSArray *)fetchResultAsArray:(CMMCPResult *)theResult
+/*
+fetches the result as an array with a dictionary for each row in it
+*/
+{
+ NSMutableArray *tempResult = [NSMutableArray array];
+ NSMutableDictionary *tempRow;
+ NSEnumerator *enumerator;
+ id key;
+ int i;
+
+ for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
+ [theResult dataSeek:i];
+ tempRow = [NSMutableDictionary dictionaryWithDictionary:[theResult fetchRowAsDictionary]];
+
+ //use NULL string from preferences instead of the NSNull oject returned by the framework
+ enumerator = [tempRow keyEnumerator];
+ while ( (key = [enumerator nextObject]) ) {
+ if ( [[tempRow objectForKey:key] isMemberOfClass:[NSNull class]] )
+ [tempRow setObject:[prefs objectForKey:@"nullValue"] forKey:key];
+ }
+ // change some fields to be more human-readable or GUI compatible
+ if ( [[tempRow objectForKey:@"Extra"] isEqualToString:@""] ) {
+ [tempRow setObject:@"None" forKey:@"Extra"];
+ }
+ if ( [[tempRow objectForKey:@"Null"] isEqualToString:@"YES"] ) {
+// [tempRow setObject:[NSNumber numberWithInt:0] forKey:@"Null"];
+ [tempRow setObject:@"YES" forKey:@"Null"];
+ } else {
+// [tempRow setObject:[NSNumber numberWithInt:1] forKey:@"Null"];
+ [tempRow setObject:@"NO" forKey:@"Null"];
+ }
+ [tempResult addObject:tempRow];
+ }
+
+ return tempResult;
+}
+
+- (BOOL)addRowToDB;
+/*
+tries to write row to mysql-db
+returns YES if row written to db, otherwies NO
+returns YES if no row is beeing edited and nothing has to be written to db
+*/
+{
+ NSDictionary *theRow;
+ NSMutableString *queryString;
+ int code;
+
+ if ( !isEditingRow || ![tableSourceView numberOfSelectedRows] )
+ return YES;
+ if ( alertSheetOpened )
+ return NO;
+
+ theRow = [tableFields objectAtIndex:[tableSourceView selectedRow]];
+
+ if ( isEditingNewRow ) {
+//ADD syntax
+ if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@",
+ selectedTable, [theRow objectForKey:@"Field"], [theRow objectForKey:@"Type"]];
+ } else {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@(%@)",
+ selectedTable, [theRow objectForKey:@"Field"], [theRow objectForKey:@"Type"],
+ [theRow objectForKey:@"Length"]];
+ }
+ } else {
+//CHANGE syntax
+ if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@",
+ selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"],
+ [theRow objectForKey:@"Type"]];
+ } else {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@(%@)",
+ selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"],
+ [theRow objectForKey:@"Type"], [theRow objectForKey:@"Length"]];
+ }
+ }
+//field specification
+ if ( [[theRow objectForKey:@"unsigned"] intValue] == 1 ) {
+ [queryString appendString:@" UNSIGNED"];
+ }
+ if ( [[theRow objectForKey:@"zerofill"] intValue] == 1 ) {
+ [queryString appendString:@" ZEROFILL"];
+ }
+ if ( [[theRow objectForKey:@"binary"] intValue] == 1 ) {
+ [queryString appendString:@" BINARY"];
+ }
+// if ( [[theRow objectForKey:@"Null"] isEqualToString:@"NO"] || [[theRow objectForKey:@"Null"] isEqualToString:@"NOT NULL"]
+// || [[theRow objectForKey:@"Null"] isEqualToString:@"no"] || [[theRow objectForKey:@"Null"] isEqualToString:@"not null"])
+ if ( [[theRow objectForKey:@"Null"] isEqualToString:@"NO"] )
+ [queryString appendString:@" NOT NULL"];
+ if ( ![[theRow objectForKey:@"Extra"] isEqualToString:@"auto_increment"] && !([[theRow objectForKey:@"Type"] isEqualToString:@"timestamp"] && [[theRow objectForKey:@"Default"] isEqualToString:@"NULL"]) ) {
+ if ( [[theRow objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) {
+ if ([[theRow objectForKey:@"Null"] isEqualToString:@"YES"] ) {
+ [queryString appendString:@" DEFAULT NULL "];
+ }
+ } else if ( [[theRow objectForKey:@"Type"] isEqualToString:@"timestamp"] && ([[theRow objectForKey:@"Default"] isEqualToString:@"CURRENT_TIMESTAMP"] || [[theRow objectForKey:@"Default"] isEqualToString:@"current_timestamp"]) ) {
+ [queryString appendString:@" DEFAULT CURRENT_TIMESTAMP "];
+ } else {
+ // [queryString appendString:[NSString stringWithFormat:@" DEFAULT \"%@\" ", [theRow objectForKey:@"Default"]]];
+ [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@' ", [mySQLConnection prepareString:[theRow objectForKey:@"Default"]]]];
+ }
+ } else {
+ [queryString appendString:@" "];
+ }
+ if ( ![[theRow objectForKey:@"Extra"] isEqualToString:@""] &&
+ ![[theRow objectForKey:@"Extra"] isEqualToString:@"None"] &&
+ [theRow objectForKey:@"Extra"] )
+ [queryString appendString:[theRow objectForKey:@"Extra"]];
+//asks to add an index to query if auto_increment is set and field isn't indexed
+ if ( [[theRow objectForKey:@"Extra"] isEqualToString:@"auto_increment"]
+ && ([[theRow objectForKey:@"Key"] isEqualToString:@""] || ![theRow objectForKey:@"Key"]) ) {
+ [chooseKeyButton selectItemAtIndex:0];
+ [NSApp beginSheet:keySheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:keySheet];
+
+ [NSApp endSheet:keySheet];
+ [keySheet orderOut:nil];
+ if ( code ) {
+ if ( [chooseKeyButton indexOfSelectedItem] == 0 ) {
+ [queryString appendString:@" PRIMARY KEY"];
+ } else {
+ [queryString appendString:[NSString stringWithFormat:@", ADD %@ (`%@`)",
+ [chooseKeyButton titleOfSelectedItem], [theRow objectForKey:@"Field"]]];
+ }
+ }
+ }
+ [mySQLConnection queryString:queryString];
+
+//NSLog(queryString);
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ isEditingRow = NO;
+ isEditingNewRow = NO;
+ [self loadTable:selectedTable];
+ return YES;
+ } else {
+ alertSheetOpened = YES;
+//problem: alert sheet doesn't respond to first click
+ if ( isEditingNewRow ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"addrow", [NSString stringWithFormat:NSLocalizedString(@"Couldn't add field %@.\nMySQL said: %@", @"message of panel when field cannot be added"),
+ [theRow objectForKey:@"Field"], [mySQLConnection getLastErrorMessage]]);
+ } else {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:),
+ nil, @"addrow", [NSString stringWithFormat:NSLocalizedString(@"Couldn't change field %@.\nMySQL said: %@", @"message of panel when field cannot be changed"),
+ [theRow objectForKey:@"Field"], [mySQLConnection getLastErrorMessage]]);
+ }
+ return NO;
+ }
+}
+
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+/*
+if contextInfo == addrow: remain in edit-mode if user hits OK, otherwise cancel editing
+if contextInfo == removefield: removes row from mysql-db if user hits ok
+if contextInfo == removeindex: removes index from mysql-db if user hits ok
+*/
+{
+ [sheet orderOut:self];
+
+ if ( [contextInfo isEqualToString:@"addrow"] ) {
+ alertSheetOpened = NO;
+ if ( returnCode == NSAlertDefaultReturn ) {
+ //problem: reentering edit mode for first cell doesn't function
+ [tableSourceView editColumn:0 row:[tableSourceView selectedRow] withEvent:nil select:YES];
+ } else {
+ if ( !isEditingNewRow ) {
+ [tableFields replaceObjectAtIndex:[tableSourceView selectedRow]
+ withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]];
+ isEditingRow = NO;
+ } else {
+ [tableFields removeObjectAtIndex:[tableSourceView selectedRow]];
+ isEditingRow = NO;
+ isEditingNewRow = NO;
+ }
+ }
+ [tableSourceView reloadData];
+ } else if ( [contextInfo isEqualToString:@"removefield"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+//remove row
+ [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP `%@`",
+ selectedTable, [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"Field"]]];
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [self loadTable:selectedTable];
+ } else {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove field %@.\nMySQL said: %@", @"message of panel when field cannot be removed"),
+ [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"Field"],
+ [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+ } else if ( [contextInfo isEqualToString:@"removeindex"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+//remove index
+ if ( [[[indexes objectAtIndex:[indexView selectedRow]] objectForKey:@"Key_name"] isEqualToString:@"PRIMARY"] ) {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP PRIMARY KEY", selectedTable]];
+ } else {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP INDEX `%@`",
+ selectedTable, [[indexes objectAtIndex:[indexView selectedRow]] objectForKey:@"Key_name"]]];
+ }
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ [self loadTable:selectedTable];
+ } else {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove index.\nMySQL said: %@", @"message of panel when index cannot be removed"), [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+ }
+}
+
+
+//getter methods
+- (NSString *)defaultValueForField:(NSString *)field
+/*
+get the default value for a specified field
+*/
+{
+ if ( ![defaultValues objectForKey:field] ) {
+ return [prefs objectForKey:@"nullValue"];
+ } else if ( [[defaultValues objectForKey:field] isMemberOfClass:[NSNull class]] ) {
+ return [prefs objectForKey:@"nullValue"];
+ } else {
+ return [defaultValues objectForKey:field];
+ }
+}
+
+- (NSArray *)fieldNames
+/*
+returns an array containing the field names of the selected table
+*/
+{
+ NSMutableArray *tempArray = [NSMutableArray array];
+ NSEnumerator *enumerator;
+ id field;
+
+ //load table if not already done
+ if ( ![tablesListInstance structureLoaded] ) {
+ [self loadTable:[tablesListInstance table]];
+ }
+ //get field names
+ enumerator = [tableFields objectEnumerator];
+ while ( (field = [enumerator nextObject]) ) {
+ [tempArray addObject:[field objectForKey:@"Field"]];
+ }
+
+ return [NSArray arrayWithArray:tempArray];
+}
+
+- (NSDictionary *)enumFields
+/*
+returns a dictionary containing enum/set field names as key and possible values as array
+*/
+{
+ return [NSDictionary dictionaryWithDictionary:enumFields];
+}
+
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ if ( aTableView == tableSourceView ) {
+ return [tableFields count];
+ } else {
+ return [indexes count];
+ }
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ id theRow, theValue;
+
+ if ( aTableView == tableSourceView ) {
+ theRow = [tableFields objectAtIndex:rowIndex];
+ } else {
+ theRow = [indexes objectAtIndex:rowIndex];
+ }
+ theValue = [theRow objectForKey:[aTableColumn identifier]];
+
+ return theValue;
+}
+
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ if ( !isEditingRow ) {
+ [oldRow setDictionary:[tableFields objectAtIndex:rowIndex]];
+ isEditingRow = YES;
+ }
+ if ( anObject ) {
+ [[tableFields objectAtIndex:rowIndex] setObject:anObject forKey:[aTableColumn identifier]];
+ } else {
+ [[tableFields objectAtIndex:rowIndex] setObject:@"" forKey:[aTableColumn identifier]];
+ }
+}
+
+//tableView drag&drop datasource methods
+- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray*)rows toPasteboard:(NSPasteboard*)pboard
+{
+ int originalRow;
+ NSArray *pboardTypes;
+
+ if ( ![self selectionShouldChangeInTableView:nil] )
+ return NO;
+
+ if ( ([rows count] == 1) && (tableView == tableSourceView) ) {
+ pboardTypes=[NSArray arrayWithObjects:@"CocoaMySQLPasteboard", nil];
+ originalRow = [[rows objectAtIndex:0] intValue];
+
+ [pboard declareTypes:pboardTypes owner:nil];
+ [pboard setString:[[NSNumber numberWithInt:originalRow] stringValue] forType:@"CocoaMySQLPasteboard"];
+
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+- (NSDragOperation)tableView:(NSTableView*)tableView validateDrop:(id <NSDraggingInfo>)info proposedRow:(int)row
+ proposedDropOperation:(NSTableViewDropOperation)operation
+{
+ NSArray *pboardTypes = [[info draggingPasteboard] types];
+ int originalRow;
+
+ if ([pboardTypes count] == 1 && row != -1)
+ {
+ if ([[pboardTypes objectAtIndex:0] isEqualToString:@"CocoaMySQLPasteboard"]==YES && operation==NSTableViewDropAbove)
+ {
+ originalRow = [[[info draggingPasteboard] stringForType:@"CocoaMySQLPasteboard"] intValue];
+
+ if (row != originalRow && row != (originalRow+1))
+ {
+ return NSDragOperationMove;
+ }
+ }
+ }
+
+ return NSDragOperationNone;
+}
+
+- (BOOL)tableView:(NSTableView*)tableView acceptDrop:(id <NSDraggingInfo>)info row:(int)row dropOperation:(NSTableViewDropOperation)operation
+{
+ int originalRow;
+ int destinationRow;
+ NSString *tempColName;
+ NSMutableString *queryString;
+ NSEnumerator *enumerator = [tableFields objectEnumerator];
+ id field;
+ NSMutableArray *fieldNames = [NSMutableArray array];
+ int i;
+
+
+ originalRow = [[[info draggingPasteboard] stringForType:@"CocoaMySQLPasteboard"] intValue];
+ destinationRow = row;
+
+ if ( ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Key"] isEqualToString:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Indexed fields cannot be moved!", @"message of panel when trying to move indexed field"));
+ return NO;
+ }
+
+/*
+//alertSheet would be better...
+//try to fix problem of lost values
+ if ( NSRunAlertPanel(@"Warning", [NSString stringWithFormat:@"All values for this field will be lost!\nField will be removed and a new field with the same options will be inserted at the desired position.\nThis is recommended only for empty columns!",
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"]],
+ @"Don't Move", @"Move", nil)
+ == NSAlertDefaultReturn ) {
+ return NO;
+ }
+*/
+
+//drop dragged column
+ //query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+ //find free column name
+ while ( (field = [enumerator nextObject]) ) {
+ [fieldNames addObject:[field objectForKey:@"Field"]];
+ }
+ i = 1;
+ while ( [fieldNames containsObject:[NSString stringWithFormat:@"%@_temp%d",
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"], i]] ) {
+ i++;
+ }
+ tempColName = [NSString stringWithFormat:@"%@_temp%d", [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"], i];
+ //add new column with temp name at desired position
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] isEqualToString:@""] ||
+ ![[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] )
+ {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@",
+ selectedTable,
+ tempColName,
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"]];
+ } else {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` ADD `%@` %@(%@)",
+ selectedTable,
+ tempColName,
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"],
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Length"]];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"unsigned"] intValue] == 1 ) {
+ [queryString appendString:@" UNSIGNED"];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"zerofill"] intValue] == 1 ) {
+ [queryString appendString:@" ZEROFILL"];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"binary"] intValue] == 1 ) {
+ [queryString appendString:@" BINARY"];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Null"] isEqualToString:@"NO"] )
+ [queryString appendString:@" NOT NULL"];
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) {
+ [queryString appendString:@" DEFAULT NULL "];
+ } else {
+// [queryString appendString:[NSString stringWithFormat:@" DEFAULT \"%@\" ",
+// [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]];
+ [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@' ",
+ [mySQLConnection prepareString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]];
+ }
+/*
+ if ( ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:@""] )
+ [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@'",
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]];
+ [queryString appendString:@" "];
+*/
+ if ( [[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] &&
+ ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] isEqualToString:@"None"] )
+ [queryString appendString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"]];
+ if ( destinationRow == 0 ) {
+ [queryString appendString:@" FIRST"];
+ } else {
+ [queryString appendString:[NSString stringWithFormat:@" AFTER `%@`",
+ [[tableFields objectAtIndex:destinationRow-1] objectForKey:@"Field"]]];
+ }
+ [mySQLConnection queryString:queryString];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't add field. MySQL said: %@", @"message of panel when field cannot be added in drag&drop operation"), [mySQLConnection getLastErrorMessage]]);
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ return NO;
+ }
+ //copy field values from old to new column
+ queryString = [NSString stringWithFormat:@"UPDATE `%@` SET `%@`=`%@`",
+ selectedTable,
+ tempColName,
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"]];
+ [mySQLConnection queryString:queryString];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't copy field values. MySQL said: %@", @"message of panel when field content cannot be copied in drag&drop operation"), [mySQLConnection getLastErrorMessage]]);
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ return NO;
+ }
+ //drop old column
+ [mySQLConnection queryString:[NSString stringWithFormat:@"ALTER TABLE `%@` DROP `%@`",
+ selectedTable, [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"]]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove field. MySQL said: %@", @"message of panel when old field cannot be removed in drag&drop operation"), [mySQLConnection getLastErrorMessage]]);
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ return NO;
+ }
+ //rename column to original name
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] isEqualToString:@""] ||
+ ![[tableFields objectAtIndex:originalRow] objectForKey:@"Length"] )
+ {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@",
+ selectedTable,
+ tempColName,
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"],
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"]];
+ } else {
+ queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@(%@)",
+ selectedTable,
+ tempColName,
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Field"],
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Type"],
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Length"]];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"unsigned"] intValue] == 1 ) {
+ [queryString appendString:@" UNSIGNED"];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"zerofill"] intValue] == 1 ) {
+ [queryString appendString:@" ZEROFILL"];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"binary"] intValue] == 1 ) {
+ [queryString appendString:@" BINARY"];
+ }
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Null"] isEqualToString:@"NO"] )
+ [queryString appendString:@" NOT NULL"];
+/*
+ if ( ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:@""] )
+ [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@'",
+ [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]];
+ [queryString appendString:@" "];
+*/
+ if ( [[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"] isEqualToString:[prefs objectForKey:@"nullValue"]] ) {
+ [queryString appendString:@" DEFAULT NULL "];
+ } else {
+// [queryString appendString:[NSString stringWithFormat:@" DEFAULT \"%@\" ",
+// [[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]];
+ [queryString appendString:[NSString stringWithFormat:@" DEFAULT '%@' ",
+ [mySQLConnection prepareString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Default"]]]];
+
+ }
+ if ( [[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] &&
+ ![[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"] isEqualToString:@"None"] )
+ [queryString appendString:[[tableFields objectAtIndex:originalRow] objectForKey:@"Extra"]];
+ [mySQLConnection queryString:queryString];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't rename field. MySQL said: %@", @"message of panel when field cannot be renamed in drag&drop operation"), [mySQLConnection getLastErrorMessage]]);
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ return NO;
+ }
+
+ [self loadTable:selectedTable];
+ if ( originalRow < destinationRow ) {
+ [tableSourceView selectRow:destinationRow-1 byExtendingSelection:NO];
+ } else {
+ [tableSourceView selectRow:destinationRow byExtendingSelection:NO];
+ }
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ return YES;
+}
+
+//tableView delegate methods
+- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView
+{
+/*
+ int row = [tableSourceView editedRow];
+ int column = [tableSourceView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+ if ( row != -1 ) {
+ tableColumn = [[tableSourceView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[tableSourceView currentEditor]];
+ }
+*/
+//end editing (otherwise problems when user hits reload button)
+ [tableWindow endEditingFor:nil];
+
+ return [self addRowToDB];
+}
+
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
+/*
+traps enter and esc and make/cancel editing without entering next row
+*/
+{
+ int row, column;
+
+ row = [tableSourceView editedRow];
+ column = [tableSourceView editedColumn];
+
+ if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) //trap enter and tab
+ {
+ //save current line
+ [[control window] makeFirstResponder:control];
+ if ( column == 9 ) {
+ if ( [self addRowToDB] && [textView methodForSelector:command] == [textView methodForSelector:@selector(insertTab:)] ) {
+ if ( row < ([tableSourceView numberOfRows] - 1) ) {
+ [tableSourceView selectRow:row+1 byExtendingSelection:NO];
+ [tableSourceView editColumn:0 row:row+1 withEvent:nil select:YES];
+ } else {
+ [tableSourceView selectRow:0 byExtendingSelection:NO];
+ [tableSourceView editColumn:0 row:0 withEvent:nil select:YES];
+ }
+ }
+ } else {
+ if ( column == 2 ) {
+ [tableSourceView editColumn:column+4 row:row withEvent:nil select:YES];
+ } else if ( column == 6 ) {
+ [tableSourceView editColumn:column+2 row:row withEvent:nil select:YES];
+ } else {
+ [tableSourceView editColumn:column+1 row:row withEvent:nil select:YES];
+ }
+ }
+ return TRUE;
+ }
+ else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) //trap esc
+ {
+ //abort editing
+ [control abortEditing];
+ if ( isEditingRow && !isEditingNewRow ) {
+ isEditingRow = NO;
+ [tableFields replaceObjectAtIndex:row withObject:[NSMutableDictionary dictionaryWithDictionary:oldRow]];
+ } else if ( isEditingNewRow ) {
+ isEditingRow = NO;
+ isEditingNewRow = NO;
+ [tableFields removeObjectAtIndex:row];
+ [tableSourceView reloadData];
+ }
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+
+//slitView delegate methods
+- (BOOL)splitView:(NSSplitView *)sender canCollapseSubview:(NSView *)subview
+/*
+tells the splitView that it can collapse views
+*/
+{
+ return YES;
+}
+
+- (float)splitView:(NSSplitView *)sender constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset
+/*
+defines max position of splitView
+*/
+{
+ return proposedMax - 150;
+}
+
+- (float)splitView:(NSSplitView *)sender constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset
+/*
+defines min position of splitView
+*/
+{
+ return proposedMin + 150;
+}
+
+
+//last but not least
+- (id)init
+{
+ self = [super init];
+
+ tableFields = [[NSMutableArray alloc] init];
+ indexes = [[NSMutableArray alloc] init];
+ oldRow = [[NSMutableDictionary alloc] init];
+ enumFields = [[NSMutableDictionary alloc] init];
+
+ return self;
+}
+
+- (void)dealloc
+{
+// NSLog(@"TableSource dealloc");
+
+ [tableFields release];
+ [indexes release];
+ [oldRow release];
+ [defaultValues release];
+ [prefs release];
+ [enumFields release];
+
+ [super dealloc];
+}
+
+@end
diff --git a/TableStatus.h b/TableStatus.h
new file mode 100644
index 00000000..d01f81d2
--- /dev/null
+++ b/TableStatus.h
@@ -0,0 +1,63 @@
+//
+// TableContent.h
+// CocoaMySQL
+//
+// Created by Jason Hallford (jason.hallford@byu.edu) on Th July 08 2004.
+// CocoaMySQL Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+
+@interface TableStatus : NSObject
+{
+ IBOutlet id commentsBox;
+ IBOutlet id rowsNumber;
+ IBOutlet id rowsFormat;
+ IBOutlet id rowsAvgLength;
+ IBOutlet id rowsAutoIncrement;
+ IBOutlet id sizeData;
+ IBOutlet id sizeFree;
+ IBOutlet id sizeIndex;
+ IBOutlet id sizeMaxData;
+ IBOutlet id tableCreatedAt;
+ IBOutlet id tableName;
+ IBOutlet id tableType;
+ IBOutlet id tableUpdatedAt;
+
+ CMMCPConnection *mySQLConnection;
+ CMMCPResult *tableStatusResult;
+
+ NSString *selectedTable;
+ NSDictionary* statusFields;
+}
+
+// Table methods
+- (void)loadTable:(NSString *)aTable;
+- (IBAction)reloadTable:(id)sender;
+
+// Additional methods
+- (void)setConnection:(CMMCPConnection *)theConnection;
+- (void)awakeFromNib;
+
+// Initialization
+- (id)init;
+@end
diff --git a/TableStatus.m b/TableStatus.m
new file mode 100644
index 00000000..f2ad1244
--- /dev/null
+++ b/TableStatus.m
@@ -0,0 +1,113 @@
+#import "TableStatus.h"
+
+@implementation TableStatus
+
+- (void)awakeFromNib
+{
+ // TODO: implement awake code.
+}
+
+- (void)setConnection:(CMMCPConnection *)theConnection
+{
+ mySQLConnection = theConnection;
+ [mySQLConnection retain];
+}
+
+- (NSString*)getSQLColumnValue:(NSString *)withName usingFields:(NSDictionary*)fields withLabel:(NSString*)label
+{
+ NSString* value = [fields objectForKey:withName];
+ if([value isKindOfClass:[NSNull class]])
+ {
+ value = @"--";
+ }
+
+ NSString* labelVal = [NSString stringWithFormat:@"%@: %@",label,value];
+
+ return labelVal;
+}
+
+- (void)loadTable:(NSString *)aTable
+{
+ // Store the table name away for future use...
+ selectedTable = aTable;
+
+ // Notify any listeners that a query is about to begin...
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ // no table selected
+ if([aTable isEqualToString:@""] || !aTable) {
+ [tableName setStringValue:@"Name: --"];
+ [tableType setStringValue:@"Type: --"];
+ [tableCreatedAt setStringValue:@"Created At: --"];
+ [tableUpdatedAt setStringValue:@"Updated At: --"];
+
+ // Assign the row values...
+ [rowsNumber setStringValue:@"Number Of: --"];
+ [rowsFormat setStringValue:@"Format: --"];
+ [rowsAvgLength setStringValue:@"Avg. Length: --"];
+ [rowsAutoIncrement setStringValue:@"Auto Increment: --"];
+
+ // Assign the size values...
+ [sizeData setStringValue:@"Data: --"];
+ [sizeMaxData setStringValue:@"Max Data: --"];
+ [sizeIndex setStringValue:@"Index: --"];
+ [sizeFree setStringValue:@"Free: --"];
+
+ // Finally, set the value of the comments box
+ [commentsBox setStringValue:@"--"];
+
+ // Tell everyone we've finished with our query...
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+ return;
+ }
+
+ // Run the query to retrieve the status of the selected table. We'll then use this information to populate
+ // the associated view's controls.
+ tableStatusResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW TABLE STATUS LIKE '%@'", selectedTable]];
+
+ statusFields = [tableStatusResult fetchRowAsDictionary];
+
+ // Assign the table values...
+ [tableName setStringValue:[NSString stringWithFormat:@"Name: %@",selectedTable]];
+ if ( [statusFields objectForKey:@"Type"] ) {
+ [tableType setStringValue:[self getSQLColumnValue:@"Type" usingFields:statusFields withLabel:@"Type"]];
+ } else {
+ // mysql > 4.1
+ [tableType setStringValue:[self getSQLColumnValue:@"Engine" usingFields:statusFields withLabel:@"Type"]];
+ }
+ [tableCreatedAt setStringValue:[self getSQLColumnValue:@"Create_time" usingFields:statusFields withLabel:@"Created At"]];
+ [tableUpdatedAt setStringValue:[self getSQLColumnValue:@"Update_time" usingFields:statusFields withLabel:@"Updated At"]];
+
+ // Assign the row values...
+ [rowsNumber setStringValue:[self getSQLColumnValue:@"Rows" usingFields:statusFields withLabel:@"Number Of"]];
+ [rowsFormat setStringValue:[self getSQLColumnValue:@"Row_format" usingFields:statusFields withLabel:@"Format"]];
+ [rowsAvgLength setStringValue:[self getSQLColumnValue:@"Avg_row_length" usingFields:statusFields withLabel:@"Avg. Length"]];
+ [rowsAutoIncrement setStringValue:[self getSQLColumnValue:@"Auto_increment" usingFields:statusFields withLabel:@"Auto Increment"]];
+
+ // Assign the size values...
+ [sizeData setStringValue:[self getSQLColumnValue:@"Data_length" usingFields:statusFields withLabel:@"Data"]];
+ [sizeMaxData setStringValue:[self getSQLColumnValue:@"Max_data_length" usingFields:statusFields withLabel:@"Max Data"]];
+ [sizeIndex setStringValue:[self getSQLColumnValue:@"Index_length" usingFields:statusFields withLabel:@"Index"]];
+ [sizeFree setStringValue:[self getSQLColumnValue:@"Data_free" usingFields:statusFields withLabel:@"Free"]];
+
+ // Finally, assign the comments...
+ [commentsBox setStringValue:[statusFields objectForKey:@"Comment"]];
+
+ // Tell everyone we've finished with our query...
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+
+ return;
+}
+
+- (IBAction)reloadTable:(id)sender
+{
+ [self loadTable:selectedTable];
+}
+
+- (id)init
+{
+ self = [super init];
+
+ return self;
+}
+@end
diff --git a/TablesList.h b/TablesList.h
new file mode 100644
index 00000000..7b339584
--- /dev/null
+++ b/TablesList.h
@@ -0,0 +1,95 @@
+//
+// TablesList.h
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import <Cocoa/Cocoa.h>
+#import <MCPKit_bundled/MCPKit_bundled.h>
+#import "CMMCPConnection.h"
+#import "CMMCPResult.h"
+
+
+@interface TablesList : NSObject {
+
+ IBOutlet id tableDocumentInstance;
+ IBOutlet id tableSourceInstance;
+ IBOutlet id tableContentInstance;
+ IBOutlet id customQueryInstance;
+ IBOutlet id tableDumpInstance;
+ IBOutlet id tableStatusInstance;
+
+ IBOutlet id tableWindow;
+ IBOutlet id copyTableSheet;
+ IBOutlet id tablesListView;
+ IBOutlet id copyTableNameField;
+ IBOutlet id copyTableContentSwitch;
+ IBOutlet id tabView;
+
+ CMMCPConnection *mySQLConnection;
+ NSMutableArray *tables;
+// NSUserDefaults *prefs;
+ BOOL structureLoaded, contentLoaded, statusLoaded, alertSheetOpened;
+}
+
+//IBAction methods
+- (IBAction)updateTables:(id)sender;
+- (IBAction)addTable:(id)sender;
+- (IBAction)removeTable:(id)sender;
+- (IBAction)copyTable:(id)sender;
+
+//alert sheet methods
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
+
+//copyTableSheet methods
+- (IBAction)closeCopyTableSheet:(id)sender;
+
+//additional methods
+- (void)removeTable;
+- (void)setConnection:(CMMCPConnection *)theConnection;
+- (void)doPerformQueryService:(NSString *)query;
+
+//getter methods
+- (NSString *)table;
+- (BOOL)structureLoaded;
+- (BOOL)contentLoaded;
+- (BOOL)statusLoaded;
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex;
+
+//tableView delegate methods
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command;
+- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
+- (void)tableViewSelectionDidChange:(NSNotification *)aNotification;
+
+//last but not least
+- (id)init;
+- (void)dealloc;
+
+@end
diff --git a/TablesList.m b/TablesList.m
new file mode 100644
index 00000000..8f750bb1
--- /dev/null
+++ b/TablesList.m
@@ -0,0 +1,655 @@
+//
+// TablesList.m
+// CocoaMySQL
+//
+// Created by lorenz textor (lorenz@textor.ch) on Wed May 01 2002.
+// Copyright (c) 2002-2003 Lorenz Textor. 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://cocoamysql.sourceforge.net/>
+// Or mail to <lorenz@textor.ch>
+
+#import "TablesList.h"
+#import "TableDocument.h"
+#import "TableSource.h"
+#import "TableContent.h"
+#import "TableDump.h"
+
+
+@implementation TablesList
+
+//IBAction methods
+- (IBAction)updateTables:(id)sender
+/*
+loads all table names in array tables and reload the tableView
+*/
+{
+ CMMCPResult *theResult;
+ int i;
+
+ //query started
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryWillBePerformed" object:self];
+
+ [tablesListView deselectAll:self];
+ [tables removeAllObjects];
+
+ theResult = [mySQLConnection listTables];
+ for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
+ [theResult dataSeek:i];
+ [tables addObject:[[theResult fetchRowAsArray] objectAtIndex:0]];
+ }
+ [tablesListView reloadData];
+
+ //query finished
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"SMySQLQueryHasBeenPerformed" object:self];
+}
+
+- (IBAction)addTable:(id)sender
+/*
+adds a new table to the tables-array (no changes in mysql-db)
+*/
+{
+ if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] ||
+ ![tableContentInstance selectionShouldChangeInTableView:nil] ||
+ ![tableDocumentInstance database] )
+ return;
+ [tableWindow endEditingFor:nil];
+
+ [tables addObject:@""];
+ [tablesListView reloadData];
+ [tablesListView selectRow:[tables count]-1 byExtendingSelection:NO];
+ [tablesListView editColumn:0 row:[tables count]-1 withEvent:nil select:YES];
+}
+
+- (IBAction)removeTable:(id)sender
+/*
+invoked when user hits the remove button
+alert sheet to ask user if he really wants to delete the table
+*/
+{
+ if ( ![tablesListView numberOfSelectedRows] )
+ return;
+ [tableWindow endEditingFor:nil];
+
+ if ( [tablesListView numberOfSelectedRows] == 1 ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self,
+ @selector(sheetDidEnd:returnCode:contextInfo:), nil,
+ @"removeRow", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the table %@?", @"message of panel asking for confirmation for deleting table"),
+ [tables objectAtIndex:[tablesListView selectedRow]]]);
+ } else {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"Delete", @"delete button"), NSLocalizedString(@"Cancel", @"cancel button"), nil, tableWindow, self,
+ @selector(sheetDidEnd:returnCode:contextInfo:), nil,
+ @"removeRow", [NSString stringWithFormat:NSLocalizedString(@"Do you really want to delete the selected tables?", @"message of panel asking for confirmation for deleting tables"),
+ [tables objectAtIndex:[tablesListView selectedRow]]]);
+ }
+}
+
+- (IBAction)copyTable:(id)sender
+/*
+copies a table, if desired with content
+*/
+{
+ CMMCPResult *queryResult;
+ NSScanner *scanner = [NSScanner alloc];
+ NSString *scanString;
+// NSArray *fieldNames;
+// NSArray *theRow;
+// NSMutableString *rowValue = [NSMutableString string];
+// NSMutableArray *fieldValues;
+ int code;
+// int rowCount, i, j;
+// BOOL errors = NO;
+
+ if ( [tablesListView numberOfSelectedRows] != 1 )
+ return;
+ if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] || ![tableContentInstance selectionShouldChangeInTableView:nil] )
+ return;
+ [tableWindow endEditingFor:nil];
+
+//open copyTableSheet
+ [copyTableNameField setStringValue:[NSString stringWithFormat:@"%@Copy", [tables objectAtIndex:[tablesListView selectedRow]]]];
+ [copyTableContentSwitch setState:NSOffState];
+ [NSApp beginSheet:copyTableSheet
+ modalForWindow:tableWindow modalDelegate:self
+ didEndSelector:nil contextInfo:nil];
+ code = [NSApp runModalForWindow:copyTableSheet];
+
+ [NSApp endSheet:copyTableSheet];
+ [copyTableSheet orderOut:nil];
+
+ if ( !code )
+ return;
+ if ( [[copyTableNameField stringValue] isEqualToString:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"Table must have a name.", @"message of panel when no name is given for table"));
+ return;
+ }
+
+//get table structure
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SHOW CREATE TABLE `%@`",
+ [tables objectAtIndex:[tablesListView selectedRow]]]];
+ if ( ![queryResult numOfRows] ) {
+//error while getting table structure
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't get table information.\nMySQL said: %@", @"message of panel when table information cannot be retrieved"), [mySQLConnection getLastErrorMessage]]);
+ } else {
+//insert new table name in create syntax and create new table
+ [scanner initWithString:[[queryResult fetchRowAsDictionary] objectForKey:@"Create Table"]];
+ [scanner scanUpToString:@"(" intoString:nil];
+ [scanner scanUpToString:@"" intoString:&scanString];
+ [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE TABLE `%@` %@", [copyTableNameField stringValue], scanString]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+//error while creating new table
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't create table.\nMySQL said: %@", @"message of panel when table cannot be created"), [mySQLConnection getLastErrorMessage]]);
+ } else {
+ if ( [copyTableContentSwitch state] == NSOnState ) {
+//copy table content
+/*
+ queryResult = [mySQLConnection queryString:[NSString stringWithFormat:@"SELECT * FROM `%@`",
+ [tables objectAtIndex:[tablesListView selectedRow]]]];
+ fieldNames = [queryResult fetchFieldNames];
+ rowCount = [queryResult numOfRows];
+ for ( i = 0 ; i < rowCount ; i++ ) {
+ [queryResult dataSeek:i];
+ theRow = [queryResult fetchRowAsArray];
+ fieldValues = [NSMutableArray array];
+ for ( j = 0 ; j < [theRow count] ; j++ ) {
+ if ( [[theRow objectAtIndex:j] isKindOfClass:[NSData class]] ) {
+// [rowValue setString:[[NSString alloc] initWithData:[theRow objectAtIndex:j]
+// encoding:[mySQLConnection encoding]]];
+ [rowValue setString:[mySQLConnection prepareBinaryData:[theRow objectAtIndex:j]]];
+ } else {
+ [rowValue setString:[mySQLConnection prepareString:[[theRow objectAtIndex:j] description]]];
+ }
+*/
+/*
+ //escape special characters
+ for ( u = 0 ; u < [rowValue length] ; u++ ) {
+ if ( [rowValue characterAtIndex:u] == '\\' ) {
+ [rowValue insertString:@"\\" atIndex:u];
+ u++;
+ } else if ( [rowValue characterAtIndex:u] == '"' ) {
+ [rowValue insertString:@"\\" atIndex:u];
+ u++;
+ }
+ }
+*/
+/*
+ if ( [[theRow objectAtIndex:j] isKindOfClass:[NSNull class]] ) {
+ [fieldValues addObject:@"NULL"];
+ } else {
+// [fieldValues addObject:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:rowValue]]];
+// [fieldValues addObject:[NSString stringWithFormat:@"\"%@\"", rowValue]];
+// [fieldValues addObject:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:rowValue]]];
+ [fieldValues addObject:[NSString stringWithFormat:@"'%@'", rowValue]];
+
+ }
+ }
+ [mySQLConnection queryString:[NSString stringWithFormat:@"INSERT INTO `%@` (`%@`) VALUES (%@)",
+ [copyTableNameField stringValue], [fieldNames componentsJoinedByString:@"`,`"],
+ [fieldValues componentsJoinedByString:@","]]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ errors = YES;
+ }
+ }
+ if ( errors )
+ NSBeginAlertSheet(@"Warning", @"OK", nil, nil, tableWindow, self, nil, nil, nil,
+ @"There have been errors while copying table content. Please control the new table.");
+*/
+ [mySQLConnection queryString:[NSString stringWithFormat:@"INSERT INTO `%@` SELECT * FROM `%@`",
+ [copyTableNameField stringValue], [tables objectAtIndex:[tablesListView selectedRow]]]];
+ if ( ![[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ NSBeginAlertSheet(NSLocalizedString(@"Warning", @"warning"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ NSLocalizedString(@"There have been errors while copying table content. Please control the new table.", @"message of panel when table content cannot be copied"));
+ }
+ }
+ [tables insertObject:[copyTableNameField stringValue] atIndex:[tablesListView selectedRow]+1];
+ [tablesListView reloadData];
+ [tablesListView selectRow:[tablesListView selectedRow]+1 byExtendingSelection:NO];
+ [tablesListView scrollRowToVisible:[tablesListView selectedRow]];
+ }
+ }
+}
+
+
+//alert sheet methods
+- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo
+/*
+method for alert sheets
+invoked when user wants to delete a table
+*/
+{
+ if ( [contextInfo isEqualToString:@"addRow"] ) {
+ alertSheetOpened = NO;
+ } else if ( [contextInfo isEqualToString:@"removeRow"] ) {
+ if ( returnCode == NSAlertDefaultReturn ) {
+ [sheet orderOut:self];
+ [self removeTable];
+ }
+ }
+}
+
+//copyTableSheet methods
+- (IBAction)closeCopyTableSheet:(id)sender
+/*
+closes copyTableSheet and stops modal session
+*/
+{
+ [NSApp stopModalWithCode:[sender tag]];
+}
+
+//additional methods
+- (void)removeTable;
+/*
+removes selected table(s) from mysql-db and tableView
+*/
+{
+ NSIndexSet *indexes = [tablesListView selectedRowIndexes];
+ NSString *errorText;
+ BOOL error = FALSE;
+ // get last index
+ unsigned currentIndex = [indexes lastIndex];
+ while (currentIndex != NSNotFound)
+ {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"DROP TABLE `%@`", [tables objectAtIndex:currentIndex]]];
+
+ if ( [[mySQLConnection getLastErrorMessage] isEqualTo:@""] ) {
+ //dropped table with success
+ [tables removeObjectAtIndex:currentIndex];
+ } else {
+ //couldn't drop table
+ error = TRUE;
+ errorText = [mySQLConnection getLastErrorMessage];
+ }
+ // get next index (beginning from the end)
+ currentIndex = [indexes indexLessThanIndex:currentIndex];
+ }
+ [tablesListView deselectAll:self];
+// [tableSourceInstance loadTable:nil];
+// [tableContentInstance loadTable:nil];
+// [tableStatusInstance loadTable:nil];
+ [tablesListView reloadData];
+ // set window title
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
+ [tableDocumentInstance host], [tableDocumentInstance database]]];
+ if ( error )
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil,
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't remove table.\nMySQL said: %@", @"message of panel when table cannot be removed"), errorText]);
+}
+
+- (void)setConnection:(CMMCPConnection *)theConnection
+/*
+sets the connection (received from TableDocument) and makes things that have to be done only once
+*/
+{
+ mySQLConnection = theConnection;
+
+// prefs = [[NSUserDefaults standardUserDefaults] retain];
+
+//set smallSystemFonts
+// [[[tablesListView tableColumnWithIdentifier:@"tables"] dataCell] setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+// [copyTableNameField setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+// if ( [prefs boolForKey:@"useMonospacedFonts"] ) {
+ if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"useMonospacedFonts"] ) {
+ [[[tablesListView tableColumnWithIdentifier:@"tables"] dataCell]
+ setFont:[NSFont fontWithName:@"Monaco" size:[NSFont smallSystemFontSize]]];
+ }
+
+ [self updateTables:self];
+}
+
+- (void)doPerformQueryService:(NSString *)query
+/*
+selects customQuery tab and passes query to customQueryInstance
+*/
+{
+ [tabView selectTabViewItemAtIndex:2];
+ [customQueryInstance doPerformQueryService:query];
+}
+
+
+//getter methods
+- (NSString *)table
+/*
+returns the currently selected table or nil if no table or mulitple tables are selected
+*/
+{
+ if ( [tablesListView numberOfSelectedRows] == 1 ) {
+ return [tables objectAtIndex:[tablesListView selectedRow]];
+ } else {
+ return nil;
+ }
+}
+
+- (BOOL)structureLoaded
+/*
+returns YES if table source has already been loaded
+*/
+{
+ return structureLoaded;
+}
+
+- (BOOL)contentLoaded
+/*
+returns YES if table content has already been loaded
+*/
+{
+ return contentLoaded;
+}
+
+- (BOOL)statusLoaded
+/*
+returns YES if table status has already been loaded
+*/
+{
+ return statusLoaded;
+}
+
+
+//tableView datasource methods
+- (int)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ return [tables count];
+}
+
+- (id)tableView:(NSTableView *)aTableView
+ objectValueForTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+{
+ return [tables objectAtIndex:rowIndex];
+}
+
+- (void)tableView:(NSTableView *)aTableView
+ setObjectValue:(id)anObject
+ forTableColumn:(NSTableColumn *)aTableColumn
+ row:(int)rowIndex
+/*
+adds or renames a table (in tables-array and mysql-db)
+removes new table from table-array if renaming had no success
+*/
+{
+ if ( [[tables objectAtIndex:rowIndex] isEqualToString:@""] ) {
+//new table
+ if ( [anObject isEqualToString:@""] ) {
+ //table has no name
+ alertSheetOpened = YES;
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self,
+ @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow", NSLocalizedString(@"Table must have a name.", @"message of panel when no name is given for table"));
+ [tables removeObjectAtIndex:rowIndex];
+ [tablesListView reloadData];
+ } else {
+ if ( [tableDocumentInstance supportsEncoding] ) {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE TABLE `%@` (id int) DEFAULT CHARACTER SET %@", anObject, [tableDocumentInstance getSelectedEncoding]]];
+ } else {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"CREATE TABLE `%@` (id int)", anObject]];
+ }
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+ //added table with success
+// NSLog(@"added new table with success");
+ [tables replaceObjectAtIndex:rowIndex withObject:anObject];
+ if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) {
+ [tableSourceInstance loadTable:anObject];
+ structureLoaded = YES;
+ contentLoaded = NO;
+ statusLoaded = NO;
+ } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1 ) {
+ [tableSourceInstance loadTable:anObject];
+ [tableContentInstance loadTable:anObject];
+ structureLoaded = YES;
+ contentLoaded = YES;
+ statusLoaded = NO;
+ } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) {
+ [tableStatusInstance loadTable:anObject];
+ statusLoaded = YES;
+ structureLoaded = NO;
+ contentLoaded = NO;
+ } else {
+ statusLoaded = NO;
+ structureLoaded = NO;
+ contentLoaded = NO;
+ }
+ // set window title
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
+ [tableDocumentInstance host], [tableDocumentInstance database], anObject]];
+ } else {
+ //error while adding new table
+// NSLog(@"couldn't add new table");
+ alertSheetOpened = YES;
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self,
+ @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow",
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't add table %@.\nMySQL said: %@", @"message of panel when table cannot be created with the given name"),
+ anObject, [mySQLConnection getLastErrorMessage]]);
+ [tables removeObjectAtIndex:rowIndex];
+ [tablesListView reloadData];
+ }
+ }
+ } else {
+//table modification
+ if ( [[tables objectAtIndex:rowIndex] isEqualToString:anObject] ) {
+ //no changes in table name
+// NSLog(@"no changes in table name");
+ } else if ( [anObject isEqualToString:@""] ) {
+ //table has no name
+// NSLog(@"name is nil");
+ alertSheetOpened = YES;
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self,
+ @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow", NSLocalizedString(@"Table must have a name.", @"message of panel when no name is given for table"));
+ } else {
+ [mySQLConnection queryString:[NSString stringWithFormat:@"RENAME TABLE `%@` TO `%@`", [tables objectAtIndex:rowIndex], anObject]];
+ if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {
+// NSLog(@"renamed table with success");
+ //renamed with success
+ [tables replaceObjectAtIndex:rowIndex withObject:anObject];
+ if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) {
+ [tableSourceInstance loadTable:anObject];
+ structureLoaded = YES;
+ contentLoaded = NO;
+ statusLoaded = NO;
+ } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1 ) {
+ [tableSourceInstance loadTable:anObject];
+ [tableContentInstance loadTable:anObject];
+ structureLoaded = YES;
+ contentLoaded = YES;
+ statusLoaded = NO;
+ } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) {
+ [tableStatusInstance loadTable:anObject];
+ structureLoaded = NO;
+ contentLoaded = NO;
+ statusLoaded = YES;
+ } else {
+ statusLoaded = NO;
+ structureLoaded = NO;
+ contentLoaded = NO;
+ }
+ // set window title
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
+ [tableDocumentInstance host], [tableDocumentInstance database], anObject]];
+ } else {
+ //error while renaming
+// NSLog(@"couldn't rename table");
+ alertSheetOpened = YES;
+ NSBeginAlertSheet(NSLocalizedString(@"Error", @"error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self,
+ @selector(sheetDidEnd:returnCode:contextInfo:), nil, @"addRow",
+ [NSString stringWithFormat:NSLocalizedString(@"Couldn't rename table.\nMySQL said: %@", @"message of panel when table cannot be renamed"),
+ [mySQLConnection getLastErrorMessage]]);
+ }
+ }
+ }
+}
+
+//tableView delegate methods
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
+/*
+traps enter and esc and edit/cancel without entering next row
+*/
+{
+ if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] ) //trap enter
+ {
+ //save current line
+ [[control window] makeFirstResponder:control];
+ return TRUE;
+ }
+ else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) //trap esc
+ {
+ //abort editing
+ [control abortEditing];
+ if ( [[tables objectAtIndex:[tablesListView selectedRow]] isEqualToString:@""] ) {
+ //user added new table and then pressed escape
+ [tables removeObjectAtIndex:[tablesListView selectedRow]];
+ [tablesListView reloadData];
+ }
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView
+{
+/*
+ int row = [tablesListView editedRow];
+ int column = [tablesListView editedColumn];
+ NSTableColumn *tableColumn;
+ NSCell *cell;
+
+ if ( row != -1 ) {
+ tableColumn = [[tablesListView tableColumns] objectAtIndex:column];
+ cell = [tableColumn dataCellForRow:row];
+ [cell endEditing:[tablesListView currentEditor]];
+ }
+*/
+//end editing (otherwise problems when user hits reload button)
+ [tableWindow endEditingFor:nil];
+ if ( alertSheetOpened ) {
+ return NO;
+ }
+
+//we have to be sure that TableSource and TableContent have finished editing
+// if ( ![tableSourceInstance addRowToDB] || ![tableContentInstance addRowToDB] ) {
+ if ( ![tableSourceInstance selectionShouldChangeInTableView:nil] ||
+ ![tableContentInstance selectionShouldChangeInTableView:nil] ) {
+ return NO;
+ } else {
+ return YES;
+ }
+}
+
+- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
+/*
+loads a table in content or source view (if tab selected)
+*/
+{
+ if ( [tablesListView numberOfSelectedRows] == 1 ) {
+ if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0 ) {
+ [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ structureLoaded = YES;
+ contentLoaded = NO;
+ statusLoaded = NO;
+ } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1 ) {
+ [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ [tableContentInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ structureLoaded = YES;
+ contentLoaded = YES;
+ statusLoaded = NO;
+ } else if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 ) {
+ [tableStatusInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ structureLoaded = NO;
+ contentLoaded = NO;
+ statusLoaded = YES;
+ } else {
+ structureLoaded = NO;
+ contentLoaded = NO;
+ statusLoaded = NO;
+ }
+ // set window title
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
+ [tableDocumentInstance host], [tableDocumentInstance database], [tables objectAtIndex:[tablesListView selectedRow]]]];
+ } else {
+ [tableSourceInstance loadTable:nil];
+ [tableContentInstance loadTable:nil];
+ [tableStatusInstance loadTable:nil];
+ structureLoaded = NO;
+ contentLoaded = NO;
+ statusLoaded = NO;
+ // set window title
+ [tableWindow setTitle:[NSString stringWithFormat:@"(MySQL %@) %@@%@/%@", [tableDocumentInstance mySQLVersion], [tableDocumentInstance user],
+ [tableDocumentInstance host], [tableDocumentInstance database]]];
+ }
+}
+
+//tabView delegate methods
+- (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem
+/*
+loads structure or source if tab selected the first time
+*/
+{
+ if ( [tablesListView numberOfSelectedRows] == 1 )
+ {
+ if ( ([tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 0) && !structureLoaded )
+ {
+ [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ structureLoaded = YES;
+ }
+ if ( ([tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 1) && !contentLoaded )
+ {
+ if ( !structureLoaded ) {
+ [tableSourceInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ structureLoaded = YES;
+ }
+ [tableContentInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ contentLoaded = YES;
+ }
+ if ( ([tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3) && !statusLoaded )
+ {
+ [tableStatusInstance loadTable:[tables objectAtIndex:[tablesListView selectedRow]]];
+ statusLoaded = YES;
+ }
+ }
+/*
+ if ( [tabView indexOfTabViewItem:[tabView selectedTabViewItem]] == 3 )
+ {
+ [tableDumpInstance reloadTables:self];
+ }
+*/
+}
+
+
+//last but not least
+- (id)init
+{
+ self = [super init];
+
+ tables = [[NSMutableArray alloc] init];
+ structureLoaded = NO;
+ contentLoaded = NO;
+
+ return self;
+}
+
+- (void)dealloc
+{
+// NSLog(@"TableList dealloc");
+
+ [tables release];
+
+ [super dealloc];
+}
+
+
+@end
diff --git a/askForPass.sh b/askForPass.sh
new file mode 100755
index 00000000..b7ee81a7
--- /dev/null
+++ b/askForPass.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+PF=$*
+UUID=`uuidgen`
+mkfifo /tmp/$UUID
+SCRIPT=`echo tell application \"CocoaMySQL\" to authenticate tunnel \"$TUNNEL_NAME\" query phrase \"$PF\" fifo \"/tmp/$UUID\"`
+echo $SCRIPT > /tmp/test
+#PASS=`osascript -e "$SCRIPT"`;
+osascript -e "$SCRIPT" > /dev/null 2>&1
+#echo $PASS;
+PASS=`cat /tmp/$UUID`
+echo $PASS
+rm -f /tmp/$UUID \ No newline at end of file
diff --git a/gpl.html b/gpl.html
new file mode 100644
index 00000000..43277aa1
--- /dev/null
+++ b/gpl.html
@@ -0,0 +1 @@
+<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE>GNU General Public License - GNU Project - Free Software Foundation (FSF)</TITLE> <LINK REV="made" HREF="mailto:webmasters@www.gnu.org"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD"> <H1>GNU General Public License</H1> <P> <HR> <P> <H2>Table of Contents</H2> <UL> <LI><A NAME="TOC1" HREF="gpl.html#SEC1">GNU GENERAL PUBLIC LICENSE</A> <UL> <LI><A NAME="TOC2" HREF="gpl.html#SEC2">Preamble</A> <LI><A NAME="TOC3" HREF="gpl.html#SEC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A> <LI><A NAME="TOC4" HREF="gpl.html#SEC4">How to Apply These Terms to Your New Programs</A> </UL> </UL> <P> <HR> <P> <H2><A NAME="SEC1" HREF="gpl.html#TOC1">GNU GENERAL PUBLIC LICENSE</A></H2> <P> Version 2, June 1991 </P> <PRE> Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. </PRE> <H2><A NAME="SEC2" HREF="gpl.html#TOC2">Preamble</A></H2> <P> The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. </P> <P> When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. </P> <P> To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. </P> <P> For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. </P> <P> We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. </P> <P> Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. </P> <P> Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. </P> <P> The precise terms and conditions for copying, distribution and modification follow. </P> <H2><A NAME="SEC3" HREF="gpl.html#TOC3">TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</A></H2> <P> <STRONG>0.</STRONG> This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". <P> Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. <P> <STRONG>1.</STRONG> You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. <P> You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. <P> <STRONG>2.</STRONG> You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: <P> <UL> <LI><STRONG>a)</STRONG> You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. <P> <LI><STRONG>b)</STRONG> You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. <P> <LI><STRONG>c)</STRONG> If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) </UL> These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. <P> Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. <P> In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. <P> <STRONG>3.</STRONG> You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: <!---- we use this doubled UL to get the sub-sections indented, --> <!---- while making the bullets as unobvious as possible. --> <UL> <LI><STRONG>a)</STRONG> Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, <P> <LI><STRONG>b)</STRONG> Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, <P> <LI><STRONG>c)</STRONG> Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) </UL> The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. <P> If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. <P> <STRONG>4.</STRONG> You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. <P> <STRONG>5.</STRONG> You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. <P> <STRONG>6.</STRONG> Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. <P> <STRONG>7.</STRONG> If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. <P> If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. <P> It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. <P> This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. <P> <STRONG>8.</STRONG> If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. <P> <STRONG>9.</STRONG> The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. <P> Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. <P> <STRONG>10.</STRONG> If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. <P><STRONG>NO WARRANTY</STRONG></P> <P> <STRONG>11.</STRONG> BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. <P> <STRONG>12.</STRONG> IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. <P> <H2>END OF TERMS AND CONDITIONS</H2> <H2><A NAME="SEC4" HREF="gpl.html#TOC4">How to Apply These Terms to Your New Programs</A></H2> <P> If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. </P> <P> To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. </P> <PRE> <VAR>one line to give the program's name and an idea of what it does.</VAR> Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR> 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. </PRE> <P> Also add information on how to contact you by electronic and paper mail. </P> <P> If the program is interactive, make it output a short notice like this when it starts in an interactive mode: </P> <PRE> Gnomovision version 69, Copyright (C) <VAR>yyyy</VAR> <VAR>name of author</VAR> Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. </PRE> <P> The hypothetical commands <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP> should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than <SAMP>`show w'</SAMP> and <SAMP>`show c'</SAMP>; they could even be mouse-clicks or menu items--whatever suits your program. </P> <P> You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: </P> <PRE> Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <VAR>signature of Ty Coon</VAR>, 1 April 1989 Ty Coon, President of Vice </PRE> <P> This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. <HR> Return to <A HREF="http://www.gnu.org/home.html">GNU's home page</A>. <P> FSF &amp; GNU inquiries &amp; questions to <A HREF="mailto:gnu@gnu.org"><EM>gnu@gnu.org</EM></A>. Other <A HREF="http://www.gnu.org/home.html#ContactInfo">ways to contact</A> the FSF. <P> Comments on these web pages to <A HREF="mailto:webmasters@www.gnu.org"><EM>webmasters@www.gnu.org</EM></A>, send other questions to <A HREF="mailto:gnu@gnu.org"><EM>gnu@gnu.org</EM></A>. <P> Copyright notice above.<BR> Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA <P> Updated: <!---- hhmts start --> 16 Feb 1998 tower <!---- hhmts end --> <HR> <p>This page's HTML was slightly modified for offline use by Gordon Worley on 6.25.1999. No modifications were made to the GNU GPL itself.</p> </BODY> </HTML> \ No newline at end of file
diff --git a/gpl.txt b/gpl.txt
new file mode 100644
index 00000000..5b6e7c66
--- /dev/null
+++ b/gpl.txt
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/images/appicon.icns b/images/appicon.icns
new file mode 100755
index 00000000..9e834e68
--- /dev/null
+++ b/images/appicon.icns
Binary files differ
diff --git a/images/clearconsole.tiff b/images/clearconsole.tiff
new file mode 100644
index 00000000..ec7d181a
--- /dev/null
+++ b/images/clearconsole.tiff
Binary files differ
diff --git a/images/columnadd.tiff b/images/columnadd.tiff
new file mode 100644
index 00000000..1eaa8822
--- /dev/null
+++ b/images/columnadd.tiff
Binary files differ
diff --git a/images/columncopy.tiff b/images/columncopy.tiff
new file mode 100644
index 00000000..55848ac1
--- /dev/null
+++ b/images/columncopy.tiff
Binary files differ
diff --git a/images/columndelete.tiff b/images/columndelete.tiff
new file mode 100644
index 00000000..5ddee6ff
--- /dev/null
+++ b/images/columndelete.tiff
Binary files differ
diff --git a/images/columnrefresh.tiff b/images/columnrefresh.tiff
new file mode 100644
index 00000000..37ba5d75
--- /dev/null
+++ b/images/columnrefresh.tiff
Binary files differ
diff --git a/images/connectionadd.tiff b/images/connectionadd.tiff
new file mode 100644
index 00000000..73437571
--- /dev/null
+++ b/images/connectionadd.tiff
Binary files differ
diff --git a/images/connectioncopy.tiff b/images/connectioncopy.tiff
new file mode 100644
index 00000000..1072e270
--- /dev/null
+++ b/images/connectioncopy.tiff
Binary files differ
diff --git a/images/connectiondelete.tiff b/images/connectiondelete.tiff
new file mode 100644
index 00000000..edd40a9e
--- /dev/null
+++ b/images/connectiondelete.tiff
Binary files differ
diff --git a/images/connectionrefresh.tiff b/images/connectionrefresh.tiff
new file mode 100644
index 00000000..4dd27062
--- /dev/null
+++ b/images/connectionrefresh.tiff
Binary files differ
diff --git a/images/createtablesyntax.tiff b/images/createtablesyntax.tiff
new file mode 100644
index 00000000..0bf7f1a2
--- /dev/null
+++ b/images/createtablesyntax.tiff
Binary files differ
diff --git a/images/databases.tiff b/images/databases.tiff
new file mode 100644
index 00000000..f535fb2c
--- /dev/null
+++ b/images/databases.tiff
Binary files differ
diff --git a/images/dbadd.tiff b/images/dbadd.tiff
new file mode 100644
index 00000000..8b5a71ca
--- /dev/null
+++ b/images/dbadd.tiff
Binary files differ
diff --git a/images/dbdelete.tiff b/images/dbdelete.tiff
new file mode 100644
index 00000000..0b1c1eaf
--- /dev/null
+++ b/images/dbdelete.tiff
Binary files differ
diff --git a/images/dbrefresh.tiff b/images/dbrefresh.tiff
new file mode 100644
index 00000000..e85c6d1e
--- /dev/null
+++ b/images/dbrefresh.tiff
Binary files differ
diff --git a/images/flushprivileges.tiff b/images/flushprivileges.tiff
new file mode 100644
index 00000000..94c4fca1
--- /dev/null
+++ b/images/flushprivileges.tiff
Binary files differ
diff --git a/images/hideconsole.tiff b/images/hideconsole.tiff
new file mode 100644
index 00000000..d6c116ea
--- /dev/null
+++ b/images/hideconsole.tiff
Binary files differ
diff --git a/images/indexadd.tiff b/images/indexadd.tiff
new file mode 100644
index 00000000..b985d693
--- /dev/null
+++ b/images/indexadd.tiff
Binary files differ
diff --git a/images/indexdelete.tiff b/images/indexdelete.tiff
new file mode 100644
index 00000000..d692adf7
--- /dev/null
+++ b/images/indexdelete.tiff
Binary files differ
diff --git a/images/optimizetable.tiff b/images/optimizetable.tiff
new file mode 100644
index 00000000..761e44cd
--- /dev/null
+++ b/images/optimizetable.tiff
Binary files differ
diff --git a/images/query.tiff b/images/query.tiff
new file mode 100644
index 00000000..4d7d23e1
--- /dev/null
+++ b/images/query.tiff
Binary files differ
diff --git a/images/queryadd.tiff b/images/queryadd.tiff
new file mode 100644
index 00000000..e174b9b0
--- /dev/null
+++ b/images/queryadd.tiff
Binary files differ
diff --git a/images/querycopy.tiff b/images/querycopy.tiff
new file mode 100644
index 00000000..54f43e93
--- /dev/null
+++ b/images/querycopy.tiff
Binary files differ
diff --git a/images/querydelete.tiff b/images/querydelete.tiff
new file mode 100644
index 00000000..98e5a0c1
--- /dev/null
+++ b/images/querydelete.tiff
Binary files differ
diff --git a/images/queryrefresh.tiff b/images/queryrefresh.tiff
new file mode 100644
index 00000000..5d233769
--- /dev/null
+++ b/images/queryrefresh.tiff
Binary files differ
diff --git a/images/reload.tiff b/images/reload.tiff
new file mode 100644
index 00000000..40d020e5
--- /dev/null
+++ b/images/reload.tiff
Binary files differ
diff --git a/images/rowadd.tiff b/images/rowadd.tiff
new file mode 100644
index 00000000..9cc750b6
--- /dev/null
+++ b/images/rowadd.tiff
Binary files differ
diff --git a/images/rowcopy.tiff b/images/rowcopy.tiff
new file mode 100644
index 00000000..348a53ce
--- /dev/null
+++ b/images/rowcopy.tiff
Binary files differ
diff --git a/images/rowdelete.tiff b/images/rowdelete.tiff
new file mode 100644
index 00000000..8f5cd340
--- /dev/null
+++ b/images/rowdelete.tiff
Binary files differ
diff --git a/images/rowrefresh.tiff b/images/rowrefresh.tiff
new file mode 100644
index 00000000..09231808
--- /dev/null
+++ b/images/rowrefresh.tiff
Binary files differ
diff --git a/images/selectall.tiff b/images/selectall.tiff
new file mode 100644
index 00000000..17b35cad
--- /dev/null
+++ b/images/selectall.tiff
Binary files differ
diff --git a/images/selectnone.tiff b/images/selectnone.tiff
new file mode 100644
index 00000000..de505f10
--- /dev/null
+++ b/images/selectnone.tiff
Binary files differ
diff --git a/images/sheettotable.tiff b/images/sheettotable.tiff
new file mode 100644
index 00000000..90f7ccb7
--- /dev/null
+++ b/images/sheettotable.tiff
Binary files differ
diff --git a/images/showconsole.tiff b/images/showconsole.tiff
new file mode 100644
index 00000000..861be377
--- /dev/null
+++ b/images/showconsole.tiff
Binary files differ
diff --git a/images/showvariables.tiff b/images/showvariables.tiff
new file mode 100644
index 00000000..4c4b3400
--- /dev/null
+++ b/images/showvariables.tiff
Binary files differ
diff --git a/images/sort-down.tiff b/images/sort-down.tiff
new file mode 100644
index 00000000..3091b605
--- /dev/null
+++ b/images/sort-down.tiff
Binary files differ
diff --git a/images/sort-up.tiff b/images/sort-up.tiff
new file mode 100644
index 00000000..8c354ef4
--- /dev/null
+++ b/images/sort-up.tiff
Binary files differ
diff --git a/images/tableadd.tiff b/images/tableadd.tiff
new file mode 100644
index 00000000..792277d9
--- /dev/null
+++ b/images/tableadd.tiff
Binary files differ
diff --git a/images/tablecopy.tiff b/images/tablecopy.tiff
new file mode 100644
index 00000000..39e8bbdd
--- /dev/null
+++ b/images/tablecopy.tiff
Binary files differ
diff --git a/images/tabledelete.tiff b/images/tabledelete.tiff
new file mode 100644
index 00000000..a915bf8e
--- /dev/null
+++ b/images/tabledelete.tiff
Binary files differ
diff --git a/images/tablerefresh.tiff b/images/tablerefresh.tiff
new file mode 100644
index 00000000..f452b4bb
--- /dev/null
+++ b/images/tablerefresh.tiff
Binary files differ
diff --git a/images/tables.tiff b/images/tables.tiff
new file mode 100644
index 00000000..217dcd07
--- /dev/null
+++ b/images/tables.tiff
Binary files differ
diff --git a/images/tabletosheet.tiff b/images/tabletosheet.tiff
new file mode 100644
index 00000000..a35755e5
--- /dev/null
+++ b/images/tabletosheet.tiff
Binary files differ
diff --git a/images/textencode.tiff b/images/textencode.tiff
new file mode 100644
index 00000000..671ade4d
--- /dev/null
+++ b/images/textencode.tiff
Binary files differ
diff --git a/main.m b/main.m
new file mode 100644
index 00000000..b849d407
--- /dev/null
+++ b/main.m
@@ -0,0 +1,6 @@
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, const char *argv[])
+{
+ return NSApplicationMain(argc, argv);
+}