mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* 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
This commit is contained in:
parent
c4f61efc7b
commit
56ba650c5c
9 changed files with 90 additions and 40 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2005-05-11 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* 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 return
|
||||
value of -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.
|
||||
|
||||
|
||||
2005-05-03 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* EOControl/EOEditingContext.m (_mutableSetFromToManyArray:):
|
||||
|
|
|
@ -72,7 +72,7 @@ RCS_ID("$Id$")
|
|||
#include <EOAccess/EOModelGroup.h>
|
||||
#include <EOAccess/EODatabase.h>
|
||||
#include <EOAccess/EODatabaseContext.h>
|
||||
|
||||
#include <EOAccess/EOPrivate.h>
|
||||
|
||||
@interface EODatabaseDataSource(Private)
|
||||
- (id)_partialInitWithEditingContext: (EOEditingContext*)editingContext
|
||||
|
@ -191,42 +191,56 @@ RCS_ID("$Id$")
|
|||
|
||||
- (EOEntity *)entity
|
||||
{
|
||||
return [[[self databaseContext] database]
|
||||
entityNamed: [_fetchSpecification entityName]];
|
||||
EOObjectStore *store;
|
||||
NSString *entityName = [_fetchSpecification entityName];
|
||||
static SEL modelGroupSel = @selector(modelGroup);
|
||||
EOModelGroup *modelGroup = nil;
|
||||
|
||||
store = [_editingContext rootObjectStore];
|
||||
|
||||
if ([store isKindOfClass: [EOObjectStoreCoordinator class]])
|
||||
{
|
||||
return [[(EOObjectStoreCoordinator *)store modelGroup] entityNamed: entityName];
|
||||
}
|
||||
else if ([store isKindOfClass:GDL2_EODatabaseContextClass])
|
||||
{
|
||||
EODatabase *database = [(EODatabaseContext *)store database];
|
||||
NSArray *models = [database models];
|
||||
int i, c;
|
||||
|
||||
for (i = 0, c = [models count]; i < c; i++)
|
||||
{
|
||||
EOEntity *entity;
|
||||
|
||||
modelGroup = [[models objectAtIndex: i] modelGroup];
|
||||
entity = [modelGroup entityNamed: entityName];
|
||||
if (entity)
|
||||
return entity;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
else if ([store respondsToSelector:modelGroupSel])
|
||||
{
|
||||
modelGroup = [store performSelector:modelGroupSel];
|
||||
}
|
||||
|
||||
if (modelGroup != nil)
|
||||
{
|
||||
return [modelGroup entityNamed: entityName];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [[EOModelGroup defaultModelGroup] entityNamed: entityName];
|
||||
}
|
||||
}
|
||||
|
||||
- (EODatabaseContext *)databaseContext
|
||||
{
|
||||
NSArray *stores = nil;
|
||||
EODatabaseContext *store = nil;
|
||||
NSEnumerator *storeEnum = nil;
|
||||
NSString *entityName = nil;
|
||||
id rootStore = nil;
|
||||
EOModel *model;
|
||||
|
||||
entityName = [_fetchSpecification entityName];
|
||||
|
||||
rootStore = [_editingContext rootObjectStore];
|
||||
if ([rootStore isKindOfClass: [EOObjectStoreCoordinator class]] == YES)
|
||||
{
|
||||
stores = [rootStore cooperatingObjectStores];
|
||||
|
||||
storeEnum = [stores objectEnumerator];
|
||||
while ((store = [storeEnum nextObject]))
|
||||
{
|
||||
if ([store isKindOfClass: [EODatabaseContext class]] == YES)
|
||||
{
|
||||
if ([[store database] entityNamed: entityName])
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ([rootStore isKindOfClass: [EODatabaseContext class]] == YES)
|
||||
{
|
||||
if ([[store database] entityNamed: entityName])
|
||||
store = rootStore;
|
||||
}
|
||||
|
||||
return store;
|
||||
model = [[self entity] model];
|
||||
return [EODatabaseContext registeredDatabaseContextForModel:model
|
||||
editingContext:_editingContext];
|
||||
}
|
||||
|
||||
- (void)setFetchSpecification: (EOFetchSpecification *)fetchSpecification
|
||||
|
|
|
@ -66,7 +66,7 @@ ADDITIONAL_INSTALL_DIRS =
|
|||
# all the libraries the target library depends upon.
|
||||
|
||||
ifneq ($(FOUNDATION_LIBRARY_NAME),)
|
||||
LIBRARIES_DEPEND_UPON = -l$(FOUNDATION_LIBRARY_NAME)
|
||||
LIBRARIES_DEPEND_UPON = $(FND_LIBS)
|
||||
endif
|
||||
ifneq ($(FOUNDATION_LIB),gnu)
|
||||
LIBRARIES_DEPEND_UPON += -lgnustep-baseadd
|
||||
|
|
|
@ -185,7 +185,7 @@ vfmaxf (int n, float aFloat, ...)
|
|||
[tableScrollView setDocumentView: databases];
|
||||
RELEASE(databases);
|
||||
|
||||
tableColumn = [[NSTableColumn alloc] initWithIdentifier: tableViewTitle];
|
||||
tableColumn = [(NSTableColumn*)[NSTableColumn alloc] initWithIdentifier: tableViewTitle];
|
||||
[[tableColumn headerCell] setStringValue: tableViewTitle];
|
||||
[tableColumn setEditable:NO];
|
||||
[tableColumn sizeToFit];
|
||||
|
|
|
@ -1211,7 +1211,7 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
@"TOMANY snap=%p key=%@ ==> value %p=%@",
|
||||
snapshot, key, value, value);
|
||||
|
||||
value = AUTORELEASE([value shallowCopy]);
|
||||
value = AUTORELEASE([(NSArray *)value shallowCopy]);
|
||||
NSDebugMLLog(@"gsdb",
|
||||
@"TOMANY snap=%p key=%@ ==> value %p=%@",
|
||||
snapshot, key, value, value);
|
||||
|
|
|
@ -3541,6 +3541,22 @@ modified state of the object.**/
|
|||
editingContext: context];
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder:(NSCoder *)encoder
|
||||
{
|
||||
[encoder encodeObject: _delegate];
|
||||
[encoder encodeObject: _messageHandler];
|
||||
}
|
||||
|
||||
- (id) initWithCoder:(NSCoder *)decoder
|
||||
{
|
||||
self = [self init];
|
||||
ASSIGN(_delegate, [decoder decodeObject]);
|
||||
ASSIGN(_messageHandler, [decoder decodeObject]);
|
||||
/* FIXME */
|
||||
ASSIGN(_objectStore, [EOEditingContext defaultParentObjectStore]);
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ static Class EOFaultClass = NULL;
|
|||
|
||||
// Fault Instance methods
|
||||
|
||||
- superclass
|
||||
- (Class) superclass
|
||||
{
|
||||
return [[_handler targetClass] superclass];
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ ADDITIONAL_INSTALL_DIRS =
|
|||
# all the libraries the target library depends upon.
|
||||
|
||||
ifneq ($(FOUNDATION_LIBRARY_NAME),)
|
||||
LIBRARIES_DEPEND_UPON = -l$(FOUNDATION_LIBRARY_NAME)
|
||||
LIBRARIES_DEPEND_UPON = $(FND_LIBS)
|
||||
endif
|
||||
ifneq ($(FOUNDATION_LIB),gnu)
|
||||
LIBRARIES_DEPEND_UPON += -lgnustep-baseadd
|
||||
|
|
|
@ -35,16 +35,17 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#ifdef GNUSTEP
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <Foundation/NSCalendarDate.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
#include <Foundation/NSEnumerator.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSProcessInfo.h>
|
||||
#include <Foundation/NSSet.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue