Re: Applescript in the future
Re: Applescript in the future
- Subject: Re: Applescript in the future
- From: Shane Stanley <email@hidden>
- Date: Thu, 23 May 2013 11:43:49 +1000
On 23/05/2013, at 10:43 AM, Alex Zavatone <email@hidden> wrote:
> Are the docs for that in the NSURL reference class, the file system programming guide or where?
I can't remember where I read it, but I think it was something Chris Nebel said. But...
The dictionary (wrongly) says it requires an alias. This is a mistake in the scripting dictionary template; it should say 'file'. (This mistake has been around in app dictionaries forever...) But when you pass a path, Cocoa scripting can turn it into a file, so you can often get away with passing a path.
The problem is that you can't tell a sandboxed app to make a file from any old path. But if you pass it a file, which is just a wrapped NSURL, it accepts it the same as if the user picked it in an open panel.
The bottom line: use files or aliases rather than paths when scripting sand-boxed apps.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <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