AppleScript: Set Selected Rows
Timothy J.Wood
tjw at omnigroup.com
Sun Jan 2 12:59:29 PST 2005
On Dec 30, 2004, at 1:38 PM, Michael Terry wrote:
> Is there a way to set the selected rows in Outliner 3 via AppleScript?
> This was possible in prior versions, and I rely on it in some scripts.
selected rows of MyDocument
> I don't understand why selected row didn't just remain a property,
> instead of now being a class in itself. The way it is now, to add a
> selected row to a document you'd have to do something like:
It is a relationship (since it is to-many now, AppleScript requires
this). In OO2 you could only access the first selected row, not
multiple selection (which is all that can be done with a property).
> make selected row
>
> ... but you would need to specify an insertion location, which doesn't
> make very much sense, since a selected row maps onto a regular row.
> The 'selected row' class would have to add a property that allows the
> scripter to identify the new selected row with an already existing row
> in the document.
'make selected row' will do something bizarre -- nothing useful can
come of it, I think :)
If you want to add a row to the selection:
add MyRow to selected rows of MyDocument
> I think either 'selected rows' should be a property of the document,
> which is simple and easy and similar to other programs, or there
> should now also be a 'selection-object' class (c.f., Script Editor's
> dictionary) with which you can use the 'add' and 'remove' commands.
We are trying to conform to the Scripting Interface Guidelines Tech
Note <http://developer.apple.com/technotes/tn2002/tn2106.html> in this
respect (i.e., the 'add' and 'remove' commands).
-tim
More information about the OmniOutliner-Users
mailing list