Hi,

please find my remarks below:

Hussein Shafie <hussein at xmlmind.com> schrieb am 03.01.2006 14:13:43:

> Peter.Schulte at gad.de wrote:
> > 
> > I have made some further investigations and I have found 2 reasons for
> > my problem:
> > 
> > Reason 1:
> > In order to move sections from "right to  left" I use the command
> > decrSectionLevel within my macro command. DecrSectionLevel is a 
command
> > written in Java provided in the product, which obviously does not use
> > the API "isEditable". You can simply reproduce the problem if you call
> > this command on a section within a referenced part of a document. The
> > command seems to do its job but it cannot be because the changes are 
in
> > the referenced part. Furthermore the action cannot be undone.
> 
> This is obviously a bug in the incrSectionLevel/decrSectionLevel
> commands. It will be fixed in next release.
> 
Ok. Thank you

> 
> > Reason 2:
> > In order to move chapters or sections up and down I use an expanded
> > version of docb.moveItemUp/docb.moveItemDown. If you have a chapter as 
a
> > referenced part of a document and if you mark this part (that means 
the
> > whole chapter) then the following happens:
> > 
> > - the chapter is cut
> > - the content (not the reference) of the chapter is pasted 
before/after
> > 
> > The problem is that I do not know in my command if the marked element 
is
> > a reference or not. If you mark a part of a part, the cut-command does
> > not work. But if you mark the whole part, the cut-command works and 
puts
> > the content (not the reference) into the clipboard.
> 
> This is not a bug. What you described works as expected:
> 
> * The chapter you want to cut is read-only, but not its book parent.
> Therefore cutting the chapter is indeed possible.
> 
Yes, you are right.

> * Command "cut", just like the plain "copy" command, and unlike command
> "copyAsReference", is not ``reference-enabled''. Therefore what is being
> copied to the clipboard is plain XML nodes (and not a ``reference'').
> 
That's right. (I think you mean "copyAsInclusion".) 

> 
> > Fortunately you can see that the grey background disappeared (that 
means
> > the referenced element is no longer referenced) and that this command
> > can be undone.
> 
> Do not hesitate to suggest the tool you need to solve your problem (a
> way to test in a macro if a node is editable?). We'll try to implement
> it in next release.

What I would like to have is a "reference-enabling" of the command "cut".
My suggestion is an additional optional parameter for this command such 
like "useReferenceIfPossible" (You will find a better term.). So I could 
simply call the cut-command with this parameter and later on I could call 
the paste-command, which is already able to paste references. If the cut 
finds a marked reference then it would copy the reference to the clipboard 
otherwise the marked node or just plain text. 
The copy command could get the same additional parameter. The 
functionality would be a little bit different from copyAsInclusion. 
The latter command explicitly marks the clipboard content as being a 
reference.

What do you think about that?

Best Regards
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20060104/2cd47300/attachment.htm
 

Reply via email to