* EOAccess: Revert previous changes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23949 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Matt Rice 2006-10-23 11:39:48 +00:00
parent f9f1fdb6d3
commit a1605b6f72
6 changed files with 4 additions and 66 deletions

View file

@ -1,3 +1,7 @@
2006-10-23 Matt Rice <ratmice@yahoo.com>
* EOAccess: Revert previous changes.
2006-10-22 Matt Rice <ratmice@yahoo.com>
* EOAccess/EOPrivate.h: Add notification constants.

View file

@ -53,7 +53,6 @@ RCS_ID("$Id$")
#include <Foundation/NSValue.h>
#include <Foundation/NSCalendarDate.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSNotification.h>
#else
#include <Foundation/Foundation.h>
#endif
@ -101,24 +100,6 @@ RCS_ID("$Id$")
return [[[self alloc] initWithPropertyList: propertyList
owner: owner] autorelease];
}
- (id) init
{
if ((self = [super init]))
{
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(_entityWillDeallocate:)
name:GDL2EntityWillDeallocateNotification
object:nil];
}
return self;
}
- (void) _entityWillDeallocate:(NSNotification *)notif
{
if (_parent == [[notif object] pointerValue])
_parent = nil;
}
- (id) initWithPropertyList: (NSDictionary *)propertyList
owner: (id)owner
@ -390,7 +371,6 @@ RCS_ID("$Id$")
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
DESTROY(_name);
DESTROY(_prototype);
DESTROY(_columnName);

View file

@ -53,7 +53,6 @@ RCS_ID("$Id$")
#include <Foundation/NSAutoreleasePool.h>
#include <Foundation/NSException.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSObjCRuntime.h>
#include <Foundation/NSZone.h>
#else
@ -88,9 +87,6 @@ RCS_ID("$Id$")
#include "EOEntityPriv.h"
#include "EOAttributePriv.h"
NSString *GDL2EntityWillDeallocateNotification =
@"GDL2EntityWillDeallocateNotification";
@interface EOModel (Privat)
- (void)_updateCache;
@end
@ -518,27 +514,13 @@ NSString *EONextPrimaryKeyProcedureOperation = @"EONextPrimaryKeyProcedureOperat
_attributes = [NSMutableArray new];
_subEntities = [NSMutableArray new];
[self setCreateMutableObjects: YES];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(_modelWillDeallocate:)
name:GDL2ModelWillDeallocateNotification
object:nil];
}
return self;
}
- (void) _modelWillDeallocate:(NSNotification *)notif
{
if (_model == [[notif object] pointerValue])
_model = nil;
}
- (void) dealloc
{
[[NSNotificationCenter defaultCenter]
postNotificationName:GDL2EntityWillDeallocateNotification
object:[NSValue valueWithPointer:self]];
DESTROY(_attributes);
DESTROY(_name);
DESTROY(_className);

View file

@ -83,7 +83,6 @@ RCS_ID("$Id$")
#define DEFAULT_MODEL_VERSION 2
NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
NSString *GDL2ModelWillDeallocateNotification = @"GDL2ModelWillDeallocateNotification";
@interface EOModel (EOModelPrivate)
@ -249,9 +248,6 @@ NSString *GDL2ModelWillDeallocateNotification = @"GDL2ModelWillDeallocateNotific
- (void) dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver: self];
[[NSNotificationCenter defaultCenter]
postNotificationName:GDL2ModelWillDeallocateNotification
object:[NSValue valueWithPointer:self]];
if (_entitiesByClass)
{

View file

@ -31,8 +31,6 @@
#include "../EOControl/EOPrivate.h"
@class EODatabaseContext;
GDL2ACCESS_EXPORT NSString *GDL2EntityWillDeallocateNotification;
GDL2ACCESS_EXPORT NSString *GDL2ModelWillDeallocateNotification;
// ==== Classes ====
GDL2ACCESS_EXPORT Class GDL2_EODatabaseContextClass;

View file

@ -43,8 +43,6 @@ RCS_ID("$Id$")
#include <Foundation/NSUtilities.h>
#include <Foundation/NSException.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSNotification.h>
#include <Foundation/NSValue.h>
#else
#include <Foundation/Foundation.h>
#endif
@ -104,11 +102,6 @@ RCS_ID("$Id$")
_sourceToDestinationKeyMap = [NSDictionary new];
_joins = [GCMutableArray new];
*/
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(_entityWillDeallocate:)
name:GDL2EntityWillDeallocateNotification
object:nil];
}
return self;
@ -116,7 +109,6 @@ RCS_ID("$Id$")
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
DESTROY(_name);
DESTROY(_qualifier);
DESTROY(_sourceNames);
@ -2395,18 +2387,4 @@ attr entity
EOFLOGObjectFnStop();
}
- (void) _entityWillDeallocate:(NSNotification *)notif
{
id entity = [[notif object] pointerValue];
if (entity == _entity)
{
_entity = nil;
}
if (entity == _destination)
{
_destination = nil;
}
}
@end