User Codeblock

Topic updated 16-5-2007

All source code generated by GenWise templates is built up from codeblocks. There are two basic types:

User Codeblocks allow you to add custom source code to your GenWise projects.
Template codeblocks are read-only in the Source Editor, their content adapts to the template configuration.

 

Custom source code that you add to User Codeblocks becomes part of the project and is maintained through generation cycles. It is generated together with the template source code.

User Codeblocks are part of the definition of every GenWise template that generates source code. Most GenWise templates define many User Codeblocks, giving developers detailed customization possibilities by picking exactly the right spots to add custom source code. In most development scenarios custom source code will be added to just a few User Codeblocks, leaving most of them blank.

 

Under some circumstances, the connection between a piece of custom source code and a specific User Codeblock as defined by the template may be lost. In this case the source code is not lost, but it becomes an Orphaned User Codeblock.

 

See also

The GenWise Template System.