• 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
when is a global not a global?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

when is a global not a global?


  • Subject: when is a global not a global?
  • From: tom wible <email@hidden>
  • Date: Tue, 14 Sep 2010 16:43:20 -0400

when it's run in script editor:-(

i recently had to run an app bundle in s.e. to debug it, and the same code that runs perfectly when it runs standalone fails in s.e.:

property tvpi2crontabP : "/DVR/scripts/tvpi2crontab.app"
property tvpi2crontab : (load script POSIX file tvpi2crontabP)
...
global recDir
...
tvpi2crontab's init() -- this initializes recDir, which is also declared global in tvpi2crontab
log recDir


running the above code as a standalone app bundle works perfectly, but when i run it in s.e. the globals aren't seen:

		"The variable recDir is not defined."

bita by s.e. again, but a simple work-around:	

	set recDir to tvpi2crontab's recDir -- only needed when running in s.e.



_______________________________________________
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: when is a global not a global?
      • From: Tetsuro KURITA <email@hidden>
    • Re: when is a global not a global?
      • From: "Stockly, Ed" <email@hidden>
  • Prev by Date: Illustrator CS4 hierarchical menus
  • Next by Date: set vs copy?
  • Previous by thread: Re: Illustrator CS4 hierarchical menus
  • Next by thread: Re: when is a global not a global?
  • Index(es):
    • Date
    • Thread