Re: Funny (obscure) 'using terms from' usage
Re: Funny (obscure) 'using terms from' usage
- Subject: Re: Funny (obscure) 'using terms from' usage
- From: Harald E Brandt <email@hidden>
- Date: Mon, 30 Sep 2002 20:02:12 +0200
+--> Paul Berkowitz wrote 02-09-29:
What if you put the 'using terms from' around the _call_ to the handler in
the main script (or calling handler)? Does that help? E.g.
using terms from application "AppleScript Output"
my ASO(infoText, cmd)
end using terms from
+-
That also works, even without the "my" before ASO. But it defeats
most of the purpose of putting it all in a handler, so if I have to
choose between the above method and placing the 'using terms from'
around the handler definition, I would prefer the latter method, i.e:
using terms from application "AppleScript Output"
on ASO(infoText, cmd) --cmd is 0 for no activation, 1 for making it active
tell application ASOpath
... etcetera
+--
I grant that the way you demonstrate looks odd. I'd guess that 'using terms
from' only works with global variables (top-level variables are effectively
global unless declared as local). So the other thing you could try would be
declaring ASOpath as global at the top of your script, and then putting
'using terms from' inside the handler. It's worth a try, anyway (untested,
as is the other suggestion).
+-
Nope! That does not work. Declaring global has no effect here, not
even if I declare the variable as global both at the top level and
inside the handler - same dreaful where-is-dialog. And it does not
matter if I place the 'using terms from' inside or outside the
tell-block, as long as it is inside the handler 'on ASO(...)'
I would love to hear Chris Nebel explain this, since I believe he was
somehow involved in the construction, but I haven't dared (yet) to
mail him directly.
PS: For those testing this, the problem occurs with OS 8.6 (and 8.1 I
guess) whereas I haven't seen the problem in OS 9 (yet). In all of
the cases, I save the app as run-only, since that is what Chris says
should ensure proper operation in pre-OS 9.
Regards,
--heb
__________________________BragIt___________________________
Harald E Brandt email@hidden
http://bragit.com
_______________________________________________
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.