User Tools

Site Tools


koda:en:documentation:dialog_generating_options

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

koda:en:documentation:dialog_generating_options [2014/07/10 10:48] (current)
Line 1: Line 1:
 +====== Current Form Generating Options ======
 +
 +Tools -> Generating Options allows you to set parameters for generating code for the currently active form. Setting parameters here overrides the settings in Options -> Options -> Code Generator that were in effect when the form was created. They are saved with the form.
 +
 +{{  dialog_generating_options.png ​ |}}
 +
 +<wrap remarks_header>​Template</​wrap>​
 +
 +In the drop-down control, you can choose a code-generation template. While the Default template is capable of generating either Message Loop or OnEvent AutoIt GUI code, other templates generate only code for one AutoIt mode.
 +
 +Clicking on the **Manage** button displays the [[options_code_generator_templates|Code Templates dialog]]. Here you can view and edit existing code templates, and created new ones. 
 +
 +This dialog has two tabs: Options and Formatting.
 +
 +<wrap remarks_header>​Options</​wrap>​
 +
 +If **Generate OnEvent code** is not checked, only code templates that generate Message Loop code are available in the Template drop-down control. If it is checked, only code templates that generate OnEvent code are available.
 +
 +In Message-Loop mode, an //event// is handled in a Case; in OnEvent mode, it is handled by a Click function.
 +
 +If **Generate events for all controls** is not checked, //event// code is only generated for controls that have the OnClick property set in Object Inspector. If it is checked, //event// code is generated for all controls.
 +
 +If **Expand %var% variables** is not checked, Captions are converted to code literally. If it is checked, characters between the <color blue>​%</​color>​ signs are taken to be the name of a variable, possibly resulting in an expression.
 +
 +An example: <color blue>​Info for user %user%</​color>​ generates <color blue>"​Info for user " & $user</​color>​. ​
 +
 +AutoIt permits the programmer to code //use the default// for various parameters to GUI functions by entering -1. If **Variables instead of '​-1'​ where possible** is unchecked, Koda generates -1 where possible. If it is checked, Koda generates variables and constants that are the defaults.
 +
 +<wrap remarks_header>​Formatting</​wrap>​
 +
 +{{  dialog_generating_options_format.png ​ |}}
 +
 +The **Indent char** can be a //tab// or a //space//. The calls to GUI functions (in Message Loop mode), and OnClick functions (in OnEvent mode) are indented **Init** ​ characters. Other lines are indented an additional **Count** indent characters times the indent level.
 +
 +The default is for Koda not to declare control ID and % variables: the **Scope** of **Variables** is //Not set//. //Global// declares the variables as <color blue>​Global</​color>​ in generated code; //Local// declares them as <color blue>​Local</​color>​.
  
koda/en/documentation/dialog_generating_options.txt ยท Last modified: 2014/07/10 10:48 (external edit)