Re: error 10
Re: error 10
- Subject: Re: error 10
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 31 Aug 2003 09:59:51 -0700
On 8/31/03 9:35 AM, "Christopher Nebel" <email@hidden> wrote:
>
On Aug 31, 2003, at 8:47 AM, Paul Berkowitz wrote:
>
>
> [I]n OS X you are supposed to save files in Unicode file paths,
>
> NOT 'as file specification', although both should be coerced to the
>
> 'real"
>
> fileURL.
>
>
That's a severe over-generalization. While it's true that Cocoa
>
applications tend to take POSIX path strings instead of file/alias
>
objects, that's a design flaw, not officially sanctioned behavior, and
>
certainly not a future direction. Most Apple applications have been
>
(or will be Real Soon Now) cleaned up to accept file/alias objects,
>
though they'll also still accept POSIX path strings for backward
>
compatibility.
TextEdit is the only app I've run into that wants POSIX paths. And that's
known to be a bug, yes: you've said so before. But all other apps - not just
Apple apps - will take colon-separated (regular AppleScript-type) Unicode or
string file paths, as they always have (Unicode added with AS 1.8.3 or
thereabouts). The Apple apps, and a few others, correctly state in their
dictionaries:
save: Save an object.
save reference -- the object for the command
[in Unicode text] -- The file in which to save the object.
It was you yourself, Chris, who explained to me how the "over-generalized "
then-new system of fileURLs worked, back when OS 10.1/AS 1.6 was being
released, and there's something about it in the OS 10.1 release notes. As I
recall, the file path Unicode text (then string) format is actually coerced
by AppleScript itself to the underlying fileURL format for the file system.
You said that would always be the case (It had always been the case in OS
8/9 that string file paths got coerced to file specification without
intervention of Jon's or Akua, as some had thought, so this behavior was an
OS X adaptation of the same thing.)
I'm glad that 'file' will now always work again to create new files. But
that's not an option in apps which have their own 'file' implementation such
as Entourage, which override the system's 'file' when within an app's tell
block, To 'save' anything, you have to be in the app's tell block, so saving
in 'file' has never worked for those apps, but saving in string or Unicode
text always has. So please do not remove the now-established "Unicode text"
implementation, or coercion. (You never implied you were going to, but this
is just a reminder that it absolutely needs to remain in place.) It's the
_only_ way to save files from apps which have their own 'file', and should
go on working in other apps too. If it also works with 'file' in those other
apps, so much the better.
I wonder if you could comment on the last paragraph of that same message of
mine referring to discussion of new Panther AppleScript features (mostly in
Apple apps) on this list. Can we do it? It's under NDA, but it would be nice
if that restriction could be removed for something as arcane as AppleScript
- not likely to get the rumor sites jumping up and down. Unless there's
another forum somewhere?
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: error 10 (From: Christopher Nebel <email@hidden>) |