• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Global variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Global variables
      • From: KOENIG Yvan <email@hidden>
References: 
 >RE: Global variables (From: "Stockly, Ed" <email@hidden>)
 >Re: Global variables (From: deivy petrescu <email@hidden>)

  • Prev by Date: Re: how to do a proper alphabetical sort?
  • Next by Date: Re: List size limit
  • Previous by thread: Re: Global variables
  • Next by thread: Re: Global variables
  • Index(es):
    • Date
    • Thread