| Home 目次>ApplicationKit>NSActionCell | |
target
アクションセルのターゲットオブジェクトを返します
-(id) target
【返り値】 | |
| id | ターゲットオブジェクト |
【解説】
アクションセルのターゲットオブジェクト(anObject)を返します。
【例文】
#import "MyObject1.h"
@implementation MyObject1
- ( IBAction )myAction:( id )sender
{
//but1,but2 は textfield
//aCell は button
if ([aCell target]==but1){
[but1 setStringValue: @" " ];
[aCell setTarget:but2];
} else {
[but2 setStringValue: @" " ];
[aCell setTarget:but1];
}
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSActionCell | 修正日2008.1.17 |