Ok. I have a tableview and attached to that is data source CDCoversDataSource. The code below does work. It does exactly what I want. Later in the script I have a repeat which goes through the list that the repeat creates and if the “name” value is equal to the new one it reads from the list:
set theOrder to item 2 of item i of copyOfCDCoversDataSource
then…
set contents of data cell “order” of theRow to theOrder
Once again this works fine. I can now enter a value in to that data cell and run this function and it refreshes the list (which is what the function does), and it remembers the numbers I have associated with the columns. Now the problem is that I can’t get the value of contents of data cell “order” of theRow as a string, or integer… or any kind of data that I can use. Applescript seems to have no problem knowing what to do with it unless I ask it for the value of it as a string/text/integer. It saves it in to the list, it retrieves it and puts it back in to the data cell fine though… Any ideas?
set copyOfCDCoversDataSource to {}
set theCount to count of data rows of CDCoversDataSource
repeat with i from 1 to theCount
set theOrder to contents of data cell "order" of data row i of CDCoversDataSource
set theName to contents of data cell "name" of data row i of CDCoversDataSource
set theCheckbox to contents of data cell "bigcheckbox" of data row i of CDCoversDataSource
--display dialog (text of theOrder)
set copyOfCDCoversDataSource to copyOfCDCoversDataSource & {{theName, theOrder, theCheckbox}}
end repeat