Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter EighteenDataView Integration (continued)

on_save

Overview

The on_save event is called as part of the save process. This is not a direct execution path to the save function but rather the call to write out the content of the view to a specified file.

Syntax/Parameters

Syntax

int on_save ( string filename ) { ... }

Parameters

filename

The filename to write the contents of the view. This is an intermediate filename.

Return Value

The function is expected to complete the process. An error code can be returned but is presently ignored.

Remarks

Upon completion the view will manage the file backup and save function. The filename may be a .~sav file. In such a case, to get the extension of the actual file, get the filename from the window. For example:

s1 = GetExtension(fnFile);
s1 = MakeLowerCase(s1);
if (s1 == ".~sav") {
  s1 = GetEditWindowFilename(hView);
  s1 = GetExtension(s1);
  s1 = MakeLowerCase(s1);
  }

 

Related Events and Functions

Page revised 2024-12-13