Code Generation Methods at Recording Time

Some important methods that are called from the capture method are listed in the following table.

Method Description
genMethodLocalVars For peer schema access or dynamic controls, generates methodVars= for local variables and methodSaveSource= containing getPropertyValue, getControl, and so on.
getFullControlName Returns the control name as required in generated code, taking into account peer schema access, generated form reference names, and so on.
indentOk

Facilitates suppression of code generation for tracked inheritMethod calls. It is generally called with elseif … and indentOk(app.atcgIndentMax) then…

Note that there are other, older mechanisms for handling this, which are being phased out. The checkIndent method lets you comment out lines if they are indented too far. In parseInputFile, indentation can be directly checked and code generation suppressed. The indentOk mechanism should be used where possible.

In some cases, isInheritMethod can be used to explicitly check for inheritMethod calls, but we usually want to suppress code generation when application code calls Button control click event methods, for example. These will show as indented but not inherited, so the indentOk method is usually the correct one to call.

isPeerSchemaClass, controlWasAdded, and controlWasLoaded These methods facilitate checking for special code generation requirements.