Re: Parents/Child Scripts
Re: Parents/Child Scripts
- Subject: Re: Parents/Child Scripts
- From: Timothy Bates <email@hidden>
- Date: Wed, 15 May 2002 09:51:22 +1000
- .mxoez?+: O?W^h1]g}IB\WO2A=6#`2^rL?jAu,r8EcKz@UG.r.7[$&Ym;j8^Wp;/KAlcda MO/$} $"[ c?\#d@cuN
- 9+kli1>@: KaeEcbn$EIG)tY@^[7y`lyrI<4S(cnqzmTD&4<tTkuNR(4dweN}SUlDX/X^c>"
>
To avoid accidents, you should start with a good naming convention. The
>
simplest might be to precede private names with an underscore, eg:
>
publicMethod(), _privateMethod(), and then tell users not to use
>
underscores in their own names - this should be easy enough to remember.
This is helpful. In my PsyScript library, I preface the internal functions
with "i"
to WriteSpreadSheet(file)
...
iWriteFile(file)
End
I for internal is easy to remember and is still readable english.
When I declare globals, I start them with a "g", i.e., gFlag
Properties, I start with a "p", i.e., pHomeFolder
This helps a lot when you are wondering if a variable is exposed as a
property or not (for use in a handler).
I try and keep script object names short, and hander names informative
tell helper to makeTheWorldMoreReasonableInTimesOfTrouble()
tim
_______________________________________________
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.