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.
>
Yea, the problem for this type of macro is that the 'focus' is in a
different state after the 'cut', depending on the depth of nesting
inside the adjacent element.
ie.
<ul>
<li>text only</li>
<li>text only as well</li>
</ul>
You can move the <li/> tags, because the 'focus' ends up in a
predictable place (the next element).
but with :
<p>
<ul>
<li>text only</li>
<li>text oly as well</li>
</ul>
<ul>
<li>text only</li>
<li>text oly as well</li>
</ul>
</p>
You cannot use this macro to move the <ul/>s, because after you have
cut one of them (say the bottom one), then it is the second <li/> of
the remaining <ul/> that has focus, not the <ul/> itself.
But then, what is interesting about this unexpected behaviour is, it
allows you to move an <li/> from the top <ul/> into the bottom one ;)
I am going to look to see if I can do this another way, like :
MoveUp:
copy
move to previous
paste before
move to next
move to next
cut
Or something like that ;)
To see if I can work around the problem of indeterminate focus after a
cut.
thanks
regards Jeremy