• 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: resetting script between runs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting script between runs


  • Subject: Re: resetting script between runs
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 4 Jun 2007 09:22:53 -0500

An even better way to avoid globals is to use this run handler ...

on run
	try
		my main()
	on error errText number errNr
		if errNr = -128 then
			return
		else if errNr = -2700 then
			my showInstruction(errText)
		else
			my showError(errText, errNr)
		end if
	end try
end run

which simply has no variables, global or otherwise.

_______________________________________________
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
References: 
 >resetting script between runs (From: HÃ¥vard Graudo <email@hidden>)

  • Prev by Date: [ANN] FastScripts 2.3.2
  • Next by Date: Re: resetting script between runs
  • Previous by thread: Re: resetting script between runs
  • Next by thread: Re: resetting script between runs
  • Index(es):
    • Date
    • Thread