Target of Trash window
Target of Trash window
- Subject: Target of Trash window
- From: Mr Tea <email@hidden>
- Date: Wed, 06 Nov 2002 22:29:25 +0000
I have several scripts that have been failing intermittently for no apparent
reason, and I just found out why. The scripts all check the targets of open
Finder windows, and fail when the Trash window is open.
OK. I accept that the Trash window doesn't have one specific target - it
displays items from all disks (just like the Desktop used to, aah) and its
'target' property is listed as 'missing value'. So asking the Finder for
'target of every Finder window as alias list' was bound to fail. Just asking
for the target of every Finder window also failed, instead of returning
'missing value' as one of the items in the list, which might have offered a
clue. The crummiest thing was the useless error message:
"Finder got an error: can't continue"
Well, duh. 'Can't get target of Finder Window ID x' or even 'Can't get
target of Finder Window "Trash"' would be a lot more helpful. At least I'm
now armed to avoid this pitfall in the future.
Regards
Mr Tea
_______________________________________________
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.