Question regarding scripting support in OO3

Timothy J. Wood tjw at omnigroup.com
Wed May 5 16:15:18 PDT 2004


On Wednesday, May 5, 2004, at 03:25  PM, Thomas Ingham wrote:
> -- assuming property parent path
> set parent path of rowD to path of parent of rowB

   This works in Finder since files aren't ordered in the filesystem, 
only in the view (sort of like having persistent column sorting 
enabled).  This would get us the right parent, but we'd not know 
whether to be above or below RowB.

   Still this idea may have legs -- you could imagine that there would 
be a 'location' object or record that would contain a parent and a 
index.

   So maybe you could do something like:

	set location of RowD to location of RowA -- Moves RowD to where RowA 
was, thus pushing RowA down one slot

   or (forgive the probably bogus record syntax):

	set LocationA to location of RowA
	set location of RowD to {parent:parent of LocationA, index:index of 
LocationA + 1}

   and we could possibly have the location accessible as both an 
aggregate record and the individual parts so you could do something 
like:

	set location of RowD to {parent:parent of RowA, index:index of RowA + 
1}

   But, maybe there is an even better suggestion out there based on this 
idea (also, I'd suspect that 'index' is reserved and my syntax is 
probably busted since I'm just typing off the top of my head here :)

-tim

(Actually, the more I think about this the more I like it -- you could 
also maybe do "set index of MyRow to index of MyRow - 1" to move a row 
up one slot w/o referring to any other row)




More information about the OmniOutliner-Users mailing list