POSIX file wierdness
POSIX file wierdness
- Subject: POSIX file wierdness
- From: Alastair <email@hidden>
- Date: Fri, 06 May 2005 21:04:05 +1000
Hi,
I am returning to AppleScript after about a 7 (?) year absence. It's not
like riding a bike...
The Script Editor shows some strange (to me) behaviour which I blogged
about and was perhaps unfairly harsh. If anyone can help me achieve
enlightenment I'd appreciate it.
To reproduce, enter the following into the Script Editor:
class of POSIX file "foo"
Compile this, and the script itself changes to
class of file ":foo"
This is OK, it still runs and gives the expected result:
«class furl»
But if I make a trivial change - add and remove a space for example - it
no longer works and gives a runtime error
"NSCannotCreateScriptCommandError".
For what it's worth, here's my theory. The "POSIX file" construct
creates a new expression (?) of typeFileURL at compile time. The Script
Editor (?) re-renders this compiled expression back into AppleScript but
prefers the old-style HFS representation of the expression, hence
changes the syntax. The next time it's compiled it becomes typeFSSpec.
Am I close to being right?
Is this changed/fixed in Tiger?
_______________________________________________
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