• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
POSIX file wierdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: POSIX file wierdness
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: What is the best way to get the name (without the extension) of a file?
  • Next by Date: Re: Nice Automator article on O'Reilly
  • Previous by thread: Re: Script as internet helper protocol in tiger
  • Next by thread: Re: POSIX file wierdness
  • Index(es):
    • Date
    • Thread