You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by to...@apache.org on 2006/08/28 00:09:12 UTC

svn commit: r437471 [3/3] - in /incubator/cayenne/sandbox/CocoaCayenne/CAYClient: CAYClient.xcodeproj/halset.mode1 CAYClient.xcodeproj/halset.pbxuser Gallery.h Gallery.m

Modified: incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.h
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.h?rev=437471&r1=437470&r2=437471&view=diff
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.h (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.h Sun Aug 27 15:09:12 2006
@@ -13,4 +13,7 @@
 
 }
 
+-(void)setName:(NSString *)n;
+-(NSString *)name;
+
 @end

Modified: incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.m
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.m?rev=437471&r1=437470&r2=437471&view=diff
==============================================================================
--- incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.m (original)
+++ incubator/cayenne/sandbox/CocoaCayenne/CAYClient/Gallery.m Sun Aug 27 15:09:12 2006
@@ -11,4 +11,28 @@
 
 @implementation Gallery
 
+-(id)initWithCoder:(NSCoder*)coder
+{
+	[super initWithCoder:coder];
+	[values setObject:[coder decodeObjectForKey:@"name"] forKey:@"name"];
+	return self;
+}
+
+-(void)encodeWithCoder:(NSCoder*)coder
+{
+    [super encodeWithCoder:coder];
+	[coder encodeObject:[values valueForKey:@"name"] forKey:@"name"];
+}
+
+-(void)setName:(NSString *)n
+{
+    [[self objectContext] propertyChanged:self forProperty:@"name" fromOld:[values objectForKey:@"name"] toNew:n];
+    [values setObject:n forKey:@"name"];
+}
+
+-(NSString *)name
+{
+	return [values objectForKey:@"name"];
+}
+
 @end