Re: Damn send button / Wind chill
Re: Damn send button / Wind chill
- Subject: Re: Damn send button / Wind chill
- From: "Serge Belleudy-d'Espinose" <email@hidden>
- Date: Sun, 3 Mar 2002 11:19:23 +0100
At 13:56 -0800 2/03/02, Paul Berkowitz wrote:
Sending Apple Events to an application, then to AppleScript, is wasteful and
consumes CPU cycles and RAM, slowing everything down.
What possible reason could there be for putting commands which
calculate numbers into a Finder tell block?
It's certainly the best technique not to use application tell blocks
when it's not necessary. However it should be emphasized that the
real problem is only with apple events, ie calls to scripting
additions or other applications. OTOH, commands like calculations
don't send apple events anywhere and can be left harmless in any tell
block. Most- I'm pretty sure all- commands and statements in the ASLG
fall into the same harmless category.
However it takes some time to draw the borderline clearly between
commands with and without apple events, so in any doubt, remove the
tell blocks and see if your code still works, if it does, you've gone
a good way towards code purity!
You should avoid putting one tell block inside another, which is similarly
wasteful, sluggish and occasionally worse
I always thought that tell blocks define the scope, so if you nest
them, there's an instant scope change, ie the innermost one sends its
commands directly to the corresponding application, without telling
the outermost application before?
Serge
--
\\//\//\// Serge Belleudy-d'Espinose Institut Jacques Monod - Jussieu
// // //
http://www.ijm.jussieu.fr/ Universites Paris VI, VII - CNRS
//\//\//\\
_______________________________________________
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.