Re: Global variables
Re: Global variables
- Subject: Re: Global variables
- From: Malcolm Fitzgerald <email@hidden>
- Date: Sat, 10 Mar 2007 12:29:22 +1100
On 10/03/2007, at 9:57 AM, deivy petrescu wrote:
Deivy>>I run some tests with droplets here and declaring global or
not, makes no difference, the variable will not be defined if it is
set in the top level script
Below is a test I put together that I think illustrates a clear
difference between using declared and undeclared gobals in the top
level.
It can be run from script editor, or saved as an app and double
clicked and run as a droplet.
Can anyone else corroborate that?
When I run the script below as a droplet I get an error on the open
handler.
For what I understand Ed can run it with no errors as a droplet, which
contradicts what I know and what I get.
Thanks
It runs for me OS 10.3.9. I can double click or drop a file. It uses
display dialog to show the user ERROR messages at various points -
different points for each method of running.
I do use globals and I've never experienced any problems with droplets.
It may be that my droplet template has protected me. My droplets all
look like this:
------------------------------
on open selectedFiles
run
end open
on run
-- do things here
end run
------------------------------
malcolm
_______________________________________________
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