mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 04:40:44 +00:00
* EOAccess/EOEntity.m (-dealloc): Only set parents to nil
properties which have been fully loaded. * EOAdaptors/PostgreSQL/LoginPanel/GNUmakefile: Remove references to libgnustep-db2control/access * DBModeler/MainModelEditor.m: Set the windows title. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@24253 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
821b403f4e
commit
11c2e9260a
3 changed files with 29 additions and 7 deletions
|
@ -100,6 +100,7 @@
|
|||
styleMask: NSTitledWindowMask | NSMiniaturizableWindowMask | NSClosableWindowMask | NSResizableWindowMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES];
|
||||
[_window setTitle:[[document model] name]];
|
||||
[_window setReleasedWhenClosed:NO];
|
||||
|
||||
[sv setHasHorizontalScroller:YES];
|
||||
|
|
|
@ -572,11 +572,31 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
|
|||
return self;
|
||||
}
|
||||
|
||||
static void performSelectorOnArrayWithEachObjectOfClass(NSArray *arr, SEL selector, id arg, Class class)
|
||||
{
|
||||
int i, c;
|
||||
|
||||
for (i = 0, c = [arr count]; i < c; i++)
|
||||
{
|
||||
id obj = [arr objectAtIndex:i];
|
||||
|
||||
if ([obj isKindOfClass:class])
|
||||
{
|
||||
[obj performSelector:selector withObject:arg];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[_subEntities makeObjectsPerform:@selector(_setParentEntity:) withObject:nil];
|
||||
[_attributes makeObjectsPerform:@selector(setParent:) withObject:nil];
|
||||
[_relationships makeObjectsPerform:@selector(setEntity:) withObject:nil];
|
||||
/* these classes may contain NSDictionaries as well as entities, attributes and relationships
|
||||
in the case of delayed instantiation */
|
||||
performSelectorOnArrayWithEachObjectOfClass(_subEntities, @selector(_setParentEntity:),
|
||||
nil, [EOEntity class]);
|
||||
performSelectorOnArrayWithEachObjectOfClass(_attributes, @selector(setParent:),
|
||||
nil, [EOAttribute class]);
|
||||
performSelectorOnArrayWithEachObjectOfClass(_relationships, @selector(setEntity:),
|
||||
nil, [EORelationship class]);
|
||||
// this must come after _attributes is cleared.
|
||||
GDL2DestinationEntitiesRemoveEntity(self);
|
||||
|
||||
|
|
|
@ -38,10 +38,9 @@ LoginPanel_OBJC_FILES = PostgreSQLLoginPanel.m
|
|||
LoginPanel_PRINCIPAL_CLASS = PostgreSQLLoginPanel
|
||||
|
||||
LoginPanel_INCLUDE_DIRS = -I.. -I../../..
|
||||
LoginPanel_LIB_DIRS = \
|
||||
-L../../../EOControl/$(GNUSTEP_OBJ_DIR) \
|
||||
-L../../../EOAccess/$(GNUSTEP_OBJ_DIR)
|
||||
LoginPanel_OBJC_LIBS = -lgnustep-db2control -lgnustep-db2
|
||||
|
||||
ADDITIONAL_NATIVE_LIBS+=EOAccess EOControl
|
||||
ADDITIONAL_NATIVE_LIB_DIRS+=../EOControl ../EOAccess
|
||||
|
||||
ifneq ($(FOUNDATION_LIB),gnu)
|
||||
LoginPanel_OBJC_LIBS += -lgnustep-baseadd
|
||||
|
@ -53,6 +52,8 @@ include ../config.mak
|
|||
|
||||
-include Makefile.preamble
|
||||
|
||||
include ../../../common.make
|
||||
|
||||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/bundle.make
|
||||
|
|
Loading…
Reference in a new issue