macOS/iOS API解説

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

目次

setDescriptor:forKeyword:

デスクリプタにキーワード、イベントをセットします
-(void)setDescriptor:(NSAppleEventDescriptor *)descriptor:
                    forKeyword:(AEKeyword)keyword:

解説

デスクリプタにキーワード、イベントをセットします。
レシーバはアップルイベントかアップルイベントレコード

返り値

( void )

なし

引数

( NSAppleEventDescriptor * )descriptor

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

( AEKeyword )keyword

アップルイベントキーワード

クラス

NSAppleEventDescriptor

Instance Methods

使用可能

10.0

参照

例文

#import "Controller.h"

@implementation Controller

- (IBAction)pushButton:(id)sender
{
NSAppleEventDescriptor *desc1=[ NSAppleEventDescriptor recordDescriptor ];
NSAppleEventDescriptor *aeDesc=[ NSAppleEventDescriptor recordDescriptor ];

[ aeDesc setDescriptor:desc1 forKeyword:'usrf' ];

NSLog([NSString stringWithFormat:@"%d",[aeDesc numberOfItems]]);

}

@end