Re: Error from opening a read only applet in SD
Re: Error from opening a read only applet in SD
- Subject: Re: Error from opening a read only applet in SD
- From: John Stewart <email@hidden>
- Date: Thu, 28 Aug 2003 12:06:03 -0400
On 8/28/03 at 8:30, the entity ehsan saffari spoke thusly
>
global myerr
>
set myerr to ""
>
try
>
set k to "Disk:Folder:applet"
>
tell application "Finder"
>
set y to k as alias
>
open y using application file id "asDB"
>
end tell
>
on error errMsg number errNum
>
if errNum = -1756 then
>
-- do your stuff here
>
set myerr to errNum
>
else
>
display dialog errMsg
>
end if
>
end try
>
>
myerr remains as ""
It works just fine when you consider that it returns error number -43 which isn't what's being tested
for. Ergo the code to set "myerr" never gets executed, try it this way ->
global myerr
set myerr to ""
try
set k to "Disk:Folder:applet"
tell application "Finder"
set y to k as alias
open y using application file id "asDB"
end tell
on error errMsg number errNum
if errNum = -1756 then
-- do your stuff here
set myerr to errNum
else
display dialog (errNum as string) & ": " & errMsg
set myerr to errNum
end if
end try
return errNum
John
_______________________________________________
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.