• 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: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


  • Prev by Date: Issue with NSTokenFieldCell in NSTableView and bindings..
  • Next by Date: Re: More AppleScript-ObjC Bridge Weirdness
  • Previous by thread: Re: Issue with NSTokenFieldCell in NSTableView and bindings..
  • Next by thread: Yet another autolayout question
  • Index(es):
    • Date
    • Thread