• 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: Renaming Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Renaming Files


  • Subject: Re: Renaming Files
  • From: Christopher Nebel <email@hidden>
  • Date: Sat, 28 Jul 2001 17:48:58 -0700

On Saturday, July 28, 2001, at 03:13 PM, Shane Stanley wrote:

On 29/7/01 5:00 AM +1000, Jon Pugh, email@hidden, wrote:

So you are saying that the default translated cancel buttons don't
automatically generate a -128 like they do for english buttons?

For example, I often use "display dialog foo" so that I can press return (ok)
to keep going or escape (cancel) to stop. This is all done by the display
dialog scripting addition.

If this is true, I'd call it a bug.

I think the problem only occurs when you actually call a button "Cancel", as
opposed to when the addition generates one.

Correct. If you don't give explicit button names, then you get the default "ok" and "cancel", appropriately translated, and all the standard behavior that goes with them. If you do, then "display dialog" checks to see if any of them matches the name of the cancel button as it appears in the addition resources. If it does, then that one is the cancel button. This means that you can do something like 'buttons {"Cancel", "Rename"}' or even 'buttons {"Rename", "Cancel"}' and the button that says "cancel" will act like it, but only on English systems. This is a weakness, certainly, but it's not possible to fix it without changing the syntax for "display dialog."


--Chris Nebel
AppleScript Engineering


References: 
 >Re: Renaming Files (From: Shane Stanley <email@hidden>)

  • Prev by Date: Icon picture: Trying again and sharing results
  • Next by Date: Re: Renaming Files
  • Previous by thread: Re: Renaming Files
  • Next by thread: Re: Renaming Files
  • Index(es):
    • Date
    • Thread