I’m not really sure how to word this, as I’ve been searching all day for an answer.
I have a table view that gets populated with entries from a SQLite database. I have the table view rows set up so that I can double click them and display a generic dialog box that says “Hi”.
I’m deparately trying to figure out how to talk to the table view.
I thought it would be something like:
set fName to contents of cell of table column "first" of selected data row of table view "tview" of scroll view "sview" of window 1
or something like that but it is not working.
Could someone help me with this one?
WOW, did I actually come up with a good question?
Try this… it get the value from the 3rd column
set selectedDataRow to selected data row of table view “table1” of scroll view “table1” of window 1
set theValue to contents of data cell 3 of selectedDataRow
How are you populating it?
You need to check XCode’s AppleScript dictionary. It shows you that “selected data row” is of the class “data row” and that the “data row” class has elements “data cell”, not “cell” or “table column”. So the syntax is:
set fName to contents of data cell "first" in selected data row of table view "tview" of scroll view "sview" of window 1
That’s assuming that you have a column in the table identified wit the name “first”. Otherwise you could replace “first” with the number 1 (no quotes).
Sorry for the really long delay but that was exactly what I was looking for.
Thanks for the help as always!