mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-23 13:10:48 +00:00
* 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
This commit is contained in:
parent
44d8935e49
commit
4ba78b33b4
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-06-17 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* EOAccess/EOEntity.m (-_setModel:): Accept nil argument, comment.
|
||||
* EOAccess/EOModel.m (-removeEntity:): Comment.
|
||||
|
||||
2005-05-18 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* EOControl/EOObserver.m (EOObserverCenter): Don't retain observers.
|
||||
|
|
|
@ -2607,6 +2607,13 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
return _flags.createsMutableObjects;
|
||||
}
|
||||
|
||||
/* throws an exception if _model is not nil, and the model argument is not
|
||||
* identical to the _model ivar. As a special case EOModel -removeEntity:
|
||||
* is allowed to call this with a nil model, but removeEntity: is responsible
|
||||
* for any bookeeping.
|
||||
*
|
||||
* in other words, this method should not be used to change an entity's model.
|
||||
*/
|
||||
- (void)_setModel: (EOModel *)model
|
||||
{
|
||||
EOFLOGObjectLevelArgs(@"EOEntity", @"setModel=%p", model);
|
||||
|
@ -2619,7 +2626,7 @@ createInstanceWithEditingContext:globalID:zone:
|
|||
[_attributesToFetch class],
|
||||
_attributesToFetch);
|
||||
|
||||
NSAssert3((_model == nil || _model == model),
|
||||
NSAssert3((_model == nil || _model == model || model == nil),
|
||||
@"Attempt to set entity: %@ owned by model: %@ to model: @%.",
|
||||
[self name], [_model name], [model name]);
|
||||
|
||||
|
|
|
@ -1506,6 +1506,7 @@ NSString *EOEntityLoadedNotification = @"EOEntityLoadedNotification";
|
|||
{
|
||||
NSString *className = nil;
|
||||
|
||||
/* as a special case this method can call _setModel: with nil */
|
||||
[entity _setModel: nil];
|
||||
[_entitiesByName removeObjectForKey: [entity name]];
|
||||
|
||||
|
|
Loading…
Reference in a new issue