Saving and restoring client state

There are several ways to recall desired states of MWClient. MWorks has the ability to:

  • Save variable sets into .xml files.
  • Save and restore client plugin windows between sessions.
  • Save entire client configuration to a .json file called a “workspace.” This includes server connection, experiment file, variable set, and client plugin window configurations.

Variable sets

Variable sets are .xml files that contain variable-assignment instructions for MWorks.

After saving, a variable set file will include every variable which has an attribute of persistant=1. The persistant attribute is generated (and set to 1) when the box “Retain on Save Variables” is checked, or can be added manually to the variable element in the .xml file. Variables without the persistant attribute or with persistant=0 will not be saved. The parameters of the eye calibrator window, which are private, are automatically saved.

When a variable set is loaded, it sets each variable listed in the .xml file to the saved value. If a variable listed in the variable set no longer exists in the experiment file, MWorks will generate an error.

Variable sets are located in ~/MWorks/Experiment Storage/, and can be created and/or modified in a text editor.

Restoring plugin windows from a past session

This option can be found in the MWClient menu under "Preferences…". After closing and reopening MWClient, any plugin windows that were open when it was closed will be reopened in the same positions. There is also an option for the client to connect to the last server.

Workspaces

To create a workspace, first set everything up the way you want (connected server, loaded experiment, loaded variable set, client window state). Then, in the MWClient "File" menu, select "Save Workspace…".

To load an existing workspace, open the client, then select "File -> Open Workspace…".

Workspaces can be saved wherever a user chooses, and like variable sets, can be created and/or modified in a text editor.

Recent Discussions

14 Dec, 2018 04:14 PM
10 Dec, 2018 02:40 PM
17 Nov, 2018 12:53 AM
16 Nov, 2018 05:01 PM
14 Nov, 2018 09:17 PM