I found some information regarding getting the sorted data from a table at lists.apple.com to use the following line of code…
set sortedRows to call method "sortedRows" of data source of table view "foo" of scroll view "bar"
The individual that was trying to use this was not successful and I was wondering if anyone has come up with a way to get that information correctly. My best guess was this, but it doesn’t work…
set fileDataSource to data source of table view "fileList" of scroll view "fileList"
set sortedRows to call method "sortedRows" of fileDataSource
set theRows to every data row of sortedRows
set rowCount to count of theRows
set theFiles to contents of data cell "filePath" of theRows
set theNames to contents of data cell "fileNames" of theRows
I can get the information unsorted with these variables, it’s just a matter of trying to get the sorted information. Also, when setting breakpoints and debugging this script, it doesn’t appear that any information happens with sortedRows, so I’m inclined to think this doesn’t work.
I also found that the following statment should work in future versions, but it won’t even compile in xCode 1.5.
set sortedRows to sorted data rows of data source...
So has anyone been able to do this? If not, the alternative would be to sort the information using a do shell, but I’m not quite sure how to do it. Basically I just need to know how to sort the files that are dropped onto the droplet…
on open theFiles_
--sort theFiles_ code here using a do shell
end open
I can handle the rest from there. I’m just not that good with the UNIX stuff.
thanks in advance for any help,
Bruce