macOS/iOS API解説

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

目次

loadSuiteWithDictionary:fromBundle:

指定したバンドルのスクリプト定義辞書からスイートを読み込みます
-(void)loadSuiteWithDictionary:(NSDictionary *)dictionary:
                 fromBundle:(NSBundle *)bundle:

解説

指定したバンドルのスクリプト定義辞書からスイートを読み込みます。
【dictionary】
● Name スイートの.ScriptSuiteのファイル名称
● AppleEventCode スイートのアップルイベントコード

返り値

( void )

なし

引数

( NSDictionary * )dictionary

スクリプト定義辞書

( NSBundle * )bundle

バンドル

クラス

NSScriptSuiteRegistry

Instance Methods

使用可能

10.0

参照

- loadSuitesFromBundle:
- registerClassDescription:
- registerCommandDescription:, + sharedScriptSuiteRegistry:
+ sharedScriptSuiteRegistry:

例文

- (IBAction)myAction:(id)sender;
{
//スクリプトコマンド辞書     
NSScriptSuiteRegistry *sRegistry =[NSScriptSuiteRegistry sharedScriptSuiteRegistry];

NSScriptCommandDescription *scmd ;
NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:
@"test",@"Name",
@"Test",@"AppleEventCode",
nil];
[sRegistry loadSuiteWithDictionary:dic 
                fromBundle:[NSBundle mainBundle]];

NSLog([NSString stringWithFormat:@"%@",[sRegistry description]]);
NSLog([NSString stringWithFormat:@"%@",[[sRegistry commandDescriptionsInSuite:@"test"] description]]);

}