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

Re: button titles


  • Subject: Re: button titles
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 2 Aug 2004 14:28:28 -0700

On Aug 1, 2004, at 4:34 PM, Martin Crisp wrote:

Possibly stupid question... what is AppleScript's behaviour wrt button labels on non-English Systems? ... do buttons need to retain their English labels, or do they have to adopt(somehow) the localised label, or does the system replace 'English Standard' buttons with '<foo> Standard' buttons, or some other that didn't occur to me?]

If you don't specify any button titles, you get localized "OK" and "Cancel" buttons.

If you specify your own button titles with the "buttons" parameter, you get buttons with those titles. (No surprise there, hopefully.)

Here's the tricky bit: if you specify your own button titles, and one of them is either "Cancel" or the localized "Cancel" string, then that button acts as the "cancel" button -- it responds to command-period and escape, and pressing it will cause the "display dialog" call to throw a "user canceled" error. There is no way to specify the "cancel" button otherwise. [1]

There is no equivalent in stock AppleScript to Studio's "localized string" command [2], so it's difficult to provide your own localized text (such as a button title) in an applet.


--Chris Nebel
Apple Development Tools

[1] At least, not yet. There's a bug filed on this.
[2] Ditto.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: button titles
      • From: Martin Crisp <email@hidden>
    • Re: button titles
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Control Scripteditor (From: Martin Crisp <email@hidden>)

  • Prev by Date: Re: Scripting Transmit
  • Next by Date: GraphicConverter, iPhoto & IPTC Tags Help Needed
  • Previous by thread: Re: Control Scripteditor
  • Next by thread: Re: button titles
  • Index(es):
    • Date
    • Thread