cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From torehal...@apache.org
Subject svn commit: r452636 - in /incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne: CAYObjectContext.m CAYSyncMessage.h CAYSyncMessage.m
Date Tue, 03 Oct 2006 21:37:39 GMT
Author: torehalset
Date: Tue Oct  3 14:37:39 2006
New Revision: 452636

URL: http://svn.apache.org/viewvc?view=rev&rev=452636
Log:
remove objectContext ref from CAYSyncMessage as it is unused

Modified:
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.h
    incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m?view=diff&rev=452636&r1=452635&r2=452636
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYObjectContext.m Tue Oct  3 14:37:39
2006
@@ -196,7 +196,7 @@
 {
     NSLog(@"DEBUG: %i unsaved changes before commit. %@", [diffs count], diffs);
     CAYCompoundDiff *diffWithDiffs = [[CAYCompoundDiff alloc] initWithDiffs:diffs];
-    CAYSyncMessage *msg = [[CAYSyncMessage alloc] initWithObjectSource:nil type:2 senderChanges:diffWithDiffs];
+    CAYSyncMessage *msg = [[CAYSyncMessage alloc] initWithType:2 senderChanges:diffWithDiffs];
     
     id result = [[self connection] sendMessage:msg];
     NSLog(@"DEBUG: commit result: %@", result);

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.h
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.h?view=diff&rev=452636&r1=452635&r2=452636
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.h (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.h Tue Oct  3 14:37:39
2006
@@ -23,17 +23,13 @@
 
 @interface CAYSyncMessage : CAYClientMessage <NSCoding>  {
 
-    CAYObjectContext *source;
     int type;
-    // TODO: create CAYGraphDiff?
     NSObject *senderChanges;
 
 }
 
--(id)initWithObjectSource:(CAYObjectContext *)ctxt type:(int)t senderChanges:(NSObject *)changes;
+-(id)initWithType:(int)t senderChanges:(NSObject *)changes;
 
--(void)setSource:(CAYObjectContext *)s;
--(CAYObjectContext *)source;
 -(void)setSenderChanges:(NSObject *)s;
 -(NSObject *)senderChanges;
 

Modified: incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.m?view=diff&rev=452636&r1=452635&r2=452636
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CocoaCayenne/CAYSyncMessage.m Tue Oct  3 14:37:39
2006
@@ -23,11 +23,9 @@
 
 @implementation CAYSyncMessage
 
--(id)initWithObjectSource:(CAYObjectContext *)ctxt type:(int)t senderChanges:(NSObject *)changes
+-(id)initWithType:(int)t senderChanges:(NSObject *)changes
 {
     [super init];
-    // source is transient
-    // [self setSource:ctxt];
     type = t;
     [self setSenderChanges:changes];
     return self;
@@ -36,8 +34,6 @@
 -(id)initWithCoder:(NSCoder*)coder
 {
     [super init];
-    // source is transient
-    //[self setSource:[coder decodeObjectForKey:@"source"]];
     type = [coder decodeIntForKey:@"type"];
     [self setSenderChanges:[coder decodeObjectForKey:@"senderChanges"]];
 	return self;
@@ -45,21 +41,8 @@
 
 -(void)encodeWithCoder:(NSCoder*)coder
 {
-	[coder encodeObject:source forKey:@"source"];
 	[coder encodeInt:type forKey:@"type"];
-	[coder encodeObject:senderChanges forKey:@"senderChanges"];
-}
-
--(void)setSource:(CAYObjectContext *)s
-{
-    [s retain];
-    [source release];
-    source = s;
-}
-
--(CAYObjectContext *)source
-{
-    return source;
+	[coder encodeObject:[self senderChanges] forKey:@"senderChanges"];
 }
 
 -(void)setSenderChanges:(NSObject *)s
@@ -76,8 +59,7 @@
 
 -(void)dealloc
 {
-	[source release];
-	[senderChanges release];
+	[self setSenderChanges:nil];
 	[super dealloc];
 }
 



Mime
View raw message