Altova XMLSpy 2025 Professional Edition

See also

 

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

 

Events available since XMLSpy 4r4:

 


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

 

Events available since XMLSpy 2004:

 


On_DocEditDragOver

= 10

 

 

Events available since XMLSpy 2004r4 (type library version 1.4):

 


On_BeforeOpenProject

= 25


On_BeforeOpenDocument

= 26


On_BeforeSaveDocument

= 27


On_BeforeCloseDocument

= 28


On_ViewActivation

= 29


On_DocEditKeyboardEvent

= 30


On_DocEditMouseEvent

= 31

 

Events available since XMLSpy 2006 SP1 (type library version 1.5):

 


On_BeforeValidate

= 32

 

Events available since XMLSpy 2007 (type library version 1.6):

 


On_BeforeShowSuggestions

= 33


On_ProjectOpened

= 34


On_Char

= 35

 

Events available since XMLSpy 2009 (type library version 2.2):

 


On_Initialize

= 36


On_Running

= 37


On_Shutdown

= 38

 

Events available since XMLSpy 2012 (type library version 2.8):

 


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.

© 2018-2024 Altova GmbH