loadSuiteWithDictionary:fromBundle:
指定したバンドルのスクリプト定義辞書からスイートを読み込みます
-(void)loadSuiteWithDictionary:(NSDictionary *)dictionary: fromBundle:(NSBundle *)bundle:
解説
指定したバンドルのスクリプト定義辞書からスイートを読み込みます。
【dictionary】
● Name スイートの.ScriptSuiteのファイル名称
● AppleEventCode スイートのアップルイベントコード
返り値
( void )
なし
引数
( NSDictionary * )dictionary
スクリプト定義辞書
( NSBundle * )bundle
バンドル
フレームワーク
Foundation
クラス
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]]); }