Convert row to note of parent row?

Daniel Flatin dflatin at rcn.com
Mon Jan 16 17:11:40 PST 2006


Curt Clifton wrote:

> Deletion are hard to script right, especially when you're trying to  
> delete the rows in a selection.  The trouble seems to be that the  
> rows are recorded by position in the outline, and once you start  
> deleting rows the position information is no longer correct.
>
> I'm afraid I don't have an easy answer or a snippet of code that  
> would be very helpful.  You might consider rewriting the script so  
> that rather than making a note out of the selected rows it makes a  
> note out of the children of the first selected row.  WIth that  
> interface, then you could use something like:
>
> delete (every row of theParent)

And Ethan wrote:

> As an aside, the delete problem Curt describes can be worked around  
> by repeating through a list of rows in reverse order. It's faster  
> to use a single filter (like the "every row" sample) but reverse  
> repeating through a list of rows will not alter the sequence of the  
> rows in the filtered list. I'm sure there is a better way than  
> this... anyone?

I thank you both for the insights. I hadn't considered the fact that  
the position reference was being perturbed by the act of deleting.  
Sort of a Heisenberg principle here.

Dan


More information about the OmniOutliner-Users mailing list