descriptorAtIndex:
指定した位置のアップルイベントデスクリプタを返します
-(NSAppleEventDescriptor *)descriptorAtIndex:(long int)anIndex:
解説
指定した位置(anIndex)のアップルイベントデスクリプタを返します。エラーが発生すればnilを返します。
返り値
( NSAppleEventDescriptor * )
アップルイベントデスクリプタ
引数
( long int )anIndex
インデックス
フレームワーク
Foundation
クラス
NSAppleEventDescriptor
Instance Methods
使用可能
10.0
参照
- insertDescriptor:atIndex:
- removeDescriptorAtIndex:
例文
#import "Controller.h" //mi @implementation Controller - (IBAction)pushButton:(id)sender { NSData *data; NSAppleEventDescriptor *aeDesc=[ [NSAppleEventDescriptor alloc] initRecordDescriptor ]; NSAppleEventDescriptor *aeDesc2; NSAppleEventDescriptor *ins1=[ [NSAppleEventDescriptor alloc] init]; NSAppleEventDescriptor *ins2=[ [NSAppleEventDescriptor alloc] init]; [aeDesc insertDescriptor:ins1 atIndex:0 ]; [aeDesc insertDescriptor:ins2 atIndex:1 ]; aeDesc2 = [aeDesc descriptorAtIndex:0]; data = [aeDesc2 data ]; NSLog([data description]); } @end