Applescript help
Adam Wuellner
adam.wuellner at gmail.com
Fri Apr 15 06:39:48 PDT 2005
On 4/15/05, Curtis Clifton <curt.clifton at mac.com> wrote:
> On Apr 15, 2005, at 4:11 AM, AntToeKnee.9604432 at bloglines.com wrote:
>
> > I'm trying to delete the selected row in an outline, using;
> >
> > tell front
> > document of application "OmniOutliner Professional"
> > delete selected row
> >
> > end tell
> >
> > But nothing happens.
>
> The property "selected row" needs some sort of index since multiple-row
> selections are allowed. So you want something like "delete selected
> row 1" or "delete selected rows". Unfortunately, neither of those seem
> to work either. The following worked:
>
> set theRow to selected row 1
> delete theRow
>
> The need to use two separate AppleEvents for this seems like an OO3 bug.
If it is, it's one shared by _many_ an application.
This works, too:
delete (get selected row 1)
Throwing in an apparently superfluous 'get' fixes a lot of AS code,
throughout the Mac application space, that otherwise looks like it
should work. It's still two Apple Events, though.
Adam
More information about the OmniOutliner-Users
mailing list