columnWithIdentifier:
IDでテーブル列を探してテーブルビューでの番号を返します
-(int)columnWithIdentifier:(id)anObject:
解説
IDでテーブル列を探してテーブルビューでの番号を返します。
番号は左から順に0,1,2,3...となっています。
同じIDのテーブル列が無ければ-1を返します。
返り値
( int )
整数値
引数
( id )anObject
オブジェクト
フレームワーク
ApplicationKit
クラス
NSTableView
Instance Methods
使用可能
10.0
参照
- tableColumnWithIdentifier:
例文
//アプリケーションのデリゲート //起動直後 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { array = [[NSMutableArray array] retain]; [table setDataSource:self];//テーブルにデータを提供するオブジェクト=self [window makeKeyAndOrderFront:nil]; [form selectTextAtIndex:0]; NSLog([NSString stringWithFormat:@"%d",[table columnWithIdentifier:@"COL1"]]); }