• 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
Localising dialog buttons [was: Finding and deleting specific extensions]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Localising dialog buttons [was: Finding and deleting specific extensions]


  • Subject: Localising dialog buttons [was: Finding and deleting specific extensions]
  • From: Richard Morton <email@hidden>
  • Date: Tue, 16 Sep 2003 14:37:30 +1000

On Tuesday, September 16, 2003, at 06:23 AM, Rob Jorgensen wrote:
Maybe I don't understand this issue well enough to comment (not uncommon) but I've always wondered why display dialog doesn't return the button number in addition to the other items in the record. The button number is used to set the default button so why not elsewhere?

Defining buttons separately allows number & names of buttons to be changed on the fly & means that one can refer to an item in the list:

set bList to {"Cancel", "DoThis", "DoThat"}

display dialog "hi" buttons bList default button (last item of bList)
set b to button returned of result
if b is item 2 of bList then
-- do something
end if


Wouldn't this overcome language issues?

I may not be understanding it fully either, but I don't see it as offering any more than just the simple call to display dialog, which (I believe) produces button names in the primary language:

display dialog "hi"

Generally speaking, if the script continues after this then the "OK" button was clicked, regardless of what it was called. If the "Cancel" button was clicked, the script or handler will error number -128 (user cancel) and this can be trapped or passed or whatever.

The issue is more difficult if one requires a 3rd button, because they must all be specified, or a cancel & "Continue" button, for example.

Still, as boo noted elsewhere, is there any point in throwing a dialog with an English message and (say) French button names? In other words, any script that is truly localised will have to set the dialog language. I can't immediately see how having to localise the button names is going to add extra complexity to this.


-- Rob (willing to ask stupid questions if it leads to a solution) :P

Didn't somebody say that there are no stupid questions, only stupid answers?

O K Coral
-- hoping not to have just provided one
_______________________________________________
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: Localising dialog buttons [was: Finding and deleting specific extensions]
      • From: Rob Jorgensen <email@hidden>
References: 
 >Re: Finding and deleting specific extensions. (From: Rob Jorgensen <email@hidden>)

  • Prev by Date: Re: stupid question #17: volume
  • Next by Date: Re: Localising dialog buttons [was: Finding and deleting specific extensions]
  • Previous by thread: Re: Finding and deleting specific extensions.
  • Next by thread: Re: Localising dialog buttons [was: Finding and deleting specific extensions]
  • Index(es):
    • Date
    • Thread