setReceiversSpecifier:
レシーバの指示子をセットします
-(void)setReceiversSpecifier:(NSScriptObjectSpecifier *)receiversSpec:
解説
レシーバの指示子をセットします。
返り値
( void )
なし
引数
( NSScriptObjectSpecifier * )receiversSpec
レシーバの指示子
フレームワーク
Foundation
クラス
NSScriptCommand
Instance Methods
使用可能
10.0
参照
- evaluatedReceivers
- receiversSpecifier
例文
// Apple Scriptコマンド -(NSNumber *) retCommand:(NSScriptCommand *)sCommand { //スクリプト記述用の辞書 NSDictionary *dicSource = [NSDictionary dictionaryWithObjectsAndKeys: @"Myou",@"AppleEventCode", @"NO",@"ReadOnly", @"NSNumber<Int>",@"Type",nil]; NSDictionary *dicSupportedCommands = [NSDictionary dictionaryWithObjectsAndKeys: @"retCommand",@"test.ScriptControll", nil]; NSDictionary *dicMyObject = [NSDictionary dictionaryWithObjectsAndKeys: @"MyOb",@"AppleEventCode", dicSource,@"Attributes", [NSNull class],@"InverseRelationships", @"NSCoreSuite.AbstractObject",@"Superclass", dicSupportedCommands,@"SupportedCommands", [NSNull class],@"ToManyRelationships", @"",@"ToOneRelationships", nil]; NSScriptClassDescription *scDesc = [[NSScriptClassDescription alloc] initWithSuiteName:@"test" className:@"MyObject" dictionary:dicMyObject]; //indexSpecifierを作る NSIndexSpecifier *indexSpecifier = [[[NSIndexSpecifier allocWithZone:[self zone]] initWithContainerClassDescription:scDesc containerSpecifier:nil key:@"orderedDocuments" index:1] autorelease]; NSNumber * number = (NSNumber *)[[sCommand arguments] objectForKey:@"withNumber"]; [sCommand setReceiversSpecifier:indexSpecifier]; NSLog([[sCommand directParameter] className]); return number; }