Re: How to deal with Asynchronous Finder operations
Re: How to deal with Asynchronous Finder operations
- Subject: Re: How to deal with Asynchronous Finder operations
- From: Christopher Nebel <email@hidden>
- Date: Mon, 26 Sep 2005 08:33:05 -0700
On Sep 25, 2005, at 2:52 PM, kai wrote:
On 20 Sep 2005, at 03:45, Shane Stanley wrote:
On 20/9/05 12:19 PM, "Dave Lyons" <email@hidden> wrote:
Assuming that I fix "get size of <folder>" to block and wait for
the correct answer (never return "missing value"),
what would be the desired behavior for "properties of <folder>",
which currently includes "size" and "physical size" properties?
(1) Always omit, (2) include if available, or (3) block until
available. I hesitate to choose (3), since interactively using
"properties of <folder>" from a script editor would suddenly get
very slow.
[snip]
Choice (2) is about the worst, IMO -- it's has all the appearance
to the
user of an intermittent bug.
I realise that Dave's away until Thursday - but while it occurs to
me...
AppleScript version 1.10 (Mac OS Tiger 10.4) introduced a size
parameter for Standard Additions' info for command. This specifies
whether or not the size of the item should be returned. Don't know
if it's practicable but, if a request for a Finder item's
properties could be similarly qualified, this approach might help
to resolve the quandary.
Not relevant. The reason that parameter was introduced for "info
for" is that because "info for" is just a command that returns a
record, there's no way to ask for just the information you want.
"size" can be problematic (i.e., slow), hence the parameter.
The Finder, however, has a real object model, which means that if you
don't want the information, you can not ask for it. The correct
answer is (3). (There is, by the way, a heuristic for *not*
including properties in the "properties" property, but it doesn't
apply here. "Typically, properties that can be derived from other
properties are not included, such as the 'reverse' property of a list.")
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden