Re: Setting File & Creator Type access error
Re: Setting File & Creator Type access error
- Subject: Re: Setting File & Creator Type access error
- From: Johnny AppleScript <email@hidden>
- Date: Wed, 01 Jul 2009 14:46:06 -0600
- Thread-topic: Setting File & Creator Type access error
Thanks, Everyone.
I think we were all generally aware that overhead, if any, was negligible.
Even our longest scripts execute pretty rapidly with all the horsepower we
have under them these days.
For myself and the group I trade scripts with, the issue is one of visual
clutter. When we are trying to write, add to, change or otherwise simply
read a script, excessive white space, scrolling, indents, and all such just
limit what can be seen on a single page, and makes understanding what a
script does less easy.
This one was purely one of curiosity, fueled by the above.
Thanks, especially, to Yvan, whose three line solution goes a longer way
than just 25% to resolving the issue. The extra bit of telling was a useful
hint for other ends.
Thanks again to all.
JA
On 7/1/09 1:26 PM, "Matt Neuburg" <email@hidden> wrote:
I Said:
>>> Nothing serious, but why does it take four lines of code to do what should
>>> be done in one?
Ed Stockly Said:
>>
>> FWIW, in AppleScript, breaking a command into multiple lines is not
>> considered a problem. It adds no overhead to execution time and is often (as
>> in this case) more reliable than combining multiple commands into a single
>> line.
>[...]
> ...although extraordinarily convenient and implemented as part of the
> AppleScript language's own internal syntax, is not implemented by every
> scriptable application for setting e.g. property values. But since even if
> it *is* implemented you are sending separate Apple events for each property
> value being set, there is absolutely no penalty for just writing it out and
> setting them one at a time.
>[...]
> As for "why it takes four lines of code to do what should be done in one",
> it's because, well, AppleScript is not Ruby. :) m.
_______________________________________________
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