• 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
Re: Puzzling display dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Puzzling display dialog
      • From: Luther Fuller <email@hidden>
References: 
 >Puzzling display dialog (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Looking for AppleScripters willing to help …
  • Next by Date: Re: Looking for AppleScripter willing to help Š
  • Previous by thread: Re: Puzzling display dialog
  • Next by thread: Re: Puzzling display dialog
  • Index(es):
    • Date
    • Thread