Altova XMLSpy 2025 Enterprise Edition 

Superseded by the boolean return value of following event handler functions

AuthenticView.OnKeyboardEvent (On_AuthenticView_KeyPressed)

AuthenticView.OnMouseEvent (On_AuthenticView_MouseEvent)

AuthenticView.OnDragOver (On_AuthenticView_DragOver)

 

The event object that holds the information of the last event is now replaced by parameters to the different event handler functions to simplify data access. The event object will be supported for a not yet defined period of time for compatibility reasons. No improvements are planned. It is highly recommended to migrate to the new event handler functions.

 

Returning true from an event handler function signals that the event has beend handled and normal event handling should be aborted.

 

// ----- XMLSpy scripting environment - javascript sample -----

// instead of:

// function On_DocEditKeyPressed ()

// {

//     if (Application.ActiveDocument.DocEditView.event.keyCode == 0x20)

//     {

//        // cancel key processing, swallow spaces :-)

//        Application.ActiveDocument.DocEditView.event.cancelBubble = true;

//     }

// }

// use now:

function On_AuthenticView_KeyPressed (SPYKeyEvent i_eKeyEvent, long i_nKeyCode, SPYVirtualKeyMask i_nVirtualKeyStatus)

{

  if (i_nKeyCode == 0x20)

      return true; // cancel key processing, swallow spaces :-)

}

 

Declaration: cancelBubble as Boolean

 

Description

Set cancelBubble to TRUE if the default event handler should not be called.

 

 

 

© 2018-2024 Altova GmbH