Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Determines whether the system can declare a member variable that has the same name as the control.
Syntax
public boolean autoDeclaration([boolean value])
Run On
Client
Parameters
- value
Type: boolean
A Boolean data type that indicates whether the system can declare a variable of the same name as a form list control.
Return Value
Type: boolean
true if the member variable can be declared for this control; otherwise, false.
Remarks
Controls cannot have identical names.
Examples
The following example shows a call to the autoDeclaration method that specifies that the system can declare a variable that has the same name as a form list control.
static void createForm2(Args _args)
{
Args args;
Form form;
FormRun formRun;
FormBuildDesign formBuildDesign;
FormBuildDataSource formBuildDataSource;
FormBuildListControl formBuildListControl;
FormListControl formListControl;
int idx4;
DictTable dictTable;
CustTable custTable;
// Create the form header.
form = new Form();
// Add data sources to the form.
dictTable = new DictTable(tableNum(custTable));
formBuildDataSource = form.addDataSource(dictTable.name());
formBuildDataSource.table(dictTable.id());
// Create the form design.
formBuildDesign = form.addDesign("Design");
formBuildDesign.caption("myForm");
// Add a form list control.
formBuildListControl =
formBuildDesign.addControl(FormControlType::ListView,"List");
idx4 = formBuildListControl.id();
args = new Args();
args.object(form);
// Create the run-time form.
formRun = classfactory.formRunClass(args);
formRun.run();
formRun.detach();
formListControl = formRun.control(idx4);
formListControl.autoDeclaration(true);
}