Commit graph

663 commits

Author SHA1 Message Date
Matt Rice
b24ec5f814 * DBModeler/Modeler.m (_newDocumentWithModel:): Don't release the
model.
        (-new:): Release the model here.
        (-newFromDatabase:): Ditto, and add error handling.
        (-open:): Ditto.
        (-application:openFile:): New method.
        * EOModeler/EOModelerDocument.m (-saveAs:): Add error handling, and
        remove check for an existing name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21445 72102866-910b-0410-8b05-ffd578937521
2005-07-10 19:45:21 +00:00
Matt Rice
fa5c582457 * DBModeler/GNUmakefile: Add Info-gnustep.plist to project.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21444 72102866-910b-0410-8b05-ffd578937521
2005-07-10 19:33:44 +00:00
Matt Rice
1761a012a1 * DBModeler/Resources/Info-gnustep.plist: New file.
* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Rearrange
        menu layout.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21443 72102866-910b-0410-8b05-ffd578937521
2005-07-10 19:24:35 +00:00
Matt Rice
225ff5a981 * DBModeler/ConsistencyChecker.m: New variable doc.
(+endConsistencyCheck:): Use the notification object. Use unsigned for
        array iterators.
        (pass): Use the new doc variable.
        (+attributeDetailsCheck:): Use unsigned for array iterators.
        (+inheritanceCheckForModel:, +relationshipCheckForModel:): Ditto.
        (+primaryKeyCheckForModel:, +externalNameCheckForModel): Ditto.
        (+modelConsistencyCheck:): Assign doc to the notification object.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21441 72102866-910b-0410-8b05-ffd578937521
