Permalink
Browse files

Added archiving support

  • Loading branch information...
1 parent 56ac21e commit 7e419c08106ec8a80d9e48671f55209bed849524 @BlairDuncan BlairDuncan committed Sep 2, 2010
Showing with 21 additions and 1 deletion.
  1. +21 −1 LPMultiLineTextField.j
@@ -234,4 +234,24 @@ var CPTextFieldInputOwner = nil;
[self setNeedsLayout];
}
-@end
+@end
+
+
+var LPMultiLineTextFieldStringValueKey = "LPMultiLineTextFieldStringValueKey";
+
+@implementation LPMultiLineTextField (CPCoding)
+
+- (id)initWithCoder:(CPCoder)aCoder
+{
+ if (self = [super initWithCoder:aCoder])
+ [self setStringValue:[aCoder decodeObjectForKey:LPMultiLineTextFieldStringValueKey]];
+ return self;
+}
+
+- (void)encodeWithCoder:(CPCoder)aCoder
+{
+ [super encodeWithCoder:aCoder];
+ [aCoder encodeObject:_stringValue forKey:LPMultiLineTextFieldStringValueKey];
+}
+
+@end

0 comments on commit 7e419c0

Please sign in to comment.