setLeafKeyPath:
リーフノードを表すキーをセットします
-(void)setLeafKeyPath:(NSString *)key:
解説
リーフノードを表すキーをセットします。
リーフキーにYESをセットするとリーフノード(以降枝分かれがない)と判断されます。
返り値
( void )
なし
引数
( NSString * )key
フレームワーク
ApplicationKit
クラス
NSTreeController
Instance Methods
使用可能
10.4
参照
-leafKey
例文
#import "MyObject.h" // IBOutlet NSTreeController* myTreeController; @implementation MyObject -(void)awakeFromNib { //挿入するオブジェクトを作る NSDictionary *dic1 = [NSDictionary dictionaryWithObjectsAndKeys:@"aaaa",@"newKey",[NSNumber numberWithBool:YES],@"leaf",nil]; 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 setLeafKeyPath:@"leaf" ]; } - (IBAction)myAction:(id)sender { } @end