• 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: Display dialog Return - Bug or Feature?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display dialog Return - Bug or Feature?


  • Subject: Re: Display dialog Return - Bug or Feature?
  • From: John Delacour <email@hidden>
  • Date: Mon, 12 Aug 2002 20:10:37 +0100

At 8:13 am -0700 12/8/02, Paul Berkowitz wrote:

display dialog "Enter x, type return, enter x, click OK." default answer ""
buttons {"Thinking", "Don't Cancel", "OK"} with icon 1

set x to text returned of result

Do what it says. What's your result, and what OS/As are you using?
In OS 10.1.5, AS 1.8.3, the result is

"x
x"

Well that's just the point Paul. On my machine running OS 10.1.5 and ... ah! AS 1.7 according to the info box .......mmmm.... I get

"xx"

So that seems to be the answer. 1.8.3 is a heap of trash and 1.7 is terrific except that it crashes at the slightest provocation. Take your pick :-)

(In reply to whether any changes have been made to display dialog, several
changes have occurred in X: there's a bug in that default answers are not
pre-selected, and there were several bugs to do with the prompt getting
truncated which got fixed in AS 1.8/OS 10.1.2. There's still another bug to
do with icons overrunning buttons when it's one line long, three buttons and
no default answer.)

If you want to see the other bug, run:

display dialog "A single line with 3 buttons and an icon." buttons
{"Thinking", "Don't Cancel", "OK"} with icon 1

Look absolutely fine using AS 1.7, so your problem is trusting AppleScript to get better instead of the worse that history announces!

All solved :-)

JD

tell application "Finder" to get file of process "Script Editor"
info for result -- ie the .app package?
{name:"Script Editor.app", creation date:date "Friday, February 15, 2002 1:35:16 am", modification date:date "Monday, August 5, 2002 8:57:40 pm", icon position:{0, 0}, visible:true, size:8.55389E+5, folder:true, alias:false, name extension:"app", extension hidden:true, package folder:true, file type:"APPL", file creator:"ToyS", displayed name:"Script Editor", default application:alias "dx:Applications:AppleScript:Script Editor.app:", folder window:{0, 0, 0, 0}}

info for alias "dx:Applications:AppleScript:Script Editor.app:Contents:MacOS:Script Editor" -- ie the thing inside

{name:"Script Editor", creation date:date "Tuesday, July 30, 2002 10:10:42 am", modification date:date "Tuesday, July 30, 2002 10:10:42 am", icon position:{0, 0}, visible:true, size:4.4892E+5, folder:false, alias:false, name extension:missing value, extension hidden:false, package folder:false, file type:"", file creator:"", displayed name:"Script Editor", locked:false, busy status:false, short version:"", long version:""}
_______________________________________________
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: Display dialog Return - Bug or Feature?
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Display dialog Return - Bug or Feature? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: What type is the finder selection?
  • Next by Date: Re: do shell script bug
  • Previous by thread: Re: Display dialog Return - Bug or Feature?
  • Next by thread: Re: Display dialog Return - Bug or Feature?
  • Index(es):
    • Date
    • Thread