Re: Aliases in AppleScripts
Re: Aliases in AppleScripts
- Subject: Re: Aliases in AppleScripts
- From: Cliff Pruitt <email@hidden>
- Date: Fri, 14 May 2004 17:25:49 -0400
Ultimately, however, it's not a good system. There are just too many
file types, and the differences between them are extremely subtle. I
actually have a cunning plan to get down to exactly one "file" type,
but it may or may not ever see the light of day, because it would break
existing scripts that rely on the existence of and semantic differences
between "file", "file specification", "alias", and "<<class furl>>".
I am, however, adamant that files should be considered objects in their
own right -- path strings are not files, and files are not path
strings. Maintaining this distinction is critical in at least some
places, AppleScript syntax being what it is. Consider the difference
in meaning:
length of "Some:string:that:looks:like:a:path"
length of file "Macintosh HD:Users:me:Documents:something clever"
Once you're required to make the distinction in some places, I maintain
that AppleScript should be consistent and require it everywhere.
--Chris Nebel
AppleScript Engineering
Why couldn't the names of the old file types be synonymous with the new
file type for several versions allowing legacy scripts to continue
unbroken? Keep in mind I have no CLUE what I'm talking about, so maybe
thats just not how it works.
OK my lack of experience is going to make this a little fuzzy because
of lack of actual examples, but it seems like AppleScript can't decide
what type of... Path(?) it wants to use as far as display. It seems
like if I manually reference something manually I need to use mac
styled delimiters (:) but if I drop something on, say a AS Studio drop
zone, it returns a POSIX path. Maybe my example is backward or maybe
its just altogether off, but I'm a little confused about what type of
path syntax AS expects to be working with. Is there a hard & fast
distinction between using POSIX & Mac Paths & switching between them?
I'd love to see some AS documentation broken down a little more into
real world examples or "situational" topics. The AS documentation
seems to have everything in it, but at times its so brief its like it
assumes you have AS background that I just don't have. Something like
a series of tutorials or explanations based on topics like:
Working With Paths
Manually Referencing a file in a specific folder
Tracking a file that may move
working with special folders (home, library, desktop, etc...)
data types used in working with files & paths
Working with Collections of Files
Working with text
Converting data types into text
Converting text strings into other data types
Finding and replacing text in strings
reading from text files
writing to text files
formatting rtf text
Something that lets me look up documentation by finding something close
to what I'm trying to do, at the moment. Even if it was just a
supplementary "alternate index" with links to current references in the
language guide. At least it would tell me what is involved in the
process and where to find the documentation. Its taken me so long to
get this far because I had nothing clear & concise to tell me that I
had the various data types to consider & coercion issues to think
about. I just figured "I'm typing in the path, why wont AS read it?"
Of course its entirely possible that the AS documentation is just fine
& I'm just dumb. One never knows for sure... :-)
- Cliff
_______________________________________________
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.