Re: button titles
Re: button titles
- Subject: Re: button titles
- From: Martin Crisp <email@hidden>
- Date: Tue, 3 Aug 2004 12:01:39 +1000
- Organization: Tesseract Computing
On Tue, 3 Aug 2004 07:28:28 +1000, Christopher Nebel wrote
(in message <
email@hidden>):
>
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.)
Well, I'd /kinda/ hoped that if I specified titles that were the
same as the defaults, it might swap-em :-) but, no, not surprised.
>
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]
Tres Bien :-)
Context is a compiled Script, loaded & run by an application (which
doesn't 'store script' afterwards, so goodbye property changes).
The host-App requires that scripts detail some things in a plist
(keyword used to invoke, file associated, ...). My script reads the
plists looking for a 'properties' dictionary (not currently a
requirement of the plists) and allows user to respecify values for
the properties (in the script) by value or by expression.
So if I ship mine with the buttons specified as 'OK' and 'Cancel',
it'll behave right but look wrong on non-English systems, but user
can edit the labels to get both look /and/ feel :-)
[I'm trapping 'cancels from non-standard buttons' anyway, to be
sure...]
>
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.
Pff, why let such things get in the way ;-)
>
[1] At least, not yet. There's a bug filed on this.
>
[2] Ditto.
Will keep an eye out.
Thanks much for the info.
Have Fun
Martin
_______________________________________________
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.