On Wednesday, Jan 15, 2003, at 17:50 Europe/London, Hussein Shafie
wrote:
> I think you have reached the limits of macros and/or some primitive
> commands are missing to implement more powerful macros. The clean,
> reliable, solution is of course to implement this by writing a custom
> command in Java or in BeanShell.
>
I tried this:
<command name="moveUp">
<macro>
<sequence>
<command name="copy" parameter="[implicitElement]" />
<command name="moveDotTo" parameter="previousElement" />
<command name="paste" parameter="before[implicitElement]" />
<command name="moveDotTo" parameter="nextElement" />
<command name="moveDotTo" parameter="nextElement" />
<command name="delete" parameter="[implicitElement]" />
</sequence>
</macro>
</command>
And it also fails to move compound elements, because the 'moveDotTo
previousElement' moves to the last most inner child of the
previousElement, not the previousElement itself (as the DOM API would
define it).
Is this a bug, or intended behaviour? (No offence intended)
The other problem with this approach, is that the element you just
moved, looses focus, so you would have to re-select it each time if you
wanted to move it several steps.
regards Jeremy