The User Interface

[WINDEV]

Last Edit: January 30, 2018 the alpha360 team

At the center of the WINDEV user interface is the a360_OpenWindow() procedure.

This procedure handles the "opening" of all windows and, depending on a users preferences, it embeds them in a Dynamic Tab or it Opens them "free" on the desktop.

Important note: all windows in the implementation are Internal Windows.

Lets see how a we call a Browse window - the IWB_Products internal window - with the a360_OpenWindow() procedure:

// Add the procedure to be called to the GLOBAL a360_ProcedureArray
procedure_Record is ST_a360_Procedure                        // create this record structure
e_sChooseProcedure is string = "IWB_Products"                // select the internal window/procedure
procedure_Record=a360_ProcedureArray[e_sChooseProcedure]     // add it to the global a360_ProcedureArray

// Create and Initialize the e_DynamicWindow structure
  e_DynamicWindow is ST_a360_DynamicWindow
  e_DynamicWindow.nAction=100                                // 100 for Browses, 1= Insert, 2=Edit, 3=Delete, 4= View
  e_DynamicWindow.bAlwaysDynamicTAB=FALSE                    // We can bypass the users preferences with TRUE
  e_DynamicWindow.sTitleWindow="List of Products ..."        // Title of the Window
  e_DynamicWindow.sStandardWindow="WIF_GLOBAL"               // A default Classic Window for Opening the internal window ON the Desktop
  e_DynamicWindow.sDynamicTAB = "TAB_Dynamic"                // The Dynamic Tab
  e_DynamicWindow.sDynamicInternalWindow="IWB_Products"      // select the internal window/procedure 
  e_DynamicWindow.sDynamicInternalWindowID="IWB_Products"    // used as the base for naming multiple occurences of the same window

// Now Call the Window UI
  e_sReturnPK is string
  e_bChanged is boolean
  a360_OpenWindow(e_DynamicWindow, e_sReturnPK, e_bChanged)

Please note that the above code justs sends a request to the UI - to "open" the procedure. What the UI code does, depends on the users preferences ...

Actually - if the user is working with the Dynamic Tab interface - the window/procedure he just called, goes on with its own life !!!

What this means, is that when the user closes the window that he just opened, there is NO guarantee that the execution will continue after the following code:

a360_OpenWindow(e_DynamicWindow, e_sReturnPK, e_bChanged)

So the returned values of e_sReturnPK and e_bChanged are (most of the time) useless; it all depends on the users UI preferences,.

Copyright 2017/18 - computerplus