Re: POSIX file wierdness
Re: POSIX file wierdness
- Subject: Re: POSIX file wierdness
- From: Alastair Rankine <email@hidden>
- Date: Mon, 09 May 2005 22:18:23 +1000
Bill Cheeseman wrote:
This also executes successfully, but If I make a trivial change to this
script it will produce the NSCannotCreateScriptCommand error.
Perhaps this is because the edited path doesn't correspond to an actual file
on disk? Try changing the file name in the Finder first, then editing your
script. Does it work now? Alias references have always had this compile-time
restriction, and perhaps it has been extended to this syntax.
I deliberately didn't choose to make this an alias because I encountered
this problem while scripting the creation of a new file. I was under the
impression that the "file specification" type was used for exactly this,
and was being replaced by typeFileURL (a.k.a "POSIX file").
From my perspective this is extremely broken behaviour. Not only is the
AppleScript compiler semantically changing my source code, it's actually
breaking it.
If my suggestions above pan out, then it isn't broken. The semantic changes
are a designed-in feature with a long pedigree, and so is the alias
reference restriction. It's just a matter of learning the quirks of any
language.
I agree with your last sentence, but maybe we have different standards
for what makes a "quirk". In my mind, python's reliance on whitespace is
a quirk. Perl's line-noise syntax is a quirk.
The AppleScript compiler _breaking your source code_ is not a quirk.
That's just fundamentally broken. Lossage of the highest order. At
_best_ it's a bug.
I'm reading some of the comments in the other "O'Reilly Automator
article" thread. My example would seem on the face of it to be an
excellent example of why AppleScript needs major renovation/replacement,
as some have suggested. Despite your help - and I thank you for it - I
am unable to see any rational basis for the behaviour I am seeing from
AppleScript, and hence I'm starting to agree with them.
_______________________________________________
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