Re: Volume index bug in Panther?
Re: Volume index bug in Panther?
- Subject: Re: Volume index bug in Panther?
- From: "John W. Baxter" <email@hidden>
- Date: Fri, 07 Nov 2003 14:02:10 -0800
- Envelope-to: email@hidden
On 11/6/2003 17:32, "Bill Briggs" <email@hidden> wrote:
>
At 5:49 PM -0500 06/11/03, Paul Skinner wrote:
>
> The Finder's Disks don't have an 'Index' property in Panther. I get
>
> 'Can't continue' errors trying to run...
>
>
Oh, but they do! You have to look up the property inheritance
>
chain. Disk inherits the "container" properties, which inherit
>
"item" properties, and item has an index. So disk has an index too.
>
>
if you run
>
>
tell application "Finder"
>
get the properties of every disk
>
end tell
>
>
which does run and work, or did just now, then you get a list of
>
records containing the properties of each disk. You'll note that the
>
index is one of those properties.
>
>
The thing that I don't get is that I ran the query for "index of
>
every disk" last night and it returned a list of index numbers. Wrong
>
ones, but a list nonetheless. Now I get the same error that you and
>
Deivy get. The guy who verified to me off-list today ran the same
>
query on his Mac and it worked for him too. If he's reading this
>
maybe he can see if it still runs without error on his Panther.
>
>
>
>> tell application "Finder"
>
>> get the index of every disk
>
>> end tell
>
>
>
> but ...
>
>
>
> tell application "Finder"
>
> tell disk 1
>
> name
>
> -->"titan"
>
> index
>
> -->2
>
> end tell
>
> end tell
>
>
>
> Does seem a bit off.
>
>
Indeed.
From this:
set ans to {}
tell application "Finder"
set x to (get the properties of every disk)
repeat with ix in x
set end of ans to {name of ix, index of ix}
end repeat
end tell
ans
I get this:
--> {{"Blake", 2}, {"Vashon", 3}, {"Network", missing value}}
When I then mount a handy disk image which was lying on the desktop, I get
--> {{"Blake", 2}, {"Vashon", 3}, {"Network", missing value}, {"Calendar X
v10.2 (Preview 2A80)", 4}}
From which I get the impression that disk index 1 has probably existed and
gone away as part of the startup or login process. (More likely login.) On
my machine the volumes Blake and Vashon are partitions on the startup
spindle.
(Calendar X is from the clever folks at
http://www.wundermoosen.com, and my
trip there just now to verify the URL suggests that Calendar Xp will be
awesome.)
--John
_______________________________________________
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.