• 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: Puzzling display dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Puzzling display dialog


  • Subject: Re: Puzzling display dialog
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 23 Mar 2007 08:32:12 -0500

I originally asked about this on February 18, 2007. The problem was the error message "The cancel button cannot be the same as the default button." which appeared when it shouldn't have. It has been a very elusive and unreproducible problem. A few days ago, while working on an unrelated problem, the error message appeared again.

The original code, which works perfectly, is ...

tell application "Finder" to set selfRef to (path to me) as alias
--
activate me
tell me to display alert title message instText buttons btnList default button "OK"
button returned of the result
if the result = "Help" then
tell application "Finder"
open file "My Doc.pdf" of folder "Resources" of folder "Contents" of selfRef
end tell
else if ...


When I replaced the "open file ..." line with this ...
	open file (selfRef as text) & "Contents:Resources:My Doc.pdf"
the dreaded "cancel button" error message appeared.

I then replaced this with ...
	(selfRef as text) & "Contents:Resources:My Doc.pdf"
	open file the result
and the script again behaved correctly.

This morning, I repeated these steps and obtained the same result.

Does anyone have any idea what's going on here?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Puzzling display dialog
      • From: KOENIG Yvan <email@hidden>
  • Prev by Date: Re: Two quick questions
  • Next by Date: A method of using Power PC OSXEN in an Intel environment
  • Previous by thread: Re: Scripting Sidebar Adding
  • Next by thread: Re: Puzzling display dialog
  • Index(es):
    • Date
    • Thread