|
35 | 35 | <link type="text/css" rel="stylesheet" href="../css/topics/style.css" /> |
36 | 36 | <script type="text/javascript" src="../js/jquery-3.5.1.min.js"></script> |
37 | 37 | <script type="text/javascript" src="../js/nsa.js?e72569b7"></script> |
38 | | -<script type="text/javascript" src="../js/settings.js?fa37b6cd"></script> |
| 38 | +<script type="text/javascript" src="../js/settings.js?d6764f70"></script> |
39 | 39 | <script type="text/javascript" src="../js/core.min.js?e72569b7"></script> |
40 | 40 | <script type="text/javascript" src="../js/topic.min.js?e72569b7"></script> |
41 | 41 | <script type="text/javascript"> |
|
54 | 54 | <div id="content"> |
55 | 55 | <p> </p> |
56 | 56 | <p class="ps0"><span class="ts2">A button loop is a </span><a href="templatefiles.htm" class="hs0">template file</a><span class="ts2"> construct which allows you to iterate through the collection of buttons that CodeGen has information about.</span></p> |
57 | | - <p class="ps0"><span class="ts2">The definition of the buttons processed in a button loop can come from one of two places. If you are processing based on a UI Toolkit input window definition then by default the collection of buttons is determined by the buttons found in that input window definition. Otherwise the button collection is defined by a configuration file called </span><span class="ts3">DefaultButtons.xml</span><span class="ts2">, which you will find in the folder that you installed CodeGen into.</span></p> |
58 | | - <p class="ps0"><span class="ts2">Note: Even if you are processing based on a UI Toolkit input window definition, you can chose to ignore the definition of buttons found in the window and use the definitions from </span><span class="ts3">DefaultButtons.xml</span><span class="ts2"> via the </span><a href="commandlinereference.htm#option_b" class="hs0">–b command line option</a><span class="ts2">.</span></p> |
59 | | - <p class="ps0"><span class="ts2">Button loops are delimited by a matching pair of </span><span class="ts4"><BUTTON_LOOP></span><span class="ts2"> and </span><span class="ts4"></BUTTON_LOOP></span><span class="ts2"> tags that surround the template code to be inserted for each button. The code between the opening and closing tags of a button loop is repeated for each button in the button collection.</span></p> |
| 57 | + <p class="ps0"><span class="ts2">The definition of the buttons processed in a button loop can come from one of two places. If you are processing based on a UI Toolkit input window definition then by default the collection of buttons is determined by the buttons found in that input window definition. Otherwise the button collection is defined by a configuration file called </span><span class="ts4">DefaultButtons.xml</span><span class="ts2">, which you will find in the folder that you installed CodeGen into.</span></p> |
| 58 | + <p class="ps0"><span class="ts2">Note: Even if you are processing based on a UI Toolkit input window definition, you can chose to ignore the definition of buttons found in the window and use the definitions from </span><span class="ts4">DefaultButtons.xml</span><span class="ts2"> via the </span><a href="commandlinereference.htm#option_b" class="hs0">–b command line option</a><span class="ts2">.</span></p> |
| 59 | + <p class="ps0"><span class="ts2">Button loops are delimited by a matching pair of </span><span class="ts3"><BUTTON_LOOP></span><span class="ts2"> and </span><span class="ts3"></BUTTON_LOOP></span><span class="ts2"> tags that surround the template code to be inserted for each button. The code between the opening and closing tags of a button loop is repeated for each button in the button collection.</span></p> |
60 | 60 | <p class="ps0"><span class="ts2">Button loop tokens are tokens that can only be used within a button loop:</span></p> |
61 | 61 | <p class="ps1"><span style="font-size: 14pt; line-height: 0; vertical-align: middle; color: Black">•</span><span style="display: inline-block; width: 18px"></span><a href="buttonloopexpansiontokens.htm" class="hs0">Button Loop Expansion Tokens</a></p> |
62 | 62 | <p class="ps1"><span style="font-size: 14pt; line-height: 0; vertical-align: middle; color: Black">•</span><span style="display: inline-block; width: 18px"></span><a href="buttonloopexpressiontokens.htm" class="hs0">Button Loop Expression Tokens</a></p> |
63 | 63 | <p class="ps0"><span class="ts2">There are two types of button loop, multi-line button loops and in-line button loops.</span></p> |
64 | 64 | <p class="ps0"><span class="ts1">Multi-Line Button Loops</span></p> |
65 | 65 | <p class="ps0"><span class="ts2">Multi-line button loops occur when the opening and closing button loop tags appear on separate lines in a template file, and delimit one or more entire lines of template code, like this:</span></p> |
66 | | - <p class="ps9"><span class="ts3">[code]</span><br /><span class="ts4"><BUTTON_LOOP></span><br /><span class="ts4">code</span><br /><span class="ts4"></BUTTON_LOOP></span><br /><span class="ts3">[code]</span></p> |
| 66 | + <p class="ps9"><span class="ts4">[code]</span><br /><span class="ts3"><BUTTON_LOOP></span><br /><span class="ts3">code</span><br /><span class="ts3"></BUTTON_LOOP></span><br /><span class="ts4">[code]</span></p> |
67 | 67 | <p class="ps0"><span class="ts2">Multi-line button loops generate one or more lines of output code for each button that is processed.</span></p> |
68 | 68 | <p class="ps0"><span class="ts1">In-Line Button Loops</span></p> |
69 | 69 | <p class="ps0"><span class="ts2">In-line button loops exist when the opening and closing button loop tags appear on the same line in a template file, and delimit part of a line of template code, like this:</span></p> |
70 | | - <p class="ps9"><span class="ts3">[code] </span><span class="ts4"><BUTTON_LOOP> code </BUTTON_LOOP></span><span class="ts3"> [code]</span></p> |
| 70 | + <p class="ps9"><span class="ts4">[code] </span><span class="ts3"><BUTTON_LOOP> code </BUTTON_LOOP></span><span class="ts4"> [code]</span></p> |
71 | 71 | <p class="ps0"><span class="ts2">In-line button loops generate code into the current output line only.</span></p> |
72 | 72 | <p class="ps0"><span class="ts1">Default Buttons</span></p> |
73 | | - <p class="ps0"><span class="ts2">The default buttons are defined in </span><span class="ts3">DefaultButtons.xml</span><span class="ts2">, as follows:</span></p> |
74 | | - <p class="ps9"><span class="ts3"><?xml version='1.0'?></span><br /><span class="ts3"><CodeGenDefaultButtons></span><br /> <span class="ts3"><Button name="Ok" caption="OK" image="" method="" elb="" quickselect="O" /></span><br /> <span class="ts3"><Button name="Cancel" caption="Cancel" image="" method="" elb="" quickselect="C" /></span><br /> <span class="ts3"><Button name="Help" caption="Help" image="" method="" elb=""quickselect="H" /></span><br /><span class="ts3"></CodeGenDefaultButtons></span></p> |
| 73 | + <p class="ps0"><span class="ts2">The default buttons are defined in </span><span class="ts4">DefaultButtons.xml</span><span class="ts2">, as follows:</span></p> |
| 74 | + <p class="ps9"><span class="ts4"><?xml version='1.0'?></span><br /><span class="ts4"><CodeGenDefaultButtons></span><br /> <span class="ts4"><Button name="Ok" caption="OK" image="" method="" elb="" quickselect="O" /></span><br /> <span class="ts4"><Button name="Cancel" caption="Cancel" image="" method="" elb="" quickselect="C" /></span><br /> <span class="ts4"><Button name="Help" caption="Help" image="" method="" elb=""quickselect="H" /></span><br /><span class="ts4"></CodeGenDefaultButtons></span></p> |
75 | 75 | <p class="ps0"><span class="ts1">Special Button Processing</span></p> |
76 | 76 | <p class="ps0"><span class="ts2">When generating application source code, and in particular forms, it is often useful to be able to identify a button as either an "OK" button (which generally saves the data and closes the form) or a "Cancel" button (which closes the form without saving the data). Unfortunately there is no way to easily identify this from information in a UI Toolkit input window script.</span></p> |
77 | 77 | <p class="ps0"><span class="ts2">CodeGen considers a button to be an "OK" button if the term "OK" appears in either the name or caption of the button.</span></p> |
78 | 78 | <p class="ps0"><span class="ts2">CodeGen considers a button to be a "Cancel" button if the word "Cancel" appears in the buttons name or caption, or if the word "abandon" appears in the buttons name (UI Toolkit programmers often name the cancel button O_ABANDON).</span></p> |
79 | | - <p class="ps0"><span class="ts2">The status a button as either an OK or Cancel button can be tested with the button loop expressions </span><span class="ts3"><IF OKBUTTON></span><span class="ts2"> and </span><span class="ts3"><IF CANCELBUTTON></span><span class="ts2">.</span></p> |
| 79 | + <p class="ps0"><span class="ts2">The status a button as either an OK or Cancel button can be tested with the button loop expressions </span><span class="ts4"><IF OKBUTTON></span><span class="ts2"> and </span><span class="ts4"><IF CANCELBUTTON></span><span class="ts2">.</span></p> |
80 | 80 | <p class="ps0"><span class="ts2"> </span></p> |
81 | 81 | <p><span class="ts2"> </span></p> |
82 | 82 | <p><span class="ts2"> </span></p> |
|
0 commit comments