Registering Handlers for Different Filetypes   

<<< Adding a New Menu Item to PS/Workshop Chapters The Draw List >>>

Contents

If required, your module can load files into or save files from PS/Workshop with specific file extensions. In order to do this, you must register functions with PS/Workshop that are called when trying to either open or save files with the file extensions you want to use.

When it is called, each registered function is passed the filename of the file to open or save. It is then the responsibility of the registered function to correctly open or save the file.

The following functions in the IPSWApp interface can be used to register handlers for different filetypes:

 

Function

Description

RegisterFileOpenFunction

This function takes a description string that contains two parts:

  • The first part is the text that appears as an entry in the "Files of type" box in the File Open dialog.
  • The second part contains information about the file extensions to be associated with the function.

See the RegisterFileOpenFunction documentation for details of the exact formatting of the string.

RegisterFileSaveAsFunction

This function is similar to RegisterFileOpenFunction, but the description appears in the File Save As dialog rather than the File Open dialog.

See the RegisterFileSaveAsFunction documentation for details of the exact formatting of the string.

 

[back to top]

<<< Adding a New Menu Item to PS/Workshop Chapters The Draw List >>>