• 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
Re: AppleScript-ObjC Bridge - NSDictionary/Record Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript-ObjC Bridge - NSDictionary/Record Question


  • Subject: Re: AppleScript-ObjC Bridge - NSDictionary/Record Question
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 13 Nov 2015 09:41:23 +1100
  • X_v_e_cd: 785f415b80786255e7a6fc7635f44178
  • X_v_r_cd: 22df05ef4e9669f61c56f67a0e7ede19

On 12 Nov 2015, at 11:04 PM, Dave <email@hidden> wrote:
>
> 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];

You can use exactly that: AS record keys are bridged with string keys in Objective-C.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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


References: 
 >AppleScript-ObjC Bridge - NSDictionary/Record Question (From: Dave <email@hidden>)

  • Prev by Date: Re: AppleScriptObjC Problem?
  • Next by Date: Re: Load Script Problem
  • Previous by thread: AppleScript-ObjC Bridge - NSDictionary/Record Question
  • Next by thread: Load Script Problem
  • Index(es):
    • Date
    • Thread