• 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: Paul Berkowitz <email@hidden>
  • Date: Mon, 02 Aug 2004 17:17:39 -0700

On 8/2/04 2:28 PM, "Christopher Nebel" <email@hidden> wrote:

>
> 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]

The way to do it is to make it a " Cancel " button, with spaces. That
doesn't trigger 'user canceled' error number -128 so you can specify any
code you need before calling error number -128 explicitly to conclude the
effort.
>
> 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.

Now that would be nice...
>
>
> --Chris Nebel
> Apple Development Tools
>
> [1] At least, not yet. There's a bug filed on this.
> [2] Ditto.


--
Paul Berkowitz
_______________________________________________
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.


References: 
 >Re: button titles (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: [OT] keyboard shortcuts (was Re: Control Scripteditor)
  • Next by Date: Re: button titles
  • Previous by thread: Re: button titles
  • Next by thread: Re: button titles
  • Index(es):
    • Date
    • Thread