Re: [Newbie Q] How to implement toggle switch?
Re: [Newbie Q] How to implement toggle switch?
- Subject: Re: [Newbie Q] How to implement toggle switch?
- From: Erik Price <email@hidden>
- Date: Fri, 7 Jun 2002 10:16:21 -0400
On Friday, June 7, 2002, at 04:05 AM, email@hidden wrote:
Based on the code you posted (shown at bottom), it would seem an
appropriate
time to teach yourself about (a) handlers (called subroutines or
functions or
libraries in other programming languages), and possibly (b) recursion.
A handler is a reusable snipped of code that resides at the bottom of
the
AppleScript in it's own block, and is called as needed, being passed
information and returning information.
So, as with other scripting languages, you can use this
handler/subroutine/function to either return a value OR to perform a
collection of code. It doesn't have to be a true function (returns a
value) or a true subroutine (just executes a chunk of code).
Last question -- does it have to be at the bottom of the script? Can I
put the handler definition at the top? It feels better for me that way.
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.