2005-07-09 18:24:57 +00:00
Matt Rice
93221c9bc9 * EOModeler/EOMInspectorController.m (-init): Don't release the window
on close.
        (_selectionChanged:): Fix view swapping.  Set view as needing display.

        * EOModeler/EOModelExtensions.m:
        (+mutableAttributedStringWithBoldSubstitutionsWithFormat:): Implement.

        * EOModeler/EOModelerApp.h: Add -removeDocument:, -documentAtPath:,
        and -loadDocumentAtPath: methods.

        * EOModeler/EOModelerApp.m (-init:): Add parentheses around
        assignment.
        (-allPasteboardTypes): Initial implementation.
        (-removeDocument:): If removing the active document, set the active
        document to nil.
        (-documentWithPath:): Change array iterators to unsigned.
        (-registerColumNames:forClass:provider:): Ditto.
        (-modelContainingFetchSpecification:): Temporarily return nil.
        (-nameForFetchSpecification:): Ditto.

        * EOModeler/EOModelerDocument.h: Declare consistency check
        notification constants. Add -adaptor, -appendConsistencyCheckErrorText:,
        -appendConsistencyCheckSuccessText:, -addEntity:, -addRelationship,
        -addAttribute and -delete.

        * EOModeler/EOModelerDocument.m: Add consistency check notification
        constants.  Add private category interface.
        (-firstSelectionOfClass:): Change array iterators to unsigned.
        Remove debugging logs.
        (-validateMenuItem:): Initial implementation.
        (-initWithModel:): Add parentheses around assignment.  Add the model
        to the default model group.
        (-dealloc, -delete:): Initial implementation.
        (-isDirty, -prepareToSave,-checkCloseDocument): Return no temporarily
        until implemented.
        (-saveToPath:): Break long messages into separate lines.
        (-addDefaultEditor:, -addEntity:, -addAttribute:): Ditto.
        (-addRelationship:, ):
        (-activate): Remove commented out code.
        (-closeEditor:, -checkCloseEditor:): Add comments.
        (-canFlattenSelectedAttribute): Add temporary return value.
        (-windowWillClose:): Remove self from the open documents.
        (-checkConsistency:): Implement.
        (-appendConsistencyCheckErrorText:): Ditto.
        (-appendConsistencyCheckSuccessText:): Ditto.

        * EOModeler/EOModelerEditor.m (-initWithDocument:): Add parentheses
        around assignment.  Don't retain our document.
        (-selectionPath:, -viewedObjectPath): Return nil.
        (-[EOModelerCompoundEditor dealloc]): Implement.
        (-[EOModelerCompoundEditor initWithParentObject:): Add parentheses
        around assignment.
        (-[EOModelerEmbedibleEditor pathViewPreferenceHint:): Return nil.

        * EOModeler/GNUmakefile: Remove extra whitespace.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21440 72102866-910b-0410-8b05-ffd578937521
2005-07-09 17:44:40 +00:00
Matt Rice
b70ec2777a * EOInterface/EOAssociation.m: New variable _objectToAssociations.
(+objectDeallocated:): New private method.
(+initialize): initialize _objectToAssociations.
(-dealloc): Discard any pending notifications.
(-establishConnection): Retain display groups we're bound to.
Retain our self and register our object for dealloc notification.
(-breakConnection): Release display groups we're bound to. Release
our self and discard any pending notifications.
(-subjectChanged): Add comment

* EOInterface/EOColumnAssociation.m (-establishConnection): Assign our
dg ivar after establishing connection.  Use the dg ivar and move 2 if
statements into one.

* EOInterface/EODisplayGroup.m: Remove debugging class/category for
emptyArray and emptyDictionary.
(-indexesForObjectsIndeticalTo:): Fix typo by renaming to
-indexesForObjectsIdenticalTo:.
(-dealloc): Remove our self as an observer for any notifications,
as an editor or message handler for our editing context, our observer
proxies as observers from the observer center. Don't release
array/dictionary ivars that are emptyArray or emptyDictionary.
(-setSelectionIndexes:): Update to reflect change in method name.
(-deleteSelection): Remove unused local var.
(-fetch:): Call -redisplay.
(-updatedObjectIndex:): Return -1 instead of 0 until this is
implemented.
(-setValue:forObject:key:): fix comment in exception handlers.

* EOInterface/EOGenericControlAssociation.m:
(-subjectChanged:): Remove unused local variable.

* EOMasterDetailAssociation.m:
(-establishConnection, -breakConnection, -subjectChanged): Implement.

* EOInterface/EOPopUpAssociation.m: Remove unused local variables.

* EOInterface/EOTableViewAssociation.m:
(-breakConnection:): Remove our NSTableView object from the map table.
(-subjectChanged:): Remove unused local variables. Release temporary
retain on selection indexes.
(+bindToTableView:displayGroup:): Don't retain the table views in the
map table.  Release the newly created association.
(-dealloc): Remove self from the tvAssociationMap.

* EOInterface/SubclassFlags.h: Fix bitmask on MatchKey1AspectMask.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21439 72102866-910b-0410-8b05-ffd578937521
2005-07-09 03:01:22 +00:00
Matt Rice
91868e3d12 * DBModeler/AdaptorsPanel.m (-init): Add parenthesis around
assignment.   Replace label with window title.
(-runAdaptorsPanel:): Remove unused variable.

* DBModeler/DefaultColumnProvider.m: Add missing braces, remove
unused ivars.
(-cellForColumnNamed:): Autorelease cells.

* DBModeler/EOAdditions.m: New EOAttribute KVC methods -allowNull and
 -setAllowNull:.

* DBModeler/GNUmakefile: Add new to project.

* DBModeler/KVDataSource.m (-createObject:): Return nil after
throwing exception.

* DBModeler/MainModelEditor.m
(-dragImageForRows:event:dragImageOffset:):: Enable drag and
drop for relationships.
(-initWithDocument:): Add parenthesis around assignment. Don't
release the document window on close.
(-ecStuff:): temporarily reload everything in the outline view when
something changes.
(-viewSelectedObject:): Remove NSLog.  Rewrite editor activation.
Fix leaks.

* DBModeler/Modeler.m (-applicationWillFinishLaunching:): Add new menu
items. Don't order our menu in.
(-new:,-open:): Move document initializition to _newDocumentWithModel:.
(-_newDocumentWithModel:,-newFromDatabase:): New methods.
(-validateMenuItem:,-generateSQL:): Ditto.

* DBModeler/ModelerAttributeEditor.m (-initWithParentEditor:):
Remove unused variables.
(-displayGroupDidChangeSelection:): return early if there is no
longer a selection.

* DBModeler/ModelerEntityEditor.m:
(-canSupportCurrentSelection): Remove NSLog.
(-displayGroupDidChangeSelection:): Ditto.
(-dealloc:): New method.
(-initWithParentEditor:): Remove unused variables.  Add parens around
assignment.  Release local variables.

* DBModeler/ModelerTableEmbedibleEditor:
(-addDefaultTableColumnsForTableView:displayGroup:): Release table
 columns.
(-addTableColumnForItem:tableView:): Ditto.

* DBModeler/Inspectors/RelationshipInspector.m:
(-selectedEntity, -selectedDestinationAttribute): New methods.
(-selectedSourceAttribute, -indexOfSourceAttribute:): Ditto.
(-indexOfDestinationAttribute:,joinWithSource:destination:): Ditto.
(-selectedJoin:,updateConnectButton,): Ditto.
(-refresh): Rewrite using new methods.
(-numberOfRowsInTableView:): Add fallback return value.
(-tableView:objectValueForTableColumn:row:): Ditto.
(-tableView:selectionDidChange:): If a source or destination
attribute is now selected, select its counterpart.
(-tableView:shouldSelectRow:): New method to disallow entity
selection if there is a destination entity.
(-tableView:willDisplayCell:forTableColumn:row:): New method,
set the cell text color to disabled text color, if we would disallow
 selection.
(-connectionChanged:): Implement disconnection.

* DBModeler/SQLGenerator.h/m: New files initial implementation.
* DBModeler/Resources/SQLGenerator.gorm: Ditto.
* DBModeler/ConsistencyChecker.h/m: Ditto.
* DBModeler/ConsistencyResults.h/m: Ditto.
* DBModeler/ConsistencyResults.gorm: Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21438 72102866-910b-0410-8b05-ffd578937521
2005-07-09 02:07:42 +00:00
Matt Rice
22a14f5447 * EOAccess/EOAdaptorContext.h/m (-channels:): New method.
* EOAccess/EOSQLExpression.m
        (-_administrativeDatabaseStatementsForSelector:forEntityGroup:):
        Comment out login panel.
        * EOAccess/EOUtilities.m: Dont declare EOMoreThanOneException and
        NSObjectNotAvailableException as static.
        * EOControl/EOPrivate.h: Declare new class GDL2NonRetainingMutableArray
        and -registerAssociationForDeallocHack method.
        * EOControl/EOPrivate.m: New class GDL2NonRetainingMutableArray.
        * EOControl/EOEditingContext.m:
        (EOEditingContext -initWithParentObjectStore:): initialize _editors
        ivar with a non retaining array.
        (-dealloc): Remove the editing context as an observer for registered
        objects.
        (-[NSObject(DeallocHack) dealloc]): for associations, remove the
        association and object from the private hash table.
        (-[NSObject(DeallocHack) registerAssociationForDeallocHack]): New
        method.
        * EOControl/EOObserver.m (EOObserverCenter): Replace GSIArray usage
        with GDL2NonRetainingMutableArray.
        (+addObserver:forObject:, +removeObserver:forObject:): Ditto.
        (+initialize, +notifyObserversObjectWillChange:): Ditto.
        (+observersForObject:, +observerForObject:): Ditto.
        (+addOmniscientObserver:, +removeOmniscientObserver:): Ditto.
        (EOObserverProxy -initWithTarget:action:priority:): Don't retain
        target.
        (EOObserverProxy -dealloc:): Discard pending notifications.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21404 72102866-910b-0410-8b05-ffd578937521
2005-07-04 06:17:18 +00:00
David Ayers
73955163ff * EOControl/EODetailDataSource.m (masterClassDescription):
Only resort to EOClassDescription if _masterClassDescriptionName
        is set.  Otherwise ask the _masterDataSource for its
        classDescriptionForObjects.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21366 72102866-910b-0410-8b05-ffd578937521
2005-06-26 13:54:23 +00:00
Matt Rice
4ba78b33b4 * dev-apps/test/Testsuite/gdl2/GDL2Testing.h: Include ObjectTesting.h instead of stuff.h.
* dev-apps/test/Testsuite/gdl2/EOModel/test05.m: New test for -removeEntity:.

* dev-libs/gdl2/EOAccess/EOEntity.m (-_setModel:): Accept nil argument, comment.
* dev-libs/gdl2/EOAccess/EOModel.m (-removeEntity:): Comment.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21321 72102866-910b-0410-8b05-ffd578937521
2005-06-17 14:46:37 +00:00
Matt Rice
44d8935e49 * EOControl/EOObserver.m (EOObserverCenter): Don't retain
observers.
        Use a GSIArray instaed of NSMutableArray.
        (+addObserver:forObject:, +removeObserver:forObject:): Ditto.
        (+initialize, +notifyObserversObjectWillChange:): Ditto.
        (+observersForObject:, addOmniscientObserver:): Ditto.
        (+removeOmniscientObserver:): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21232 72102866-910b-0410-8b05-ffd578937521
2005-05-18 16:11:59 +00:00
Matt Rice
dc8101ef3f * GNUmakefile: remove GDL2Palette from top level compilation.
* GDL2Palette/GNUmakefile: Fix compilation flags, include
gdl2.make
        relative not the installed version.
        * DBModeler/GNUmakefile: Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21231 72102866-910b-0410-8b05-ffd578937521
2005-05-17 23:33:04 +00:00
Matt Rice
34bed39fc9 New files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21224 72102866-910b-0410-8b05-ffd578937521
2005-05-13 00:25:27 +00:00
Matt Rice
94ffb94a6c * GNUmakefile: Compile EOInterface, EOModeler, DBModeler,
GDL2Palette if gui is installed.
        * EOModeler/EOModelExtensions.h: Update copyright header.
        * EOModeler/EOModelExtensions.m: Ditto.
        * EOModeler/GNUmakefile: Make EOModeler a native-library,
	add new files.
        * EOModeler/Makefile.preamble: Change link flag to use
	FND_LIBS.
        * EOModeler/EODefines.h: New file, initial implementation.
        * EOModeler/EOMInspector.h/m: Ditto.
        * EOModeler/EOMInspectorController.h/m: Ditto.
        * EOModeler/EOModelerApp.h/m: Ditto.
        * EOModeler/EOModelerDocument.h/m: Ditto.
        * EOModeler/EOModelerEditor.h/m: Ditto.
        * DBModeler: New directory.
        * DBModeler/COPYING: New file...
        * DBModeler/AdaptorsPanel.h/m: New files.
        * DBModeler/DefaultColumnProvider.h/m: Ditto.
        * DBModeler/EOAdditions.h/m: Ditto.
        * DBModeler/KVDataSource.h/m: Ditto.
        * DBModeler/MainModelEdtior.h/m: Ditto.
        * DBModeler/Modeler.m: Ditto.
        * DBModeler/ModelerAttributeEditor.h/m: Ditto.
        * DBModeler/ModelerTableEmbedibleEditor.h/m: Ditto.
        * DBModeler/main.m: Ditto.
        * DBModeler/GNUmakefile: Ditto.
        * DBModeler/Resources: New directory.
        * DBModeler/Resources/ModelDrag.tiff: New file.
        * DBModeler/Resources/ClassProperty_On.tiff: Ditto.
        * DBModeler/Resources/Key_On.tiff: Ditto.
        * DBModeler/Inspectors: New directory.
        * DBModeler/Inspectors/RelationshipInspector.h/m: New files.
        * DBModeler/Inspectors/AttributeInspector.h/m: Ditto.
        * DBModeler/Inspectors/RelationshipInspector.gorm: New gorm
	directory.
        * DBModeler/Inspectors/AttributeInspector.gorm: Ditto.
        * GDL2Palette: New directory.
        * GDL2Palette/GNUmakefile: New file.
        * GDL2Palette/ConnectionInspector.h/m: Ditto.
        * GDL2Palette/Foundation+Categories.h/m: Ditto.
        * GDL2Palette/IB+Categories.m: Ditto.
        * GDL2Palette/Palette.h/m: Ditto.
        * GDL2Palette/ResourceManager.h/m: Ditto.
        * GDL2Palette/GDL2ConnectionInspector.gorm: Ditto.
        * GDL2Palette/GDL2Palette.tiff: Ditto
        * GDL2Palette/palette.table


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21223 72102866-910b-0410-8b05-ffd578937521
2005-05-13 00:00:56 +00:00
Matt Rice
e205cd1324 2005-05-12 Matt Rice <ratmice@yahoo.com>
* ChangeLog: Fix previous ChangeLog entry.
        * EOInterface/EOActionAssociation.m: Implemented aspects enabled and
        action.
        (-establishConnection): Implement
        (-breakConnection, -subjectChanged, -action): Ditto.
        * EOInterface/EOAssociation.m (-associationClassesForObject:): Fixed
        argument passed to -isUsableWithObject:. Assign count
        (-init): Assign self.
        (-establishConnection:): Add unused local variable to pass to
        NSNextMapEnumeratorPair instead of 0.
        (-breakConnection:): Ditto.
        (-initWithCoder:, -encodeWithCoder:): Initial implementation of
        methods.
        (-valueForAspect:,-setValue:forAspect:,-valueForAspect:atIndex:): Ditto.
        (-setValueForAspect:atIndex:): Ditto.
        * EOInterface/SubclassFlags.h: New file.
        * EOInterface/EOAspectConnector.h/m: New file and implementation.
        * EOInterface/EOColumnAssociation.m: Implemented aspects value and
        enabled
        (-objectKeysTaken): Take identifier key.
        (-establishConnection, -breakConnection, -endEditing): Implement
        methods.
        (-tableView:setObjectValueForTableColumn:row:): Ditto.
        (-tableView:objectValueForTableColumn:row:): Ditto.
        (-tableView:willDisplayCell:forTableColumn:row:): Ditto.
        (-control:didFailToFormatString:errorDescription:): Ditto.
        (-control:textShouldBeginEditing:): Ditto.
        * EOInterface/EOControlAssociation.m: (-control): Ditto
        (-editingAssociation, -establishConnection, -breakConnection): Ditto.
        * EOInterface/EOGenericControlAssociation.m: Implemented aspects value
        and enabled.
        (+objectKeysTaken): add target key.
        (-establishConnection: -breakConnection:, -subjectChanged:): Ditto.
        (-_action:, -endEditing, -control:textShouldBeginEditing:): Ditto.
        * EOInterface/EOMatrixAssociation.m: Implemented aspects image, title,
        and enabled.
        (-establishConnection, -breakConnection, -subjectChanged): Ditto.
        * EOInterface/EOPopUpAssociation.m: Implemented aspects titles,
        selectedTitle, selectedTag, selectedObject, enabled.
        (-initWithObject:, -_action:): Implemented method.
        (-establishConnection:, -breakConnection, -subjectChanged): Ditto.
        * EOInterface/EORadioMatrixAssociation.m: Implemented aspects
        selectedTag, selectedTitle, enabled.
        (NSCell -_selectCellWithTitle:): Private category.
        (-initWithObject:, -_action:): Implemented method.
        (-establishConnection:, -breakConnection, -subjectChanged): Ditto.
        * EOInterface/EOTableViewAssociation.m: Implemented aspects
	enabled, tableView.
        (-establishConnection, -breakConnection, subjectChanged): Implement
        method.
        (-bindToTableView:displayGroup:, -editingAssociation): Ditto.
        (-numberOfRowsInTableView:):
        (-tableView:setObjectValue:forTableColumn:row:): Ditto.
        (-tableView:objectValueForTableColumn:row:): Ditto.
        (-tableView:shouldEditTableColumn:row:): Ditto.
        (-tableView:willDisplayCell:forTableColumn:row:): Ditto.
        (-tableView:selectionDidChange:): Ditto.
        (-control:didFailToFormatString:errorDescription:): Ditto.
        (-control:isValidObject:, -control:textShouldBeginEditing:):
	Ditto.
        (-dealloc): Ditto.
        * EOInterface/EOTextAssociation.m: Implemented aspect value,
enabled.
        (-establishConnection): Implemented method.
        (-breakConnection, -subjectChanged, -endEditing): Ditto.
        (-control:isValidObject:,textShouldBeginEditing:): Ditto.
        (-textShouldEndEditing:): Ditto.
        * EOInterface/GNUmakefile: Make EOInterface a native-library, whitespace
        changes.
        * EOInterface/Makefile.preamble: Change linker flag to use FND_LIBS
        and GUI_LIBS variables.
        * EOInterface/EODisplayGroup.h: Comment on whether ivars are retained.
        * EOInterface/EODisplayGroup.m:
        (DG_SHOULD_CHANGE_SELECTION_TO_IDX): New macros.
        (DG_DISPLAY_ARRAY_FOR_OBJECTS, DG_SHOULD_DISPLAY_ALERT): Ditto.
        (DG_DID_FETCH_OBJECTS, DG_CREATE_OBJECT_FAILED): Ditto.
        (DG_SHOULD_INSERT_OBJECT, DG_DID_INSERT_OBJECT): Ditto.
        (DG_DID_CHANGE_SELECTION): Ditto.
        (NSArray -indexesForObjectsIdenticalTo:): Implement category method.
        (_presentAlertWithTitle:message:): New private methods.
        (-_endObserverNotification:): Implement notification observer methods.
        (-_beginObserverNotification:): Ditto.
        (-objectsInvalidatedInEditingContext:): Ditto.
        (-objectsChangedInEditingContext:): Ditto.
        (+initialize, -init, -initWithCoder:,): Implement methods.
        (-encodeWithCoder:, -setDataSource:, -fetch, -allObjects): Ditto.
        (-setObjectArray:, -redisplay, -updateDisplayedObjects): Ditto.
        (-selectionIndexes, -setSelectionIndexes, -selectObject): Ditto.
        (-selectObjectsIdenticalTo:, -clearSelection, -selectedObjects): Ditto.
        (-selectObjectsIdenticalTo:selectFirstOnNoMatch:): Ditto.
        (-setSelectedObjects, -selectedObject, -setSelectedObject:): Ditto.
        (-insertObjectAtIndex:, -insertObject:atIndex:): Ditto.
        (-setInsertedObjectDefaultValues:, -deleteSelection): Ditto.
        (-observingAssociations, -endEditing, -fetch:, -insert:): Ditto.
        (-selectionChanged, -contentsChanged, -valueForObject🔑): Ditto.
        (-selectedObjectValueForKey:, -valueForObjectAtIndex:): Ditto.
        (-setValue:forObject:key:, -setSelectedObjectValue:forKey:): Ditto.
        (-setValue:forObjectAtIndex:key:, -associationDidBeginEditing:):
	Ditto.
        (-associationDidEndEditing:): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21222 72102866-910b-0410-8b05-ffd578937521
2005-05-12 19:55:41 +00:00
Matt Rice
56ba650c5c * EOAccess/Makefile.preamble: Change link flag to use FND_LIBS
variable
        defined in base.make
        * EOControl/Makefile.preamble: Ditto.
        * EOAccess/EODatabaseDataSource.m (-entity): Look for entity with
the
        fetch specifications entity name in a model group.
        (-databaseContext): Return a registered database context.
        * EOAdaptors/Postgres95/LoginPanel/Postgres95LoginPanel.m: Cast
before
        calling -initWithIdentifier to remove warning with gcc 3.4
        * EOControl/EOEditingContext.m
(-encodeWithCoder:,-initWithCoder:):
        initial implementation of methods.
        * EOControl/EOClassDescription.m (-snapshot): cast 'value' to get
        thwart warnings.
        * EOControl/EOFault.m (-superClass): Implement as returning a
class.
        * Tools/gsdoc-model.m: Include headers alphabetically, include
        NSCalendarDate.h to thwart warning.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21221 72102866-910b-0410-8b05-ffd578937521
2005-05-12 19:13:34 +00:00
David Ayers
c4f61efc7b * EOControl/EOEditingContext.m (_mutableSetFromToManyArray:):
Add internal documentation.  Filter managed objects instead
        of attempting to convert gids to objects.  Reported by Manuel
        Guesdon.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21183 72102866-910b-0410-8b05-ffd578937521
2005-05-03 10:22:48 +00:00
Manuel Guesdon
dd40d225ec Fixes in EOControl/EOEditingContext.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21182 72102866-910b-0410-8b05-ffd578937521
2005-05-03 09:42:53 +00:00
Manuel Guesdon
2e0f2da446 fixed test error in EOAttribute -newValueForBytes:length:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21156 72102866-910b-0410-8b05-ffd578937521
2005-04-24 14:18:59 +00:00
Manuel Guesdon
9c4a91f7ce Fixes inEOAttribute.m and EOKeyValueARchiver.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21153 72102866-910b-0410-8b05-ffd578937521
2005-04-24 11:28:15 +00:00
Matt Rice
8bab203b96 * EOAdaptors/Postgres95/Postgres95Adaptor.m: Removed externalTypeNames
and internalTypeNames variables, replaced both with typeNames.
        (isValidQualifierType:model:): Use new variable.
        (externalToInternalTypeMap:): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21152 72102866-910b-0410-8b05-ffd578937521
2005-04-24 10:24:24 +00:00
David Ayers
d7ba99629e Fix bug reported by: jim _at_ uchicago dot edu.
* EOAccess/EOEntity.m (-primaryKeyRootName): Recurse to
	through primaryKeyRootName of parent entity.
        * EOAdaptors/Postgres95/Postgres95Channel.m
        (primaryKeyForNewRowWithEntity:): Use primaryKeyRootName to
        construct sequence name.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21126 72102866-910b-0410-8b05-ffd578937521
2005-04-19 14:14:37 +00:00
Manuel Guesdon
9d8277892a Implemeted things in EOKeyValueArchiver, put back David changes in
-adaptorValueByConvertingAttributeValue in EOAttribute.m


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21125 72102866-910b-0410-8b05-ffd578937521
2005-04-19 10:44:49 +00:00
David Ayers
4e6f3be218 Correct ChangeLog entry.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21071 72102866-910b-0410-8b05-ffd578937521
2005-04-07 09:01:26 +00:00
David Ayers
35cb784d79 * Tools/eoutil.m: Added -excludedEntities option when dumping;
added use of local autorelease pools; splitted SQL execution in
	different phases, to allow dropping then re-creating tables, in
	one shot; now fetches flattened or derived attributes; now can
	dump NSCalendarDate, NSData, NSNumber correctly; no longer tries
	to write (in db) flattened or derived or non class-property
	attributes; now ignores and log exceptions when -force option is
	used.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@21070 72102866-910b-0410-8b05-ffd578937521
2005-04-07 08:54:55 +00:00
Manuel Guesdon
8263986239 * EOControl/EOFault.m: added instanceMethodForSelector:
to temporary fix defaulting problem with
NSAutoreleasePool optimizations


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20917 72102866-910b-0410-8b05-ffd578937521
2005-03-17 14:57:28 +00:00
David Ayers
27d729bad3 * EOControl/EOKeyValueCoding: (-unableToSetNullForKey:):
Deprecate and call unableToSetNilForKey.
        (-setNilValueForKey:): Call unableToSetNilForKey.
        (-unableToSetNilForKey:): Use default implementation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20891 72102866-910b-0410-8b05-ffd578937521
2005-03-10 21:13:15 +00:00
David Ayers
c1baf1e562 * EOAccess/EORelationship.m (validateValue:): Document.
Remove unnecessary comments and code.  Handle EONulls.
        (+initialize): Implement.
        (+relationshipWithPropertyList:owner:): Move to top.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20840 72102866-910b-0410-8b05-ffd578937521
2005-03-03 17:36:16 +00:00
David Ayers
1f9afe4934 * EOAccess/EODatabaseContext.m (-forgetSnapshotForGlobalID:):
Handle deleted globalIDs correctly.
        (-forgetSnapshotsForGlobalIDs:): Ditto.
        (-_commitTransaction, -_beginTransaction): Ditto.
        (-_rollbackTransaction): Implement.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20836 72102866-910b-0410-8b05-ffd578937521
2005-03-03 14:00:42 +00:00
David Ayers
6a28dfbc6e * EOAccess/EOEntity.m (initWithPropertyList:owner:):
Reformatting for GNU coding standards.
        (-attributes): Fix memory leak.  Use global class cache.
        Handle partially converted attributes array.
        (-_attributeNameChangedFrom:to:): New privat method.
        * EOAccess/EOEntityPriv.h (-_attributeNameChangedFrom:to:):
        Declare new private method.
        * EOAccess/EOAttribute.m (setName:): Call
        -[EOEntity _attributeNameChangedFrom:to:] if attribute is in
        an EOEntity.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20835 72102866-910b-0410-8b05-ffd578937521
2005-03-03 12:17:57 +00:00
David Ayers
627c340174 * EOAccess/EOModel.m (setName:): Remove from group before
changing name and readd afterwards.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20831 72102866-910b-0410-8b05-ffd578937521
2005-03-02 15:34:57 +00:00
David Ayers
da6a07ec81 * EOControl/EOKeyValueCoding.h/m: (-setNilValueForKey:):
Override NSObject's category to invoke
        -unableToSetNullForKey:.

        * EOControl/EOSortOrdering.m: Include EONull.h instead of
        NSNull.h.

        * EOAccess/EODatabaseChannel.m: Update formatting,


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20830 72102866-910b-0410-8b05-ffd578937521
2005-03-02 14:10:36 +00:00
David Ayers
86b1325708 * EOAccess/EOAttribute.m, EOAccess/EODatabaseContext.m,
* EOAccess/EOEntity.m, EOAccess/EOSQLExpression.m
        * EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,
        * EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m
        * EOControl/EOClassDescription.m, EOControl/EOEditingContext.m
        * EOControl/EOGenericRecord.m, EOControl/EOKeyGlobalID.m
        * EOControl/EOKeyValueCoding.m,
        * EOControl/EOKeyValueQualifier.m
        * EOControl/EOMutableKnownKeyDictionary.m,
        * EOControl/EOPrivate.h, EOControl/EOPrivate.m
        Unify GDL2 identifiers with GDL2_ prefix.  Replace
        GDL2NSClass_alloc with GDL2_alloc(NSClass).  Replace
        GDL2NSClassWith* calls with
        AUTORELEASE([GDL2_alloc(NSCLass) initWith* calls]).
        Rename GDL2PrivInit to GDL2_PrivateInit.
        (GDL2_NSArray, GDL2_NSMutableArray_allocWithZoneIMP)
        (GDL2_NSMutableDictionary_allocWithZoneIMP): New globals.
        (GDL2_alloc): New macro.
        (GDL2NSString_alloc, GDL2NSDecimalNumber_alloc)
        (GDL2NSNumber_alloc, GDL2NSCalendarDate_alloc, GDL2NSData_alloc)
        (GDL2DataWithBytesAndLength, GDL2MutableArrayWithCapacity)
        (GDL2MutableArrayWithArray, GDL2MutableArray, GDL2Array)
        (GDL2MutableDictionaryWithCapacity): Remove.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20779 72102866-910b-0410-8b05-ffd578937521
2005-02-22 16:14:03 +00:00
David Ayers
e4bdd8f5dc * EOAccess/EOAdaptor.m (-hasOpenChannels): Make safe for
unsigned.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20774 72102866-910b-0410-8b05-ffd578937521
2005-02-22 12:52:46 +00:00
David Ayers
8b5a93e44e * EOAccess/EOAdaptor.m: Consistently use unsigned for array
index variables.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20767 72102866-910b-0410-8b05-ffd578937521
2005-02-20 20:58:28 +00:00
David Ayers
2fb344f062 * EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,
* EOAccess/EODatabaseContext.m, EOAccess/EOSQLExpression.m,
        * EOControl/EOEditingContext.m, EOControl/EOKeyValueCoding.m,
        * EOControl/EOMutableKnownKeyDictionary.m,
        * EOControl/EOPrivate.h, EOControl/EOPrivate.m: Remove global
        selector cache.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20766 72102866-910b-0410-8b05-ffd578937521
2005-02-20 20:33:09 +00:00
David Ayers
944432d46e Add file missing from last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20762 72102866-910b-0410-8b05-ffd578937521
2005-02-20 13:57:23 +00:00
David Ayers
0d24407fcf * EOControl/EOPriv.h/m: Split into...
* EOControl/EOPrivat.h/m: ... and ...
        * EOAccess/EOPrivat.h/m: ... files.
        * EOAccess/EOAdaptorChannel.m: Include new privat header.
        * EOAccess/EOAttribute.m, EOAccess/EODatabase.m,
        * EOAccess/EODatabaseChannel.m, EOAccess/EOEntity.m,
        * EOAccess/EORelationship.m, EOAccess/EOSQLExpression.m,
        * EOAccess/EOSQLQualifier.m, EOAccess/EOUtilities.m: Ditto.
        (+initialize): Call new private function.
        * EOAccess/EODatabaseContext.m: Ditto.
        (EODatabaseContext_snapshotForGlobalIDWithImpPtr)
        (EODatabaseContext_globalIDForObjectWithImpPtr): Move to
        EOPrivate.m.
        * EOAccess/EODatabaseContextPriv.h:
        (EODatabaseContext_snapshotForGlobalIDWithImpPtr)
        (EODatabaseContext_globalIDForObjectWithImpPtr): Move to
        EOPrivate.h.
        * EOAccess/GNUmakefile: Compile EOPrivate.m.

        * EOControl/EOClassDescription.m, EOControl/EOGenericRecord.m
        * EOControl/EOKeyGlobalID.m, EOControl/EOKeyValueCoding.m
        * EOControl/EOKeyValueQualifier.m, EOControl/EONSAddOns.m
        * EOControl/EOSortOrdering.m: Include new private header.
        * EOControl/EOEditingContext.h/m: Ditto.
        (EOEditingContext_objectForGlobalIDWithImpPtr)
        (EOEditingContext_recordObjectGlobalIDWithImpPtr): Move to
        EOPrivate.h/m.
        * EOControl/EOMutableKnownKeyDictionary.h/m: Include new
        private header.
        (EOMKKD_objectForKeyWithImpPtr, EOMKKD_setObjectForKeyWithImpPtr)
        (EOMKKD_removeObjectForKeyWithImpPtr, EOMKKD_hasKeyWithImpPtr)
        (EOMKKD_indexForKeyWithImpPtr)
        (EOMKKDInitializer_indexForKeyWithImpPtr): Move to EOPrivate.m
        * EOControl/EOFault.m: (+isFault:): Update comment.
        * EOControl/GNUmakefile: Build EOPrivate.m instead of EOPriv.m.
        Do not install private header.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20759 72102866-910b-0410-8b05-ffd578937521
2005-02-20 10:52:57 +00:00
David Ayers
ef8e948417 * EOAccess/EOAccessFault.m: Include NSThread.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20758 72102866-910b-0410-8b05-ffd578937521
2005-02-20 10:24:36 +00:00
David Ayers
3bd48d095d * EOAdaptors/Postgres95/Postgres95Values.m: Remove dependency
on EOAccess/EOAttributePriv.h and EOControl/EONSAddOns.h.
        (attrRespondsToValueClass, attrRespondsToValueTypeChar): New
        static locals.
        (+initialize, +newValueForNumberType:length:attribute:):
        Remove dependency and used static locals instead.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20751 72102866-910b-0410-8b05-ffd578937521
2005-02-19 12:37:25 +00:00
David Ayers
7c80ffaf65 * EOAdaptors/Postgres95/Postgres95Private.m/h: New files
based on EOControl/EOPriv.m/h.
        * EOAdaptors/Postgres95/GNUmakefile.in: Build
        Postgres95Private.m.
        * EOAdaptors/Postgres95/Postgres95Adaptor.m: Do not depend on
        EOControl/EOPriv.m/h but on own private files.
        (+assignExternalInfoForEntity): Use objectAtIndex: instead of
        enumerator for speed.
        * EOAdaptors/Postgres95/Postgres95Channel.m: (+initialize)
        (-lowLevelResultFieldNames:, -fetchRowWithZone:)
        (-insertRow:forEntity:, -_describeResults, -describeTableNames)
        (-updateValues:inRowsDescribedByQualifier:entity:)
        (-_describeBasicEntityWithName:forModel:)
        (-_describeForeignKeysForEntity:forModel:)
        (-primaryKeyForNewRowWithEntity:): Do not depend on
        EOControl/EOPriv.m/h but on own private files.  Improve
        optimizations.
        (pgResultDictionary): Simplify unused static local be
        reverting optimizations.
        * EOAdaptors/Postgres95/Postgres95SQLExpression.m:
        (+initialize, +formatValue:forAttribute:)
        (+sqlPatternFromShellPattern:)
        (+sqlPatternFromShellPattern:withEscapeCharacter:): Do not
        depend on EOControl/EOPriv.m/h but on own private files.  Improve
        optimizations.
        * EOAdaptors/Postgres95/Postgres95Values.h/m
        (Postgres95CalendarFormat, Postgres95ValuesClass)
        (Postgres95Values_newValueForBytesLengthAttributeSEL)
        (Postgres95Values_newValueForBytesLengthAttributeIMP)
        (Postgres95Values_newValueForBytesLengthAttribute): Remove.
        ([NSCalendarDate+setPostgres95Format:]): Remove.
        ([NSCalendarDate+postgres95Format]): Deprecate.
        (LPSQLA_StringDefaultCStringEncoding): New local static.
        (+initialize, +newValueForNumberType:length:attribute:)
        (+newValueForCharactersType:length:attribute:)
        (+newValueForDateType:length:attribute:):  Do not depend on
        EOControl/EOPriv.m/h but on own private files.  Improve
        optimizations.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20750 72102866-910b-0410-8b05-ffd578937521
2005-02-19 12:13:22 +00:00
Matt Rice
74a8e976bf Call -willChange: to support EOObserving in EOModel, EOEntity, EOAttribute,
EORelationship, EOStoredProcedure.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20745 72102866-910b-0410-8b05-ffd578937521
2005-02-18 16:46:38 +00:00
David Ayers
6b4ef319c9 * EOAccess/EODatabaseContext.m:
(recordChangesInEditingContext): Remove shadowing of local
	variable.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20739 72102866-910b-0410-8b05-ffd578937521
2005-02-17 12:19:38 +00:00
David Ayers
af63fd32b5 * EOAccess/EODatabaseContext.m:
(-_currentCommittedSnapshotForObject:): Fix crash in logging.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20738 72102866-910b-0410-8b05-ffd578937521
2005-02-17 09:52:14 +00:00
David Ayers
cd0f130fc7 * EOAccess/EOEntity.m: Remove unnecessary include.
(-setClassProperties:, -setPrimaryKeyAttributes:)
        (-setAttributesUsedForLocking:): Remove unnecessary casts.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20737 72102866-910b-0410-8b05-ffd578937521
2005-02-17 09:41:09 +00:00
David Ayers
11fac539ea * EOAccess/EOAccessFault.m ([EOAccessFaultHandler-init])
([EOAccessFaultHandler-dealloc])
        ([EOAccessArrayFaultHandler-dealloc]): Use GSCurrentThread
        instead of objc_thread_id.
        (-completeInitializationOfObject): Correct comment.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20735 72102866-910b-0410-8b05-ffd578937521
2005-02-16 15:48:17 +00:00
David Ayers
b9a5ba95a1 * EOControl/EOGenericRecord.m (-storedValueForKey:)
(-takeStoredValue:forKey:, -takeValue:forKey:, valueForKey):
        Use GSSelectorFromName instead of sel_get_any_uid.  Omit test
        to islower.  Format according to coding standards.
        * EOControl/EOKeyValueCoding.m (-takeValue:forKeyPath:isSmart:)
        Use unsigned for index bookkeeping.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20733 72102866-910b-0410-8b05-ffd578937521
2005-02-16 14:06:01 +00:00
David Ayers
d6075af06e * EOControl/EOMutableKnownKeyDictionary.m
([EOMKKDInitializer-arrayMappingForKeys:]): Correct call to
        GDL2ObjectAtIndexWithImp.
        ([EOMKKDInitializer-subsetMappingForSourceDictionaryInitializer:
        sourceKeys:destinationKeys:]): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20732 72102866-910b-0410-8b05-ffd578937521
2005-02-16 11:03:28 +00:00
David Ayers
e3a74b3562 * EOControl/EOPriv.h/m (GDL2_shellPatternCharacterSet): Remove.
(GDL2PrivInit): Remove usage of GDL2_shellPatternCharacterSet.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20731 72102866-910b-0410-8b05-ffd578937521
2005-02-16 08:28:27 +00:00
David Ayers
c16e28c931 * EOControl/EONSAddOns.h/m
([NSString-hasShellPatternCharacter]): Remove.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20730 72102866-910b-0410-8b05-ffd578937521
2005-02-16 08:11:57 +00:00