mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 13:07:02 +00:00
add CPCoding support to CPIndexPath
This commit is contained in:
@@ -145,3 +145,24 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPIndexPathIndexesKey = @"CPIndexPathIndexes";
|
||||
|
||||
@implementation CPIndexPath (CPCoding)
|
||||
|
||||
- (id)initWithCoder:(CPCoder)theCoder
|
||||
{
|
||||
if (self = [self init])
|
||||
{
|
||||
_indexes = [theCoder decodeObjectForKey:CPIndexPathIndexesKey];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(CPCoder)theCoder
|
||||
{
|
||||
[theCoder encodeObject:_indexes forKey:CPIndexPathIndexesKey];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user