• 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: Mon, 26 Feb 2007 15:45:06 -0600

It happened again. An error message told me that "The cancel button cannot be the same as the default button." But, this time there were no 'display dialog ...' commands involved.

The handler that produced the error looks something like this ...

on handler()
tell application "Finder"
set selfRef to (path to me) as alias
set prefsFolder to (path to preferences folder from user domain) as alias
if not (exists file prefsName of prefsFolder) then
-- duplicate new prefs file
end if
-- -- belongs here
end tell
set prefsFile to (file prefsName of prefsFolder) as alias -- this line
tell application "System Events"
-- update prefs file to new version, if necessary
end tell
return prefsFile
end getPrefsFile


When I added the "System Events" block to an existing handler, I accidentally put "-- this line" outside the "Finder" block. Putting "-- this line" in the right place fixed the problem.

_______________________________________________
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
References: 
 >Puzzling display dialog (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: FM 8 layout references w/applescript - works in one file, fails in five other identical files!
  • Next by Date: Re: FM 8 layout references w/applescript - works in one file, fails in five other identical files!
  • Previous by thread: Re: Puzzling display dialog
  • Next by thread: CS3 resize problem
  • Index(es):
    • Date
    • Thread