• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AppleScript-ObjC Bridge - NSDictionary/Record Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: AppleScript-ObjC Bridge - NSDictionary/Record Question
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: AppleScript-Users Digest, Vol 12, Issue 547
  • Next by Date: Re: AppleScriptObjC Problem?
  • Previous by thread: Re: AppleScript-Users Digest, Vol 12, Issue 547
  • Next by thread: Re: AppleScript-ObjC Bridge - NSDictionary/Record Question
  • Index(es):
    • Date
    • Thread