Re: updating old nsapplescript methods
Re: updating old nsapplescript methods
- Subject: Re: updating old nsapplescript methods
- From: Jerry Krinock <email@hidden>
- Date: Sat, 10 Mar 2012 05:54:32 -0800
On 2012 Mar 10, at 01:07, Rick C. wrote:
> I have a number of older nsapplescript methods in a project that I would like to update to something newer.
Huh?
> the non-thread safety is an issue
Maybe you've made the mistake of reading the class documentation,
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSAppleScript_Class/Reference/Reference.html
which says:
"Important You should access NSAppleScript only from the main thread."
without reading the Release Notes (now three years old),
https://developer.apple.com/library/mac/#releasenotes/AppleScript/RN-AppleScript/RN-10_6/RN-10_6.html
which says, surprise!,
"OSA and AppleScript are now thread-safe: they may be safely called on a non-main thread … This also applies to NSAppleScript."
(Thanks to AppleScript guru Shane Stanley for finding that.)
> and always dealing with quotations and having to escape them is a bit of a pain.
That's life.
> I know I can use nstask for some
That's a pain.
> and I'm a little familiar with scripting bridge
That's real pain!
> but just wanted to get some opinions.
I submitted a "not helpful" on the documentation last October. Maybe if everyone on the list does the same it will be fixed someday.
_______________________________________________
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