From f7bc2b6d069aa84dc65b168e4561815e1bc5f4e1 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 5 Jan 2011 12:47:36 +0100 Subject: [PATCH] add a description to CPSortDescriptor --- Foundation/CPSortDescriptor.j | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Foundation/CPSortDescriptor.j b/Foundation/CPSortDescriptor.j index f82399a2f..a53b8b1ab 100755 --- a/Foundation/CPSortDescriptor.j +++ b/Foundation/CPSortDescriptor.j @@ -129,6 +129,12 @@ return [[[self class] alloc] initWithKey:_key ascending:!_ascending selector:_selector]; } +- (CPString)description +{ + return [CPString stringWithFormat:@"(%@, %@, %@)", + [self key], [self ascending] ? @"ascending": @"descending", CPStringFromSelector([self selector])]; +} + @end var CPSortDescriptorKeyKey = @"CPSortDescriptorKeyKey", // Don't you just love naming schemes ;)