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



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


On 26 Apr 2005, at 16:23, Brad wrote:

Matthew,

I've tried using the code you have suggested below but to no avail. I ended up using the "deselectAll:" method. The code you suggest SHOULD work. I'm not sure why I haven't been able to make it work for me. No errors generated, no results either (i.e.: the selection remains).

set selected rows of table view "myTable" of scroll view "myTable" of window "myWindow" to {}

orĀ 

set selected row of table view "myTable" of scroll view "myTable" of window "myWindow" to 0
_______________________________________________
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>)



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.