Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove of selection in table view



Philip,

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.

Philip

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-studio mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden
References: 
 >Remove of selection in table view (From: Heinrich Bjerregaard <email@hidden>)
 >Re: Remove of selection in table view (From: Novice Software <email@hidden>)
 >Re: Remove of selection in table view (From: email@hidden)
 >Re: Remove of selection in table view (From: Brad <email@hidden>)
 >Re: Remove of selection in table view (From: Philip Buckley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.