Re: decompilation insanity
Re: decompilation insanity
- Subject: Re: decompilation insanity
- From: Emmanuel <email@hidden>
- Date: Thu, 20 Oct 2005 21:45:32 +0200
At 4:34 PM -0400 10/19/05, Mark J. Reed wrote:
3) regardless of the answers to the above, why, oh why, did the AS
folks design file, posix file, and file url this way?
I think that this crucial question did not get an answer, so here are
my two cents.
"file" is a compact type where the OS stores the file as: an ID for
the volume, an ID for the directory, and a name, less than 64
characters long, but Finder really supports only 32.
"file" is not good because the ID's may change, and the files' names
may be longer than 64 or 32, so storing a "file" is unsafe.
"alias" is a powerful Mac-only type which follows the file. It can
reference only existing files: you won't make *nor manipulate* an
alias to a non-existing or non-present file.
"file url", more exactly «class furl», is the modern way of storing
files, it's exactly an URL, if you read byte by byte a «class furl»
you basically find: file://localhost/Users/path/to/file. Of course it
need not exist.
What is cool with «class furl» is that it's an URL: extensible to
other protocols, with a string representation, multi-platform, etc.
For instance in Smile 3 you can now transparently edit a document
through ftp: Smile accepts a ftp or http URL as the "path name" of a
window, as well as a "file" URL.
The confusion comes from the fact that when asked to display a «class
furl», AppleScript displays file "path:to:file". Don't care about
that, and in modern applications get gradually used to the fact that
more and more commands which expect a reference to a file will accept
a string which must be a valid URL (for instance,
file://localhost/blah), and start thinking «class furl».
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden