macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

descriptorAtIndex:

指定した位置のアップルイベントデスクリプタを返します
-(NSAppleEventDescriptor *)descriptorAtIndex:(long int)anIndex:

解説

指定した位置(anIndex)のアップルイベントデスクリプタを返します。エラーが発生すればnilを返します。

返り値

( NSAppleEventDescriptor * )

アップルイベントデスクリプタ

引数

( long int )anIndex

インデックス

クラス

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