Altova XMLSpy 2024 Enterprise Edition

Declaration

OnEvent(nEventID as long, arrayParameters as SAFEARRAY(VARIANT), pXMLSpy as IDispatch) as VARIANT

 

Description

OnEvent() is called each time an event is raised from XMLSpy.

 

Possible values for nEventID are:

 


On_BeforeStartEditing

= 1


On_EditingFinished

= 2


On_FocusChanged

= 3


On_Beforedrag

= 4


On_BeforeDrop

= 5


On_OpenProject

= 6


On_OpenDocument

= 7


On_CloseDocument

= 8


On_SaveDocument

= 9


On_DocEditDragOver

= 10


On_DocEditDrop

= 11


On_DocEditKeyDown

= 12


On_DocEditKeyUp

= 13


On_DocEditKeyPressed

= 14


On_DocEditMouseMove

= 15


On_DocEditButtonUp

= 16


On_DocEditButtonDown

= 17


On_DocEditContextMenu

= 18


On_DocEditPaste

= 19


On_DocEditCut

= 20


On_DocEditCopy

= 21


On_DocEditClear

= 22


On_DocEditSelectionChanged

= 23


On_DocEditDragOver

= 10


On_BeforeOpenProject

= 25


On_BeforeOpenDocument

= 26


On_BeforeSaveDocument

= 27


On_BeforeCloseDocument

= 28


On_ViewActivation

= 29


On_DocEditKeyboardEvent

= 30


On_DocEditMouseEvent

= 31


On_BeforeValidate

= 32


On_BeforeShowSuggestions

= 33


On_ProjectOpened

= 34


On_Char

= 35


On_Initialize

= 36


On_Running

= 37


On_Shutdown

= 38


On_AuthenticBeforeSave

= 39


On_AuthenticContextMenuActivated

= 40


On_AuthenticLoad

= 41


On_AuthenticToolbarButtonClicked

= 42


On_AuthenticToolbarButtonExecuted

= 43


On_AuthenticUserAddedXMLNode

= 44

 

The names of the events are the same as they appear in the Scripting Environment of XMLSpy. For IDE plug-ins the names used are immaterial. The events are identified using the ID value.

 

arrayParameters is an array which is filled with the parameters of the currently raised event. Order, type, and meaning of the single parameters are available through the scripting environment of XMLSpy. The events module of a scripting project contains predefined functions for all events prior to version 4.4. The parameters passed to the predefined functions are identical to the array elements of the arrayParameters parameter.

 

Events raised from the Authentic View of XMLSpy do not pass any parameters directly. An "event" object is used instead. The event object can be accessed through the Document object of the active document.

 

pXMLSpy holds a reference to the dispatch interface of the Application object of XMLSpy.

 

If the return value of OnEvent() is set, then neither the IDE plug-in nor an event handler inside of the scripting environment will get this event afterwards. Please note that all IDE plug-ins get/process the event before the Scripting Environment does.

 

© 2017-2023 Altova GmbH