Re: POSIX file wierdness
Re: POSIX file wierdness
- Subject: Re: POSIX file wierdness
- From: Alastair Rankine <email@hidden>
- Date: Sat, 07 May 2005 07:22:59 +1000
Bill Cheeseman wrote:
Compile this, and the script itself changes to
class of file ":foo"
And if you avoid the compile-time conversion by putting the path into a
variable, the result of the 'POSIX file <my variable>' command will also
have a leading colon, which is incorrect AppleScript usage.
This is OK, it still runs and gives the expected result:
«class furl»
Yes, in Panther. As noted above, this is not guaranteed to continue working
in future.
If you pass a full POSIX (i.e., slash-delimited) path string to 'POSIX
file', you should get correct results.
OK so you're basically saying that "foo" isn't a "slash-delimited path"
as required by the POSIX file extension, and so all bets are off?
FYI I get exactly the same results with a path that has slashes in it:
class of POSIX file "/Users/alastair"
changes to the following when compiled:
class of file "al2book:Users:alastair"
This also executes successfully, but If I make a trivial change to this
script it will produce the NSCannotCreateScriptCommand error.
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 this is indeed a correct result I'd like to know why.
Thanks,
_______________________________________________
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