Script grammar for "all rows which have named style x"

Fraser Speirs fraser at speirs.org
Fri Jan 7 08:41:52 PST 2005


Hi all,

I'm trying and failing to express a particular filter reference form in 
AppleScript for OO.  What I want to say is "every row of the front 
document which has a named style whose name is fooStyle".

The best I could derive was:

set theStyle to named style "foo" of front document
set theRows to every row of front document whose named styles of style 
contains {theStyle}

...which doesn't work.

My fallback approach is to use a repeat to inspect the named styles of 
every single row in the document with a "if named styles of style of 
thisRow contains {theStyle}" filter.  This appears to be an exceedingly 
slow approach to take, however.

Any suggestions?

TIA,
Fraser
-- 
http://www.speirs.org - http://www.mycamera.org.uk




More information about the OmniOutliner-Users mailing list