Hello,
I am having trouble having a Table view display an alias in a datas cell. It seems like when I pass the alias to the data cell it automatically converts it to a POSIX Path and then I can;t seem to find a way to turn that POSIX path back to a alias.
This is the scrit that is supposed to pass the alias to the data cell. I have no ide what I;m doing wrong. Any help would be greatly appreciated.
Thanks
Dallas
if name of theObject is "choose files" then
set choose_files to (choose file with multiple selections allowed without invisibles)
tell application "Finder"
set choose_files_s to (sort choose_files by name)
end tell
set sorted_choose_files to {}
repeat with f in choose_files_s
set end of sorted_choose_files to f as alias
end repeat
tell data source of table view 1 of scroll view 1 of window 1
delete every data row
if (count data columns) = 0 then
repeat 3 times
make new data column at end of data columns
end repeat
end if
repeat with list_files in sorted_choose_files
set theNewRow to make new data row at end of data rows
set contents of data cell 2 of theNewRow to name of (info for list_files)
set contents of data cell 3 of theNewRow to list_files
end repeat
end tell
end if
Model: Mac Book
AppleScript: Xcode 2.4.1
Browser: Safari 419.3
Operating System: Mac OS X (10.4)