Re: Puzzling display dialog
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