I do, indeed, work with data sources. I had tried "set the selected
data row ... to 0" as multiple rows can not be selected. I hadn't
thought to set it to an empty list. I will have to remember that.
Brad
-----
MERGER: when 1 + 1 = 1, with the remainder going on unemployment. --
The Cynic's Dictionary
On Apr 26, 2005, at 10:30 AM, Philip Buckley wrote:
Brad,
If you have a table view with a data source, the second of Matthew's
lines, "set selected row ... to 0", indeed does not work (it only
works for a table view without a data source).
With a data source you want to say "data rows" or "data row" not
"rows" or "row", so the line would be:
set selected data rows of table view "myTable" of scroll view
"myTable" of window "myWindow" to {}
Slightly curiously Matthew's first line, "set selected rows ... to
{}", does work for a table view with a data source as well as for a
table view without a data source. Nevertheless I use "data rows" if
with a data source - just so I don't confuse myself!
That said, I personally haven't had any problems using the call method
line either, although if I use it I use a slightly different syntax:
call method "deselectAll:" of object (table view "myTable" of scroll
view "myTable" of window "myWindow")
I am not qualified to say whether the pure applescript line is
preferable to the call method line or vice versa.