On 07/23/2011 12:02 AM, Fabián Mandelbaum wrote:
>
> I was wondering if there's currently something similar to the previous
> DocumentHook. I'd need to perform certain tasks (mark certain parts of
> the document as read-only) at document open time. I'm currently doing
> it with a ValidationHook, but this hook is also executed at document
> save time, and when the user chooses the Tools>  Validate menu. I'd
> like to avoid this extra work every time the document is saved or the
> user runs a validation of it. Is this possible with XXE 4.9.1?

Yes, you must implement ValidateHook.checkingDocument.

checkingDocument is passed a Reason argument. If the Reason argument is 
different from Reason.OPEN, then simply do nothing at all.

References:

http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/validatehook/ValidateHook.html

http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmleditapp/validatehook/Reason.html
 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to