How to add an option in Framework application that allow end users to reset VLF screen layouts to 'as shipped' defaults

Date:5 September 2008
Product/Release:Visual LANSA Framework EPC826
Abstract:How to put an option in Framework application to allow end users to reset screen layouts to 'as shipped' defaults
Submitted By:LANSA Technical Support

Description:

There might be times when you want to test your Framework application with VLF shipped default layouts (e.g. the main Framework window size, location of the command tab, layout).

Solution:

To do this you will need to:

  1. Create a hidden command handler:
BEGIN_COM ROLE(*EXTENDS #VF_AC020)
MTHROUTINE NAME(uExecute) OPTIONS(*REDEFINE) 
Invoke Method(#USystem.uSystemVClipBoard.uDeleteFileonExit) 
Invoke Method(#USystem.uUserVClipBoard.uDeleteFileonExit) 
Use message_box_show (ok ok info *Component ‘Close and restart this application to use the originally shipped layout settings’) 
ENDROUTINE 
END_COM 
  1. Create a command named "Reset Default Layouts" with a nice self-explanatory hint.
    Set to display it e.g. on the File menu.
     
  2. Enable this command "Reset Default Layouts" as a Framework Level command. 
    Ensure it is defined as type Hidden and snapped in with the hidden command handler (in Step 1).

The End User now has the option to delete their Virtual Clipboard Settings to restore their layout to 'as shipped' defaults when restarting their Framework applications:

The End User now has the option to delete their Virtual Clipboard Settings to restore their layout to 'as shipped' defaults when restarting their Framework applications.

You can also change the 'as shipped' defaults and deploy it to an end user machine (refer to the VLF guide "Deploying Clipboard Initial Values" for more information).