NSArrayController:setSortDescriptors:
Home 目次>ApplicationKit>NSArrayController
10.3

setSortDescriptors:

ソートデスクリプタをセットします


-(void) setSortDescriptors:(NSArray *)sortDescriptors


【返り値】
   voidなし
【パラメータ】
   sortDescriptorsソートデスクリプタの配列


【解説】

ソートデスクリプタをセットします。



【例文】


// ソートデスクリプタ
NSMutableArray *descriptors=[NSMutableArray arrayWithCapacity: 0 ];
NSSortDescriptor *descriptor;

descriptor=[[NSSortDescriptor alloc] initWithKey:
@"sort1" ascending: YES selector: @selector (compare:)];
[[tableView tableColumnWithIdentifier:
@"newKey" ] setSortDescriptorPrototype:descriptor];
[descriptors addObject:descriptor];
[descriptor release];

descriptor=[[NSSortDescriptor alloc] initWithKey:
@"sort2" ascending: YES selector: @selector (compare:)];
[[tableView tableColumnWithIdentifier:
@"newKey2" ] setSortDescriptorPrototype:descriptor];
[descriptors addObject:descriptor];
[descriptor release];
[myOutlet setSortDescriptors:descriptors];


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSArrayController
修正日2006.12.26