• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder bug


  • Subject: Re: Finder bug
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 13 May 2005 09:43:12 -0700
  • Thread-topic: Finder bug

On 5/13/05 8:33 AM, "Michelle Steiner" <email@hidden> wrote:

> OK, is this an old bug that reappeared, or didn't it ever go away?
>
> tell application "Finder"
>      the selection as alias list
> end tell
>
> --> {document file "addr book script.scpt" of folder "Desktop" of
> folder "michelle" of folder "Users" of startup disk of application
> "Finder", document file "vacation script.scpt" of folder "Desktop" of
> folder "michelle" of folder "Users" of startup disk of application
> "Finder"}
>
> The result is obviously not an alias list.  Its class is "list";
> without "as alias list," its class is "property".

It never went away, but it's not exactly a bug. There are two parts to the
issue:

1) class of (the selection) --> property  is just "one of those things" -
selection is indeed a property of the (Finder) application. To get it to
resolve to its value (a list of Finder items) you need

    class of (get the selection) -->

: the explicit 'get', or else set a variable to it. You might expect
therefore that

    the selection as alias list

would error. Instead, like a lot of things in the Finder, it seems to avoid
erroring and instead resolves to

    (get the selection) as alias list

which in turn does nor error as it should (see below) but simply ignores
what doesn't work and just gives you 'the selection', resolved.

'class of' here is a red herring: 'the selection' is behaving just the same
as 'get the selection'. It's an AppleScript list.

2) Since 'the selection' resolves to an AppleScript list (like 'get the
selection'), it's no longer a Finder reference but an AppleScript object - a
list (of Finder objects). As such, 'as alias list' cannot operate on it the
same way it can on a Finder reference (such as 'every item of the desktop').
So, by rights, it should error, but due to user-friendly Finder coercions or
implementations, it just ignores the 'as alias list' and gives you the same
old  'the selection'.

Basically, what we need is something that lets the Finder coercion 'as alias
list' operate on a list of Finder references, not just on a Finder
reference. I expect that's as difficult (or impossible) as expecting 'whose'
filter clauses to operate on lists... Some day...

--
Paul Berkowitz


 _______________________________________________
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

  • Follow-Ups:
    • Re: Finder bug
      • From: Emmanuel <email@hidden>
    • Re: Finder bug
      • From: Michelle Steiner <email@hidden>
References: 
 >Finder bug (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Propmpting user to enter Variables
  • Next by Date: Re: Propmpting user to enter Variables
  • Previous by thread: Finder bug
  • Next by thread: Re: Finder bug
  • Index(es):
    • Date
    • Thread