Show Contents List
Summary
FRM015B - Getting Started with Forms Programming Part B
Important Observations
- There are many ways of coding RDML statements to achieve the same results. For example, the following two statements will produce the same result:
CHANGE FIELD(#STD_TEXT) TO(*BLANKS)
#STD_TEXT := *BLANKS
- The DEFINE_COM commands may be hidden using the editor settings.
- The F2 Feature help provides information about component properties, events and methods
- If you know LANSA functions, you need to understand there is a fundamental difference between forms and functions in the programming paradigm. Functions are procedural programs that execute in a "top to bottom" fashion. Forms use an event-driven paradigm based on graphical user interfaces. The form waits for a specific event to occur and then executes the event. Once the event has completed, control is passed back to the interface. Hence, the location of the event routines in a form's code is not important to the execution of the program.
Tips & Techniques
- F2 feature help provides details about components. The F1 online help will provide details about the user interface, commands, and options.
- Use the dialog box launcher in the Compile group in the ribbon if you need to specify the compile settings. If you submit compiles using Compile command, the compile options will simply default to the last values set in the Compile options dialog.
The basic rules you need to remember when writing code:
- Only one command is allowed per line in the editor.
- You cannot have any leading blanks before a command.
- A command may have no parameters (as in END_COM) or may have many parameters (as in BEGIN_COM).
- Many command parameters are optional.
- Parameters may have one or more values (as in ROLE(*EXTENDS #PRIMFORM)). A blank space is used to separate values in a list.
- When coding parameters, do not leave a space between the parameter keyword and the opening bracket. For example, OPTIONS(*DIRECT) or OPTIONS( *DIRECT ) are correct, but OPTIONS (*DIRECT) is not correct.
- When parameters use their default values, the parameters are not explicitly shown in the command, but they can be viewed in the Command Assistant tab. Select the line of code and use F4 to display the Command Assistant tab. It is often convenient to float and resize this tab so that the command parameters can be seen more easily.
- An asterisk * in the first position of a line is used for a comment. You can use the short cut keys CTRL+W and CTRL+Shift+W to comment or uncomment a single line or selected block of lines.
What You Should Know
- The basic structure of LANSA commands.
- How to display feature help.
- How to find intrinsic methods.
- How to use intrinsic methods.
- How to use the RDML/RDMLX commands.
- How to write a Boolean expression.
Show Contents List