Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

This article describes changes made in V31.20 to improve the usability of GlobalSettings files.

...

Create a GlobalSettings script (e.g. usr\GlobalSettings,xml).  Specify the location where the tool should create the compiled VBI file using the identifier attribute of the Storage command.  Typically this will be relative to the workspace\log folder (e.g. log\GlobalSettings.vbi). 

If you want to be able to run a VBI audit of the GlobalSetting use the standard VBI naming convention (MigName-JobName-TaskTag-NetLang). Here is an example with some  registry and remove commands:

Code Block
<GlobalImports>
<Storage Action="Create" Identifier="GlobalSettings.vbiMigName-GlobalSettings-std-csh" />

<Registry type="libname" source="msado28.tlb" target="msado15.dll" />

<Registry type="RefactorFile" Source="(%= VirtualRoot%)\TailwindPOS.vbp">
   <Refactor errorStatus="warn">
      <Remove identifier="TailwindPOS.frmSales.LastReceipt"/>
      <Remove identifier="TailwindPOS.frmSales.LastReceipt.Get"/>
      <Remove identifier="TailwindPOS.frmSales.ReturnFromPause"/>
      <Remove identifier="TailwindPOS.ucLettersPad.Command1_Click"/>
      <Remove identifier="TailwindPOS.EndShiftWithAmount"/>
      <Remove identifier="TailwindPOS.PadAmount"/>
      <Remove identifier="TailwindPOS.ValidateUserPassword"/>
      <Remove identifier="TailwindPOS.ValidateUserPasswordAdmin"/>
   </Refactor>
</Registry>
<Storage Action="Close" />
</GlobalImports>


Next , add a<Select GlobalSettings ...> command to the template translation script.  The value will specify the location off of the GlobalSettings content to use during the translation.  To do just-in-time processing of the GlobalSetting before each translation, specify the name of the script (i.e the .xml file).  The Select will typically be placed prior to the Compile command, for example:

Code Block
<gmBasic>
<Storage Action="Create" Identifier="%JobId%" />
...
<Select GlobalSettings="%UserFolder%\GlobalSettings.xml" />

<Compile Project="%SrcPath%" Resx="%ResxFolder%">
...

<Storage Action="Close" />
</gmBasic>

...

 Detailed Description of Registry IMSLIB.Registry.EditFile.\test\App\src\App\Applications\glbl-modShift.bas with root address 15545:
 Property                       | Content
 --------                       | -------
 target                         | 15590:
 
 Text Registered via this entry:
 RecNo | Rai | nRec | Content
 ----- | --- | ---- | -------
     1 |  32 |   24 |    <Fix name="EditFile">
     2 |  32 |   67 |    <Replace status="active" name="Add Strong typing for Control 6">
     3 |  32 |   52 |    <OldBlock><![CDATA[cmbIN As Control]]></OldBlock>
     4 |  32 |   53 |    <NewBlock><![CDATA[cmbIN As ComboBox]]></NewBlock>
     5 |  32 |   13 |    </Replace>
     6 |  32 |    9 |    </Fix>

...

Detailed Description of Registry IMSLIB.Registry.RefactorFile.\test\App\src\App\Applications\glbl-modMETSDBFunctions.bas with root address 15510:
Property                       | Content
--------                       | -------
target                         | 15787:

Text Registered via this entry:
RecNo | Rai | nRec | Content
----- | --- | ---- | ------- 
    1 |  32 |   13 |    <Refactor>
    2 |  32 |  103 |       <FixType identifier="FillFunctionPriorityCombo.cmbFunctionIN" type="ComboBox" Status="Dynamic" />
    3 |  32 |   72 |       <FixType identifier="CheckCloseDB.dbIn" type="ADODB.Connection" />
    4 |  32 |   94 |          <FixType identifier="modMETSDBFunctions.CheckCloseDB.dbIN" type="ADODB.Connection" />
    5 |  32 |  112 |          <FixType identifier="modMETSDBFunctions.ClearBPUDisplay.lblArrayIN" type="Collection" status="Label" />
    6 |  32 |   17 |       </Refactor>