Re: Script Editor Crashing.....
Re: Script Editor Crashing.....
- Subject: Re: Script Editor Crashing.....
- From: Dave <email@hidden>
- Date: Wed, 16 Mar 2016 10:38:30 +0000
Hi Again,
Thanks a lot for this. So if I follow correctly, I should change all “as string” clauses to “as text”? For some reason I thought that text and string were different and that I needed to use “as string” to make it work with the AppleScript-ObjC Bridge? Is this correct?
Also is there anywhere that documents what the different types map to from AS to Obj-C and vice-versa? For instance is "as record” an NSDictionary?
All the Best
Dave
> On 15 Mar 2016, at 23:50, Shane Stanley <email@hidden> wrote:
>
> On 16 Mar 2016, at 6:05 AM, Stockly, Ed <email@hidden> wrote:
>>
>> But it doesn't do the same thing as "as string."
>>
>> It does what as string used to do but "as string" is not to be used anymore.
>
> Not quite. The issue is context.
>
> On their own, "as string" and "as text" are identical. The issue is what happens within application tell blocks, because lots of applications have their own string class. So "as text" is generally safer.
>
> There are at least two exceptions. InDesign has a clash with the four-letter code for text, so you have to use "as text" (or "as Unicode text") inside it's scope. And in 10.10 and earlier, "as string" could be problematic in some circumstances with an NSString.
>
> --
> 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
_______________________________________________
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