diff --git a/ChangeLog b/ChangeLog index 0fec89a..250e1a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,21 @@ * config/sqlite3.m4: New file. * configure.ac: Add detection for sqlite3. + * EOAdaptors/SQLiteAdaptor/SQLite3SQLExpression.m: Override + createDatabase method. + * configure: Regenerate. + * configure.ac: Change SUBPROJECTS to GUI_SUBPROJECTS to reflect what + its for. + * GNUmakefile.in: Ditto, and move so its compiled after EOInterface + * EOModeler/EOMInspector.h: Add IBOutlets. + * DBModeler/Inspectors/AttributeInspector.m: Remove unused ivar. + * DBModeler/Inspectors/GNUmakefile: Add AdvancedEntityInspector. + * DBModeler/Inspectors/AdvancedEntityInspector.[h,m,gorm]: New files. + * DBModeler/GNUmakefile: Remove subprojects hack. + * GDL2Palette/GNUmakefile: Ditto. + * GDL2Palette/ResourceManager.m: enable the creation of parent + assocation when creating a EOMasterDetailDisplayGroup. + 2006-09-28 Matt Rice * EOAccess/EOSQLExpression.m diff --git a/DBModeler/GNUmakefile b/DBModeler/GNUmakefile index 96d7058..dc9fd7a 100644 --- a/DBModeler/GNUmakefile +++ b/DBModeler/GNUmakefile @@ -28,9 +28,6 @@ GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT) include $(GNUSTEP_MAKEFILES)/common.make -SUBPROJECTS=../EOInterface ../EOModeler -include $(GNUSTEP_MAKEFILES)/aggregate.make - APP_NAME = DBModeler DBModeler_SUBPROJECTS=Inspectors diff --git a/DBModeler/Inspectors/AdvancedEntityInspector.gorm/data.classes b/DBModeler/Inspectors/AdvancedEntityInspector.gorm/data.classes new file mode 100644 index 0000000..92c121d --- /dev/null +++ b/DBModeler/Inspectors/AdvancedEntityInspector.gorm/data.classes @@ -0,0 +1,33 @@ +{ + "## Comment" = "Do NOT change this file, Gorm maintains it"; + AdvancedEntityInspector = { + Actions = ( + "setAbstractAction:", + "setReadOnlyAction:", + "setCachesObjectsAction:" + ); + Outlets = ( + abstract, + readOnly, + cachesObjects + ); + Super = EOMInspector; + }; + EOMInspector = { + Actions = ( + ); + Outlets = ( + window, + view + ); + Super = NSObject; + }; + FirstResponder = { + Actions = ( + "setCachesObjectsAction:", + "setAbstractAction:", + "setReadOnlyAction:" + ); + Super = NSObject; + }; +} \ No newline at end of file diff --git a/DBModeler/Inspectors/AdvancedEntityInspector.gorm/data.info b/DBModeler/Inspectors/AdvancedEntityInspector.gorm/data.info new file mode 100644 index 0000000..5ffe3d4 Binary files /dev/null and b/DBModeler/Inspectors/AdvancedEntityInspector.gorm/data.info differ diff --git a/DBModeler/Inspectors/AdvancedEntityInspector.gorm/objects.gorm b/DBModeler/Inspectors/AdvancedEntityInspector.gorm/objects.gorm new file mode 100644 index 0000000..be8bee6 Binary files /dev/null and b/DBModeler/Inspectors/AdvancedEntityInspector.gorm/objects.gorm differ diff --git a/DBModeler/Inspectors/AdvancedEntityInspector.h b/DBModeler/Inspectors/AdvancedEntityInspector.h new file mode 100644 index 0000000..e90eb06 --- /dev/null +++ b/DBModeler/Inspectors/AdvancedEntityInspector.h @@ -0,0 +1,38 @@ +/* + AdvancedEntityInspector.h + + Author: Matt Rice + Date: 2005, 2006 + + This file is part of DBModeler. + + DBModeler 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. + + DBModeler 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 DBModeler; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ +#include +#include +@class NSButton; + +@interface AdvancedEntityInspector : EOMInspector +{ + IBOutlet NSButton *abstract; + IBOutlet NSButton *readOnly; + IBOutlet NSButton *cachesObjects; +} + +- (IBAction) setAbstractAction:(id)sender; +- (IBAction) setReadOnlyAction:(id)sender; +- (IBAction) setCachesObjectsAction:(id)sender; +@end + diff --git a/DBModeler/Inspectors/AdvancedEntityInspector.m b/DBModeler/Inspectors/AdvancedEntityInspector.m new file mode 100644 index 0000000..18f3f1d --- /dev/null +++ b/DBModeler/Inspectors/AdvancedEntityInspector.m @@ -0,0 +1,58 @@ +/* + AdvancedEntityInspector.m + + Author: Matt Rice + Date: 2005, 2006 + + This file is part of DBModeler. + + DBModeler 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. + + DBModeler 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 DBModeler; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "AdvancedEntityInspector.h" +#include +#include +#include +#include + +@implementation AdvancedEntityInspector + +- (void) setReadOnlyAction:(id)sender +{ + [(EOEntity *)[self selectedObject] setReadOnly:[readOnly state] == NSOnState ? YES : NO]; +} + +- (void) setAbstractAction:(id)sender +{ + [(EOEntity *)[self selectedObject] setIsAbstractEntity:[abstract state] == NSOnState ? YES : NO]; +} + +- (void) setCachesObjectsAction:(id)sender +{ + [(EOEntity *)[self selectedObject] setCachesObjects:[cachesObjects state] == NSOnState ? YES : NO]; +} + +- (void) refresh +{ + [abstract setState:[(EOEntity *)[self selectedObject] isAbstractEntity] ? NSOnState : NSOffState]; + [readOnly setState:[(EOEntity *)[self selectedObject] isReadOnly] ? NSOnState : NSOffState]; + [cachesObjects setState:[(EOEntity *)[self selectedObject] cachesObjects] ? NSOnState : NSOffState]; +} + +- (BOOL) canInspectObject:(id)anObject +{ + return [anObject isKindOfClass:[EOEntity class]]; +} +@end diff --git a/DBModeler/Inspectors/AttributeInspector.m b/DBModeler/Inspectors/AttributeInspector.m index c2c2ce5..de8f695 100644 --- a/DBModeler/Inspectors/AttributeInspector.m +++ b/DBModeler/Inspectors/AttributeInspector.m @@ -86,7 +86,6 @@ - (NSString *) _titleForPopUp { NSString *vcn = [(EOAttribute *)[self selectedObject] valueClassName]; - NSString *valueType = [(EOAttribute *)[self selectedObject] valueType]; NSString *ret; ret = [_classTitleDict objectForKey:vcn]; diff --git a/DBModeler/Inspectors/GNUmakefile b/DBModeler/Inspectors/GNUmakefile index 84152cd..2b52cfa 100644 --- a/DBModeler/Inspectors/GNUmakefile +++ b/DBModeler/Inspectors/GNUmakefile @@ -40,4 +40,7 @@ Inspectors_OBJC_FILES+=RelationshipInspector.m Inspectors_RESOURCE_FILES+=AttributeInspector.gorm Inspectors_OBJC_FILES+=AttributeInspector.m +Inspectors_RESOURCE_FILES+=AdvancedEntityInspector.gorm +Inspectors_OBJC_FILES+=AdvancedEntityInspector.m + include $(GNUSTEP_MAKEFILES)/subproject.make diff --git a/EOAdaptors/SQLiteAdaptor/SQLite3Expression.m b/EOAdaptors/SQLiteAdaptor/SQLite3Expression.m index ece81c3..c425c05 100644 --- a/EOAdaptors/SQLiteAdaptor/SQLite3Expression.m +++ b/EOAdaptors/SQLiteAdaptor/SQLite3Expression.m @@ -149,6 +149,12 @@ static NSString *escapeString(NSString *value) return [NSArray array]; } ++ (NSArray *)createDatabaseStatementsForConnectionDictionary: (NSDictionary *)connDict + administrativeConnectionDictionary: (NSDictionary *)admConnDict +{ + return [NSArray array]; +} + // TODO find a better way to do this? + (NSArray *)primaryKeyConstraintStatementsForEntityGroup:(NSArray *)entityGroup { diff --git a/EOModeler/EOMInspector.h b/EOModeler/EOMInspector.h index 14790eb..006ba4f 100644 --- a/EOModeler/EOMInspector.h +++ b/EOModeler/EOMInspector.h @@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include @class NSArray; @@ -35,9 +36,9 @@ @interface EOMInspector : NSObject { - NSImage *image; - NSView *view; - NSWindow *window; + IBOutlet NSImage *image; + IBOutlet NSView *view; + IBOutlet NSWindow *window; } + (NSArray *)allRegisteredInspectors; + (NSArray *)allInspectorsThatCanInspectObject:(id)anObject; diff --git a/GDL2Palette/GNUmakefile b/GDL2Palette/GNUmakefile index 36b97cd..57da882 100644 --- a/GDL2Palette/GNUmakefile +++ b/GDL2Palette/GNUmakefile @@ -32,9 +32,6 @@ include ../gdl2.make PALETTE_NAME=GDL2 GDL2_PRINCIPAL_CLASS = GDL2Palette -SUBPROJECTS+=../EOModeler ../EOInterface -include $(GNUSTEP_MAKEFILES)/aggregate.make - ADDITIONAL_INCLUDE_DIRS+=-I../ ADDITIONAL_NATIVE_LIB_DIRS+=../EOAccess/ ../EOControl/ ../EOInterface ../EOModeler ADDITIONAL_NATIVE_LIBS+=EOAccess EOControl EOInterface EOModeler diff --git a/GDL2Palette/ResourceManager.m b/GDL2Palette/ResourceManager.m index 8ab32b2..98c6928 100644 --- a/GDL2Palette/ResourceManager.m +++ b/GDL2Palette/ResourceManager.m @@ -175,7 +175,7 @@ [[(id)NSApp activeDocument] addConnector: dsConn]; ds = [ds dataSourceQualifiedByKey:relName]; [detailDG setDataSource:ds]; -/* + assoc = [[EOMasterDetailAssociation alloc] initWithObject:detailDG]; [assoc bindAspect:@"parent" displayGroup:masterDG @@ -183,10 +183,9 @@ conn = [[EOAspectConnector alloc] initWithAssociation:assoc aspectName:@"parent"]; - [conn setSource:masterDG]; - [conn setDestination:detailDG]; - [conn setLabel:[NSString stringWithFormat:@"parent - %@",[pList objectAtIndex:2]]]; -*/ + [conn setSource:masterDG]; + [conn setDestination:detailDG]; + [conn setLabel:[NSString stringWithFormat:@"parent - %@",[pList objectAtIndex:2]]]; dsConn = [[NSNibOutletConnector alloc] init]; [dsConn setSource:ds]; diff --git a/GNUmakefile.in b/GNUmakefile.in index bfddb75..a530fed 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -39,7 +39,7 @@ SVN_BASE_URL=http://svn.gna.org/svn/gnustep/libs SUBPROJECTS = EOControl EOAccess EOAdaptors Tools ifeq ($(GUI_MAKE_LOADED),yes) -SUBPROJECTS += @SUBPROJECTS@ EOInterface EOModeler DBModeler +SUBPROJECTS += EOInterface EOModeler DBModeler @GUI_SUBPROJECTS@ endif DOCUMENT_NAME = GDL2 diff --git a/configure b/configure index 46d5a61..8933635 100755 --- a/configure +++ b/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PG_CONFIG CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP POSTGRES_DATABASE POSTGRES_INCLUDES POSTGRES_LIB_DIRS POSTGRES_LIBS PKGCONFIG SQLITE3_DATABASE SQLITE3_INCLUDES SQLITE3_LIB_DIRS SQLITE3_LIBS EOADAPTORS SUBPROJECTS VERSION MAJOR_VERSION MINOR_VERSION SUBMINOR_VERSION GCC_VERSION LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PG_CONFIG CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP POSTGRES_DATABASE POSTGRES_INCLUDES POSTGRES_LIB_DIRS POSTGRES_LIBS PKGCONFIG SQLITE3_DATABASE SQLITE3_INCLUDES SQLITE3_LIB_DIRS SQLITE3_LIBS EOADAPTORS GUI_SUBPROJECTS VERSION MAJOR_VERSION MINOR_VERSION SUBMINOR_VERSION GCC_VERSION LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3552,9 +3552,9 @@ if test "${enable_gorm_palette+set}" = set; then else enable_gorm_palette=yes fi; -SUBPROJECTS="" +GUI_SUBPROJECTS="" if test "$enable_gorm_palette" = "yes"; then - SUBPROJECTS="$SUBPROJECTS GDL2Palette" + GUI_SUBPROJECTS="$GUI_SUBPROJECTS GDL2Palette" fi @@ -4214,7 +4214,7 @@ s,@SQLITE3_INCLUDES@,$SQLITE3_INCLUDES,;t t s,@SQLITE3_LIB_DIRS@,$SQLITE3_LIB_DIRS,;t t s,@SQLITE3_LIBS@,$SQLITE3_LIBS,;t t s,@EOADAPTORS@,$EOADAPTORS,;t t -s,@SUBPROJECTS@,$SUBPROJECTS,;t t +s,@GUI_SUBPROJECTS@,$GUI_SUBPROJECTS,;t t s,@VERSION@,$VERSION,;t t s,@MAJOR_VERSION@,$MAJOR_VERSION,;t t s,@MINOR_VERSION@,$MINOR_VERSION,;t t diff --git a/configure.ac b/configure.ac index 40a4ca9..fb6baea 100644 --- a/configure.ac +++ b/configure.ac @@ -69,11 +69,11 @@ AC_SUBST(EOADAPTORS) AC_ARG_ENABLE(gorm-palette, [ --disable-gorm-palette to disable building gorm palette], , enable_gorm_palette=yes) -SUBPROJECTS="" +GUI_SUBPROJECTS="" if test "$enable_gorm_palette" = "yes"; then - SUBPROJECTS="$SUBPROJECTS GDL2Palette" + GUI_SUBPROJECTS="$GUI_SUBPROJECTS GDL2Palette" fi -AC_SUBST(SUBPROJECTS) +AC_SUBST(GUI_SUBPROJECTS) #-------------------------------------------------------------------- # Record the version