Hello everyone need some help, the following script is suppost to allow someone to select a file or several files and then display them simply in a table view. Easy not for me! :oops: can someone please show me the error of my ways?
set ds to make new data source at the end of data sources
set tv to table view âselectorâ of scroll view âselectedWindowâ of window âshoppingBasketâ
set col to make new data column at end of data columns of ds with properties {names:âfilesâ}
set fullfilepath to {}
on clicked theObject
set pathFromroot to "/RAID/Data"
if name of theObject is equal to "chooseButton" then
tell application "Finder"
choose file with prompt "Please select a file"
set selectedfile to POSIX path of result
set completeFilepath to pathFromroot & selectedfile
set fullfilepath to completeFilepath
end tell
end if
end clicked
repeat with aName in fullfilepath
set aRow to make new data row at end of data rows of ds
set contents of data cell âfilesâ of aRow to aName
end repeat
set data source of tv to ds
Thanks in advance
J