Re: True-False vs True-Error
Re: True-False vs True-Error
- Subject: Re: True-False vs True-Error
- From: email@hidden
- Date: Sun, 12 Oct 2008 17:11:31 +0200
Title: Re: True-False vs True-Error
At 10:04 AM -0500 10/12/08, Luther Fuller wrote:
Something I noticed while commenting on
"Detecting Applescript and SKYPE" ...
The Finder's 'exists' command is defined in the Finder's dictionary as
having a Boolean result.
To quote: "Å® boolean : true if it exists, false if
not"
But this code does not have that behavior ...
tell application
"Finder"
exists application file id
"com.unknown.something"
end
tell
It does return true if it exists, but returns error -10814 if it does
not exist.
A boolean result should return true or false, not true or error.
Easily fixed with a try block, but why should that be
necessary?
Is there a bug hiding here?
Tricky command to document ... it's like, you could write:
exists alias ("non-existing" & "calculated
path")
and get an error, because AppleScript did not even make it to the
"exists" command, it failed before.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden