[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GDL2][Commit] Reported bugs and minor tweaks.
From: |
David Ayers |
Subject: |
[GDL2][Commit] Reported bugs and minor tweaks. |
Date: |
Fri, 02 May 2003 18:13:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 |
Hi,
This follows up on some of the bugs reported a while back by Stephane
Corthesy
http://mail.gnu.org/archive/html/bug-gnustep/2003-04/msg00034.html
http://mail.gnu.org/archive/html/bug-gnustep/2003-04/msg00035.html
http://mail.gnu.org/archive/html/bug-gnustep/2003-04/msg00036.html
and adds some tweaks from me:
Commited.
Cheers,
Dave
oops I forgot all the patches in previous mails... but they were minor,
so please check via cvs.
Index: EOAccess/EODatabaseContext.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOAccess/EODatabaseContext.m,v
retrieving revision 1.17
diff -u -r1.17 EODatabaseContext.m
--- EOAccess/EODatabaseContext.m 31 Mar 2003 00:24:14 -0000 1.17
+++ EOAccess/EODatabaseContext.m 2 May 2003 16:10:05 -0000
@@ -599,7 +599,7 @@
_delegateRespondsTo.shouldFetchArrayFault =
[delegate respondsToSelector:
@selector(databaseContext:shouldFetchArrayFault:)];
- while ((channel == [channelsEnum nextObject]))
+ while ((channel = [channelsEnum nextObject]))
[channel setDelegate: delegate];
}
Index: EOControl/EOAndQualifier.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOAndQualifier.m,v
retrieving revision 1.9
diff -u -r1.9 EOAndQualifier.m
--- EOControl/EOAndQualifier.m 31 Mar 2003 00:24:15 -0000 1.9
+++ EOControl/EOAndQualifier.m 2 May 2003 16:10:05 -0000
@@ -45,6 +45,7 @@
#include <Foundation/NSDebug.h>
#else
#include <Foundation/Foundation.h>
+#include <gnustep/base/GSObjCRuntime.h>
#endif
#include <EOControl/EOQualifier.h>
@@ -69,18 +70,11 @@
*/
+ (EOQualifier *) qualifierWithQualifiers: (EOQualifier *)qualifiers, ...
{
- NSMutableArray *qualArray = [NSMutableArray array];
- EOQualifier *tmpId;
- va_list ap;
-
- va_start(ap, qualifiers);
-
- for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
- {
- [qualArray addObject: tmpId];
- }
+ NSArray *qualArray;
- va_end(ap);
+ GS_USEIDLIST(qualifiers, qualArray
+ = AUTORELEASE([[NSArray alloc] initWithObjects: __objects
+ count: __count]));
return AUTORELEASE([[self alloc] initWithQualifierArray: qualArray]);
}
@@ -92,18 +86,11 @@
*/
- (id) initWithQualifiers: (EOQualifier *)qualifiers, ...
{
- NSMutableArray *qualArray = [NSMutableArray array];
- EOQualifier *tmpId;
- va_list ap;
-
- va_start(ap, qualifiers);
-
- for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
- {
- [qualArray addObject: tmpId];
- }
+ NSArray *qualArray;
- va_end(ap);
+ GS_USEIDLIST(qualifiers, qualArray
+ = AUTORELEASE([[NSArray alloc] initWithObjects: __objects
+ count: __count]));
return [self initWithQualifierArray: qualArray];
}
Index: EOControl/EOClassDescription.m
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOClassDescription.m,v
retrieving revision 1.9
diff -u -r1.9 EOClassDescription.m
--- EOControl/EOClassDescription.m 1 Apr 2003 21:40:13 -0000 1.9
+++ EOControl/EOClassDescription.m 2 May 2003 16:10:06 -0000
@@ -125,7 +125,25 @@
+ (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 @@
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 @@
if (shouldPropagate)
{
destination = [object storedValueForKey: key];
- NSDebugMLLog(@"gsdb", @"destination %p=%@", destination,
destination);
+ NSDebugMLLog(@"gsdb", @"destination %p=%@",
+ destination, destination);
if (destination)
{
Index: EOControl/EOControl.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOControl.h,v
retrieving revision 1.5
diff -u -r1.5 EOControl.h
--- EOControl/EOControl.h 31 Mar 2003 00:24:15 -0000 1.5
+++ EOControl/EOControl.h 2 May 2003 16:10:06 -0000
@@ -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>
Index: EOControl/EOEditingContext.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOEditingContext.m,v
retrieving revision 1.8
diff -u -r1.8 EOEditingContext.m
--- EOControl/EOEditingContext.m 31 Mar 2003 00:24:15 -0000 1.8
+++ EOControl/EOEditingContext.m 2 May 2003 16:10:06 -0000
@@ -50,6 +50,22 @@
@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
Index: EOControl/EONSAddOns.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EONSAddOns.m,v
retrieving revision 1.5
diff -u -r1.5 EONSAddOns.m
--- EOControl/EONSAddOns.m 31 Mar 2003 00:24:15 -0000 1.5
+++ EOControl/EONSAddOns.m 2 May 2003 16:10:06 -0000
@@ -142,7 +142,7 @@
object = [array objectAtIndex: i];
result = [self performSelector: sel
- withObject: object];
+ withObject: (id)object];
if (!result)
result = defaultResult;
Index: EOControl/EOOrQualifier.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOOrQualifier.m,v
retrieving revision 1.8
diff -u -r1.8 EOOrQualifier.m
--- EOControl/EOOrQualifier.m 31 Mar 2003 00:24:15 -0000 1.8
+++ EOControl/EOOrQualifier.m 2 May 2003 16:10:06 -0000
@@ -43,6 +43,7 @@
#include <Foundation/NSDebug.h>
#else
#include <Foundation/Foundation.h>
+#include <gnustep/base/GSObjCRuntime.h>
#endif
#include <EOControl/EOQualifier.h>
@@ -67,18 +68,11 @@
*/
+ (EOQualifier *) qualifierWithQualifiers: (EOQualifier *)qualifiers, ...
{
- NSMutableArray *qualArray = [NSMutableArray array];
- EOQualifier *tmpId;
- va_list ap;
-
- va_start(ap, qualifiers);
-
- for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
- {
- [qualArray addObject: tmpId];
- }
+ NSArray *qualArray;
- va_end(ap);
+ GS_USEIDLIST(qualifiers, qualArray
+ = AUTORELEASE([[NSArray alloc] initWithObjects: __objects
+ count: __count]));
return AUTORELEASE([[self alloc] initWithQualifierArray: qualArray]);
}
@@ -90,18 +84,11 @@
*/
- (id) initWithQualifiers: (EOQualifier *)qualifiers, ...
{
- NSMutableArray *qualArray = [NSMutableArray array];
- EOQualifier *tmpId;
- va_list ap;
-
- va_start(ap, qualifiers);
-
- for (tmpId = qualifiers; tmpId != nil; tmpId = va_arg(ap, id))
- {
- [qualArray addObject: tmpId];
- }
+ NSArray *qualArray;
- va_end(ap);
+ GS_USEIDLIST(qualifiers, qualArray
+ = AUTORELEASE([[NSArray alloc] initWithObjects: __objects
+ count: __count]));
return [self initWithQualifierArray: qualArray];
}
Index: EOControl/EOQualifier.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOQualifier.h,v
retrieving revision 1.4
diff -u -r1.4 EOQualifier.h
--- EOControl/EOQualifier.h 31 Mar 2003 00:24:15 -0000 1.4
+++ EOControl/EOQualifier.h 2 May 2003 16:10:06 -0000
@@ -35,7 +35,6 @@
#include <EOControl/EOKeyValueArchiver.h>
-
@class NSArray;
@class NSDictionary;
@class NSString;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GDL2][Commit] Reported bugs and minor tweaks.,
David Ayers <=