setCountKeyPath:
オブジェクトのノードの数を調べる
カウントキーをセットします
-(void)setCountKeyPath:(NSString *)key:
解説
オブジェクトのノードの数を調べるカウントキーをセットします。
返り値
( void )
なし
引数
( NSString * )key
フレームワーク
ApplicationKit
クラス
NSTreeController
Instance Methods
使用可能
10.4
参照
-countKey
例文
#import "MyObject.h" // IBOutlet NSTreeController* myTreeController; @implementation MyObject -(void)awakeFromNib { //挿入するオブジェクトを作る NSDictionary *dic1 = [NSDictionary dictionaryWithObject:@"aaaa" forKey:@"newKey"]; NSDictionary *dic2 = [NSDictionary dictionaryWithObject:@"bbbb" forKey:@"newKey"]; NSDictionary *dic3 = [NSDictionary dictionaryWithObject:@"cccc" forKey:@"newKey"]; NSArray *objects = [NSArray arrayWithObjects:dic1,dic2,dic3,nil]; [myTreeController setContent: objects ]; //内容をセットする [myTreeController setCountKeyPath:@"countkey" ]; } - (IBAction)myAction:(id)sender { } @end