Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting script between runs



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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.