mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-02 21:29:45 +00:00
implemented CPCoding support for CPSortDescriptor and made CPTableColumn decode it's _sortDescriptorPrototype
This commit is contained in:
1 parent
97e4b69eaa
commit
6a33acbb7c
5 files changed
+72
-1
No files matched your search
@@ -67,6 +67,7 @@
|
||||
@import "NSViewController.j"
|
||||
@import "NSWindowTemplate.j"
|
||||
@import "WebView.j"
|
||||
@import "NSSortDescriptor.j"
|
||||
|
||||
|
||||
function CP_NSMapClassName(aClassName)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
@import <Foundation/CPSortDescriptor.j>
|
||||
|
||||
@implementation CPSortDescriptor (NSCoding)
|
||||
{
|
||||
}
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (self = [super init])
|
||||
{
|
||||
_key = [aCoder decodeObjectForKey:@"NSKey"];
|
||||
_selector = CPSelectorFromString([aCoder decodeObjectForKey:@"NSSelector"]);
|
||||
_ascending = [aCoder decodeBoolForKey:@"NSAscending"];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSSortDescriptor : CPSortDescriptor
|
||||
{
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
return [self NS_initWithCoder:aCoder];
|
||||
}
|
||||
|
||||
- (Class)classForKeyedArchiver
|
||||
{
|
||||
return [CPSortDescriptor class];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -53,6 +53,8 @@
|
||||
|
||||
_resizingMask = [aCoder decodeBoolForKey:@"NSIsResizeable"] ? CPTableColumnUserResizingMask : CPTableColumnAutoresizingMask;
|
||||
_isHidden = [aCoder decodeBoolForKey:@"NSHidden"];
|
||||
|
||||
_sortDescriptorPrototype = [aCoder decodeObjectForKey:@"NSSortDescriptorPrototype"];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
Reference in new issue
Block a user