AppleScript-ObjC Bridge - NSDictionary/Record Question
AppleScript-ObjC Bridge - NSDictionary/Record Question
- Subject: AppleScript-ObjC Bridge - NSDictionary/Record Question
- From: Dave <email@hidden>
- Date: Thu, 12 Nov 2015 12:04:53 +0000
Hi,
In AppleScript a Record is a Dictionary, but the “keys” have to be hard coded, for example:
property pMessageDictionary : {kMessageID:"", kMessageClass:"", kMessageSubject:"", kMessagePlainContent:"", kMessageHTMLContent:"", kMessageRecipientArray:{}}
set kMessageSubject of pMessageDictionary of me to the subject of myMessage
I’m using the AppleScript-ObjC Bridge to call a Script in a .applescript file in my XCode Project, I’m wondering if there is anyway of using a variable as the Key? e.g. the equivalent of:
NSString* myKey;
myKey = <get the Key somehow>
[self.pMessageDictionary setObject:@“HELLO WORLD” forKey:myKey];
Thanks a lot, All the Best
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden