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:50 +0000
Hi,
In AppleScript a Record is 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
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden