Select all fields in a table

Could someone post me a simple script for a button to select all fields in a table?

Hi,

This worked for me:

set selected data rows of table view “table” of scroll view “scroll” of window “main” to every data row of data source “datasource”

Edited: I forgot to say that this way the rows aren’t highlighted blue. You can do it a different way for that.

gl,

im sorry but i short of a newb to xcode and what would be a “datasource” for the table could you maybe give me a ex:

Hi Ronstex,

If you’re using without datasource, then you’re probably keeping a list of the table data and something like this works for me:


set c to count tableData
set selRows to {}
repeat with i from 1 to c
set end of selRows to contents of i
end repeat
set selected rows of table view "table" of scroll view "scroll" of window "main" to selRows

gl,

Thanks,
Kel