Re: Puzzling display dialog
Re: Puzzling display dialog
- Subject: Re: Puzzling display dialog
- From: Christopher Nebel <email@hidden>
- Date: Wed, 21 Feb 2007 14:19:08 -0800
On Feb 18, 2007, at 4:31 PM, Luther Fuller wrote:
This is a very puzzling error. My script contains the line ...
tell me to display dialog the result with title dTitle buttons
{"Cancel", "Automatic", "Manual"} default button 3
The dialog displays properly, but when I click "Manual" or
"Automatic", I get the error message ...
"The cancel button cannot be the same as the default button."
After many recompiles, (I'll spare you the details), I finally
found the cause!
AFTER the dialog was the line ...
tell application "Finder"
set comment of (alias file "x" of someAlias) to anInteger & tab &
someText
end tell
I changed this (finally!) to ...
( anInteger as Unicode text) & tab & someText as unicode text
tell application "Finder" to set comment of (alias file "x" of
someAlias) to the result
Now it works, but that's a strange error returned by the Finder.
Has anyone seen this before? And is there more to be known about this?
I think you're confusing the source of the error with a slightly
earlier command. Also, be aware that if you tell an application,
such as Finder, to do a scripting addition command and the command
throws an error, it will be reported as coming from the application.
That doesn't make it the application's fault.
That error is specifically from "display alert", and occurs when you
specify both the cancel button and the default button to be the same
thing.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden