Strange AS Finder Behaviour
I have a folder that contains a mix of folders and files. (About 80:20.)
I want to get a list of the files, and this works fine:
tell application "Finder"
files of (selection as alias)
end tell
However, if I try this:
property fileList : {}
tell application "Finder"
set my fileList to (files of (selection as alias))
end tell
It will consistently crash the AppleScript Editor app when I run.
Saving this script as an app and running that (with an appropriate display dialog to show the first item of the list) works fine first time, but second time around will give a -2707 Internal Table Overflow error.
There's obviously some corruption somewhere, but I have had a go at deleting prefs files, restarting etc and can't find a resolution. (Incidentally, this was all working fine until a couple of days ago, but nothing has changed on the system in the meantime.)
Does anyone know how to fix please?
MacBook Pro, Mac OS X (10.7.2), 13" Late 2011 8GB RAM