AppleScript questions/issues

Brian Caldwell lists at rainpuddle.com
Tue Mar 9 22:42:37 PST 2004


I've checked the archives for the last year, and while it's entirely
possible that I missed it, I've not seen the following issues addressed:

-
- Inconsistency of results for columns and rows
-

When I do something like: 
		get selected column
I'll get back a result in the form of:		
    column 4 of document 1 of application "OmniOutliner"
All's fine there.

When I do something like:
    get selected row
I'll get back a result in the form of:
    child 57 of child 1 of document 1 of application "OmniOutliner"
Huh? I would expect something like:
    row 57 of document 1 of application "OmniOutliner"
Because I requesting it in terms of "rows". If I was asking in terms of
"child" I would not have an issue with the result. But that would require
a "selected child" property which I don't yet see (OO 2.2.6).

-
- No true currency commands (not that kind of currency ($))
-

The kind of currency I'm talking about is "what is the current ___" type
of property. OO seems to address current row by the "selected row"
property. In a similar fashion, current column by "selected column". But,
it appears that you cannot have in the selected row/column implementation
both at once. And that IMO is what a true current row/column would
provide. I would then know for example, regardless of which was selected,
that the current row is 57 and the current column is 4. 

This all leads to the current cell implementation. Again IMO, current
cell is the intersection of current row and current column, and that's
also where the insertion point is located. I'm sort of amazed that this
is not present. I might enter some text and then wish to have additional
entry and/or calculations performed via script. Without current cell, I
can't do this (in a dynamic fashion). Any moving to cell offsets (rows
above or below, columns left or right) is woefully problematic without
knowing where you are starting from. 

I would suggest a change to have a new document property - selected
orientation. This would have a value of either "row" or 'column"
depending on what was selected in the document. With the addition of the
document-level current row/column/cell properties I just discussed, the
DOM for OO gains flexibility and power (IMHO).


-
- End result
-

Some examples:

get selected column
Result: column 4 of document 1 of application "OmniOutliner"

get selected row
Result: row 57 of document 1 of application "OmniOutliner"

get selected cell
Result: column 4 of row 57 of document 1 of application "OmniOutliner"

get selected orientation
Result: orientation "row" of document 1 of application "OmniOutliner"


I welcome constructive criticism and suggestions.

Brian Caldwell




More information about the OmniOutliner-Users mailing list