Re: AppleScript file format best practice

2012-02-13 Thread Fritz Anderson
On 12 Feb 2012, at 5:37 PM, Rob wrote:

 Is there some benefit to the compiled format?

.scpts would be faster. Depending on how large the script is, and how often you 
use it in a given period, the compilation delay could be a significant 
annoyance. It would be great if BBEdit cached the compiled form for reuse, but 
I don't expect it.

Also, if the AppleScript Editor loses access to a dictionary, it won't be able 
to resolve class names, commands, etc. from text to the internal symbols used 
in Apple Events. Compiled scripts keep the symbols in their internal form (they 
show up in the editor in guillemets: «class Xmpl»), so there's a chance that 
they'll still be usable.

But if your primary aim is to use BBEdit as an editor, rather than as a user of 
the scripts, you should stick to .applescript.

— F

-- 
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.
Follow @bbedit on Twitter: http://www.twitter.com/bbedit


Re: AppleScript file format best practice

2012-02-13 Thread Robert A. Rosenberg
At 09:25 -0600 on 02/13/2012, Fritz Anderson wrote about Re: 
AppleScript file format best practice:


.scpts would be faster. Depending on how large the script is, and 
how often you use it in a given period, the compilation delay could 
be a significant annoyance. It would be great if BBEdit cached the 
compiled form for reuse, but I don't expect it.



I see no reason why in theory it can not be done (with this ability 
being controlled via a default setting). When you need a script it 
would check the complied cache first and if not found use the 
.applescript version (caching it for later reuse). Any editing of the 
.applescript version would automatically delete the cached version so 
that the recompile would be done upon first use.


--
You received this message because you are subscribed to the 
BBEdit Talk discussion group on Google Groups.

To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email supp...@barebones.com rather than posting to the group.

Follow @bbedit on Twitter: http://www.twitter.com/bbedit