Versions Compared

Key

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

...

This effectively overrides the default implementation with the one provided.  The effect on the csproj file can be seen in this difference report:


Overriding AuthorText routines with dependencies

In many situations you may want to override AuthorText routines that have dependencies.  For example lets say you want to override the ClassFile, AssemblyFile, and EndNewcProject routines.  You would start by copying these methods into a text file (e.g. DCOMAuthorText.gmsl) and place it in your workspace\usr folder.  Next modify your copy  so that any references to symbols still in the original AuthorText.gmsl are prefixed by AuthorText (i.e. the authortext.gmsl Class name). 


Code Block
*****DCOMAuthorText.gmsl
      Write.Line("!)(!");
      int StartupIsForm = AuthorText.hasStartupForm(); <==
      if (StartupIsForm)
***** \installdir\support\METALANG\AuthorText.gmsl
      Write.Line("!)(!");
      int StartupIsForm = hasStartupForm();
      if (StartupIsForm)

Once this is done, you can direct the transaltor to use your overrides by adding a <gmsl > command to your translation script prior to the Compile command:

Code Block
<gmSL NameSpace="gmSL" Source="..\usr\DCOMAuthorText.gmsl" />
...
<Compile ...>