Re: Best practices
Re: Best practices
- Subject: Re: Best practices
- From: Shane Stanley <email@hidden>
- Date: Wed, 16 Feb 2011 09:11:17 +1100
- Thread-topic: Best practices
On 16/2/11 8:44 AM, "Stan Cleveland" <email@hidden> wrote:
> But the above pearls of wisdom from Luther in the last two days lead me to ask
> if he (or anyone else) has any other "best practices" for AppleScript.
Can I argue with some of the originals?
> Never modify a property; Don't use globals.
I'd be much more comfortable with "Keep in mind that modified properties are
written back to the script, and don't use globals if you can avoid them."
Properties were *designed* to be saved back to disk with new values, and
although there are cases where this can cause problems -- large amounts of
data, private information -- avoiding all uses of such a simple, useful
mechanism because of them is, IMO, an over-reaction.
> If you need to store a value between runs, use a preference (.plist) file.
Until AS gives us a simpler way to do this, I don't see why a property list
is particularly better than any other format, like a simple text file. It
depends, of course, on the data.
> Always use aliases, not text paths except where necessary.
Again, I think this is overly prescriptive.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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