Modify tcl script to generate code

Modify the tcl script used to generate the code.

  1. Open the main.tcl file in the tpl subdirectory of your template set directory.
  2. Find the # Set XPath set of code. On the line following set ROOTFILELocator, add:
    set icon [[getUniqueNode $ROOTNode {/AG/File/DynamicProperties/DynamicProperty
             [@name='icon']}] @value]
  3. Find the instruction [gen_MAIN $DBName $outFormRelNode] and add the $icon parameter:
    [gen_MAIN $DBName $outFormRelNode $icon]
  4. Find the instruction proc gen_MAIN {DBName outFormRelNode} { and add the icon parameter:
    proc gen_MAIN {DBName outFormRelNode icon} {
  5. Find the instruction CALL ui.Interface.loadStyles(\"dbapp\") and on the following line add the call to set your image:
    CALL ui.Interface.setImage(\"$icon\")
  6. Save the changes.
  7. Select Tools > Specific setup > Reload.
  8. In the OfficestoreAppFlow.4ba, select the Account program entity and set the value of the Icon property to a valid image name. See Image directory structure.
  9. Save the files.
  10. Rebuild and run the Account program and see the icon used in the window title of the program.

    Figure: Custom icon in window title


    The running application with a smileyface icon in the window title.