As Alias List
As Alias List
- Subject: As Alias List
- From: Luther Fuller <email@hidden>
- Date: Fri, 20 Nov 2009 13:17:02 -0600
I've just wasted a couple of hours trying to discover why an old script is soooo slow. It's still slow, but I discovered a problem in this snippet of code ...
set prefFileList to (sort items of prefsRef by name) as alias list repeat with itemRef in prefFileList select itemRef
It was throwing an error every time I tried to run it. Finally, I inserted a diagnostic only to discover that the items of the list prefFileList are not aliases, but references. So I inserted one line ...
set prefFileList to (sort items of prefsRef by name) as alias list repeat with itemRef in prefFileList set itemRef to (itemRef as alias) select itemRef
and now it runs properly.
So, what's wrong with as alias list ?
|
_______________________________________________
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