Altova XMLSpy 2024 Enterprise Edition

Document.OnBeforeSaveDocument

Home Prev Top Next

Event: OnBeforeSaveDocument(objDocument as Document, objDialog as FileSelectionDlg)

 

XMLSpy scripting environment - VBScript:

Function On_BeforeSaveDocument(objDocument, objDialog)

End Function

 

' old handler - now obsolete

' return string to save to new file name

' return empty string to cancel save operation

' return nothing to save to original name

Function On_SaveDocument(objDocument, strFilePath)

End Function

 

XMLSpy scripting environment - JScript:

function On_BeforeSaveDocument(objDocument, objDialog)

{

}

 

// old handler - now obsolete

// return string to save to new file name

// return empty string to cancel save operation

// return nothing to save to original name

function On_SaveDocument(objDocument, strFilePath)

{

}

 

XMLSpy IDE Plugin:

IXMLSpyPlugIn.OnEvent (27, ...)        // nEventId = 27

 

Description

This event gets fired on any attempt to save a document. The file selection dialog object is initialized with the name chosen for the document file. You can modify this selection. To continue saving the document leave the FileSelectionDlg.DialogAction property of io_objDialog at its default value spyDialogOK. To abort saving of the document set this property to spyDialogCancel.

© 2017-2023 Altova GmbH