Re: Scope
Re: Scope
- Subject: Re: Scope
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 12 Dec 2002 13:31:19 -0800
On 12/12/02 1:20 PM, I wrote:
>
and note the more accurate error handler structure):
Except I omitted a parameter. Sorry again. Another red herring. Here's the
whole thing:
Script A:
global var1
set var1 to 0
try
repeat with i from 1 to 100
set var1 to var1 + 1
-- do stuff
end repeat
set f to load script alias "path:to:script B"
tell f to set var2 to someHandler()
on error errMsg number errNum
my ErrorHandler(errMsg ,errNum)
end try
on ErrorHandler(errMsg, errNum)
display dialog errMsg & " " & errNum
set g to load script alias "path:to:script C"
tell g to set var3 to anotherHandler(var1)
end try
Script B: --no run handler
--no reference at all to var1
Script C: -- no run handler, only one handler:
on anotherHandler(var1)
--do stuff with var1
end anotherHandler
A system error (not a display dialog) appears at or near the end of the
script run:
The variable var1 is not defined.
But only for one user. How can it not be defined?
--
Paul Berkowitz
_______________________________________________
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.
References: | |
| >Scope (From: Paul Berkowitz <email@hidden>) |