スイート名とクラス名と属性の辞書でスクリプトクラス定義を作って返します
-(id)initWithSuiteName:(NSString *)suiteName: className:(NSString *)className: dictionary:(NSDictionary *)descriptions:
解説
スイート名とクラス名と属性の辞書でスクリプトクラス定義を作って返します。
返り値
( id )
オブジェクト
引数
( NSString * )suiteName
スイート名
( NSString * )className
クラス名
( NSDictionary * )descriptions
属性の辞書
フレームワーク
Foundation
クラス
NSScriptClassDescription
Instance Methods
使用可能
10.0
参照
例文
//スクリプトコマンド辞書 NSDictionary *dicToOneRelationships = [NSDictionary dictionary]; NSDictionary *dicToManyRelationships = [NSDictionary dictionary]; NSDictionary *dicSupportedCommands = [NSDictionary dictionaryWithObjectsAndKeys: @"retCommand:",@"test.ScriptControll", nil]; NSDictionary *dicInverseRelationships = [NSDictionary dictionary]; NSDictionary *dicSource = [NSDictionary dictionaryWithObjectsAndKeys: @"Myou",@"AppleEventCode", @"NO",@"ReadOnly", @"NSNumber<Int>",@"Type",nil]; NSDictionary *dicAttributes = [NSDictionary dictionaryWithObjectsAndKeys: dicSource,@"source", nil]; NSDictionary *dicScriptControll = [NSDictionary dictionaryWithObjectsAndKeys: dicToOneRelationships,@"ToOneRelationships", dicToManyRelationships,@"ToManyRelationships", dicSupportedCommands,@"SupportedCommands", @"NSCoreSuite.AbstractObject",@"Superclass", dicInverseRelationships,@"InverseRelationships", dicAttributes,@"Attributes", @"MyOb",@"AppleEventCode", nil]; //スクリプトコマンド記述作成 NSScriptClassDescription *scd = [[NSScriptClassDescription alloc] initWithSuiteName:@"test" className:@"MyObject" dictionary:dicScriptControll ]; NSNumber * number = (NSNumber *)[[sCommand evaluatedArguments] objectForKey:@"withNumber"]; NSLog([scd description]);