mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* EOAccess/EODatabaseContext.m ([EODatabaseContext -setDelegate:]):
Fixed assignment in while loop as reported by Stephane Corthesy. * EOControl/EOAndQualifier.m ([EOAndQualifier +qualifierWithQualifiers:]), ([EOAndQualifier -initWithQualifiers:]): Use GS_USEIDLIST to optimize vararg list to array conversion. * EOControl/EOOrQualifier.m ([EOOrQualifier +qualifierWithQualifiers:]), ([EOOrQualifier -initWithQualifiers:]): Ditto. * EOControl/EOClassDescription.m ([EOClassDescription +classDelegate]): Make access to static variable thread safe. * EOControl/EOEdtitingContext.m: Added declarations to avoid compiler warnings. 2003-05-02 Stephane Corthesy <stephane at sente dot ch> * EOControl/EOControl.h: Added inclusion of EOArrayDataSource.h. * EOControl/EOEdtitingContext.m: Added declaration of +[EOEditingContext(EOEditingContextPrivate) _observeUndoManagerNotifications] to avoid compiler warnings. * EOControl/EONSAddOns.m ([NSObject -resultsOfPerformingSelector:withEachObjectInArray:defaultResult:]): Added cast to avoid compiler warning. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@16613 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
be823841ce
commit
922e1f1bb0
9 changed files with 84 additions and 51 deletions
24
ChangeLog
24
ChangeLog
|
@ -16,6 +16,30 @@
|
|||
* EOAccess/EOSQLExpression.m: Import GSCategories.h only for
|
||||
NeXT_Foundation_Library.
|
||||
* EOControl/EOKeyValueCoding.m: Ditto.
|
||||
* EOAccess/EODatabaseContext.m ([EODatabaseContext -setDelegate:]):
|
||||
Fixed assignment in while loop as reported by Stephane Corthesy.
|
||||
* EOControl/EOAndQualifier.m
|
||||
([EOAndQualifier +qualifierWithQualifiers:]),
|
||||
([EOAndQualifier -initWithQualifiers:]): Use GS_USEIDLIST to
|
||||
optimize vararg list to array conversion.
|
||||
* EOControl/EOOrQualifier.m
|
||||
([EOOrQualifier +qualifierWithQualifiers:]),
|
||||
([EOOrQualifier -initWithQualifiers:]): Ditto.
|
||||
* EOControl/EOClassDescription.m
|
||||
([EOClassDescription +classDelegate]): Make access to static
|
||||
variable thread safe.
|
||||
* EOControl/EOEdtitingContext.m: Added declarations to avoid
|
||||
compiler warnings.
|
||||
|
||||
2003-05-02 Stephane Corthesy <stephane@sente.ch>
|
||||
|
||||
* EOControl/EOControl.h: Added inclusion of EOArrayDataSource.h.
|
||||
* EOControl/EOEdtitingContext.m: Added declaration of
|
||||
+[EOEditingContext(EOEditingContextPrivate)
|
||||
_observeUndoManagerNotifications] to avoid compiler warnings.
|
||||
* EOControl/EONSAddOns.m ([NSObject
|
||||
-resultsOfPerformingSelector:withEachObjectInArray:defaultResult:]):
|
||||
Added cast to avoid compiler warning.
|
||||
|
||||
2003-04-18 Mirko Viviani <mirko@objectlab.org>
|
||||
|
||||
|
|
|
@ -599,7 +599,7 @@ May raise an exception if transaction has began or if you want pessimistic lock
|
|||
_delegateRespondsTo.shouldFetchArrayFault =
|
||||
[delegate respondsToSelector: @selector(databaseContext:shouldFetchArrayFault:)];
|
||||
|
||||
while ((channel == [channelsEnum nextObject]))
|
||||
while ((channel = [channelsEnum nextObject]))
|
||||
[channel setDelegate: delegate];
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ RCS_ID("$Id$")
|
|||
#include <Foundation/NSDebug.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <gnustep/base/GSObjCRuntime.h>
|
||||
#endif
|
||||
|
||||
#include <EOControl/EOQualifier.h>
|
||||
|
@ -69,18 +70,11 @@ RCS_ID("$Id$")
|
|||
*/
|
||||
+ (EOQualifier *) qualifierWithQualifiers: (EOQualifier *)qualifiers, ...
|
||||
{
|
||||
NSMutableArray *qualArray = [NSMutableArray array];
|
||||
EOQualifier *tmpId;
|
||||
va_list ap;
|
||||
NSArray *qualArray;
|
||||
|
||||
va_start(ap, qualifiers);
|
||||
|
||||
for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
|
||||
{
|
||||
[qualArray addObject: tmpId];
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
GS_USEIDLIST(qualifiers, qualArray
|
||||
= AUTORELEASE([[NSArray alloc] initWithObjects: __objects
|
||||
count: __count]));
|
||||
|
||||
return AUTORELEASE([[self alloc] initWithQualifierArray: qualArray]);
|
||||
}
|
||||
|
@ -92,18 +86,11 @@ RCS_ID("$Id$")
|
|||
*/
|
||||
- (id) initWithQualifiers: (EOQualifier *)qualifiers, ...
|
||||
{
|
||||
NSMutableArray *qualArray = [NSMutableArray array];
|
||||
EOQualifier *tmpId;
|
||||
va_list ap;
|
||||
NSArray *qualArray;
|
||||
|
||||
va_start(ap, qualifiers);
|
||||
|
||||
for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
|
||||
{
|
||||
[qualArray addObject: tmpId];
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
GS_USEIDLIST(qualifiers, qualArray
|
||||
= AUTORELEASE([[NSArray alloc] initWithObjects: __objects
|
||||
count: __count]));
|
||||
|
||||
return [self initWithQualifierArray: qualArray];
|
||||
}
|
||||
|
|
|
@ -125,7 +125,25 @@ static id classDelegate = nil;
|
|||
|
||||
+ (id)classDelegate
|
||||
{
|
||||
return classDelegate;
|
||||
id delegate;
|
||||
NSLock *lock = GDL2GlobalLock();
|
||||
|
||||
if (lock == nil)
|
||||
{
|
||||
delegate = classDelegate;
|
||||
}
|
||||
else
|
||||
{
|
||||
[lock lock];
|
||||
delegate = classDelegate;
|
||||
if (delegate != nil)
|
||||
{
|
||||
AUTORELEASE(RETAIN(delegate));
|
||||
}
|
||||
[lock unlock];
|
||||
}
|
||||
|
||||
return delegate;
|
||||
}
|
||||
|
||||
+ (EOClassDescription *)classDescriptionForClass:(Class)aClass
|
||||
|
@ -372,9 +390,9 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
|
||||
NSDebugMLLog(@"gsdb",@"object %p=%@", object, object);
|
||||
|
||||
classDelegate = [EOClassDescription classDelegate];
|
||||
classDelegate = [[self class] classDelegate];
|
||||
|
||||
NSDebugMLLog(@"gsdb", @"[EOClassDescription classDelegate]%p=%@",
|
||||
NSDebugMLLog(@"gsdb", @"classDelegate%p=%@",
|
||||
classDelegate,
|
||||
classDelegate);
|
||||
|
||||
|
@ -398,7 +416,8 @@ fromInsertionInEditingContext: (EOEditingContext *)anEditingContext
|
|||
if (shouldPropagate)
|
||||
{
|
||||
destination = [object storedValueForKey: key];
|
||||
NSDebugMLLog(@"gsdb", @"destination %p=%@", destination, destination);
|
||||
NSDebugMLLog(@"gsdb", @"destination %p=%@",
|
||||
destination, destination);
|
||||
|
||||
if (destination)
|
||||
{
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include <EOControl/EOFault.h>
|
||||
#include <EOControl/EOEditingContext.h>
|
||||
#include <EOControl/EODataSource.h>
|
||||
#include <EOControl/EOArrayDataSource.h>
|
||||
#include <EOControl/EODetailDataSource.h>
|
||||
#include <EOControl/EOObserver.h>
|
||||
#include <EOControl/EODebug.h>
|
||||
|
|
|
@ -50,6 +50,22 @@ RCS_ID("$Id$")
|
|||
|
||||
@class EOEntityClassDescription;
|
||||
|
||||
/*
|
||||
* These EOAccess specific declarations are intended to
|
||||
* supress long compiler warnings. Non the less we should
|
||||
* avoid dependancies on EOAccess.
|
||||
*/
|
||||
@interface NSObject(EOEntityWarningSupression)
|
||||
- (NSString *) name;
|
||||
- (EOGlobalID *) globalIDForRow:(NSDictionary *)row;
|
||||
@end
|
||||
@interface EOEntityClassDescription : EOClassDescription
|
||||
- (NSObject *) entity;
|
||||
@end
|
||||
|
||||
@interface EOEditingContext(EOEditingContextPrivate)
|
||||
- (void) _observeUndoManagerNotifications;
|
||||
@end
|
||||
|
||||
@implementation EOEditingContext
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ GDL2GlobalRecursiveLock()
|
|||
|
||||
object = [array objectAtIndex: i];
|
||||
result = [self performSelector: sel
|
||||
withObject: object];
|
||||
withObject: (id)object];
|
||||
if (!result)
|
||||
result = defaultResult;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ RCS_ID("$Id$")
|
|||
#include <Foundation/NSDebug.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <gnustep/base/GSObjCRuntime.h>
|
||||
#endif
|
||||
|
||||
#include <EOControl/EOQualifier.h>
|
||||
|
@ -67,18 +68,11 @@ RCS_ID("$Id$")
|
|||
*/
|
||||
+ (EOQualifier *) qualifierWithQualifiers: (EOQualifier *)qualifiers, ...
|
||||
{
|
||||
NSMutableArray *qualArray = [NSMutableArray array];
|
||||
EOQualifier *tmpId;
|
||||
va_list ap;
|
||||
NSArray *qualArray;
|
||||
|
||||
va_start(ap, qualifiers);
|
||||
|
||||
for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
|
||||
{
|
||||
[qualArray addObject: tmpId];
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
GS_USEIDLIST(qualifiers, qualArray
|
||||
= AUTORELEASE([[NSArray alloc] initWithObjects: __objects
|
||||
count: __count]));
|
||||
|
||||
return AUTORELEASE([[self alloc] initWithQualifierArray: qualArray]);
|
||||
}
|
||||
|
@ -90,18 +84,11 @@ RCS_ID("$Id$")
|
|||
*/
|
||||
- (id) initWithQualifiers: (EOQualifier *)qualifiers, ...
|
||||
{
|
||||
NSMutableArray *qualArray = [NSMutableArray array];
|
||||
EOQualifier *tmpId;
|
||||
va_list ap;
|
||||
NSArray *qualArray;
|
||||
|
||||
va_start(ap, qualifiers);
|
||||
|
||||
for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
|
||||
{
|
||||
[qualArray addObject: tmpId];
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
GS_USEIDLIST(qualifiers, qualArray
|
||||
= AUTORELEASE([[NSArray alloc] initWithObjects: __objects
|
||||
count: __count]));
|
||||
|
||||
return [self initWithQualifierArray: qualArray];
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
#include <EOControl/EOKeyValueArchiver.h>
|
||||
|
||||
|
||||
@class NSArray;
|
||||
@class NSDictionary;
|
||||
@class NSString;
|
||||
|
|
Loading…
Reference in a new issue