Re: button titles
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.