10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Dynamic Statements ConsiderationsDynamic Statements ConsiderationsThe following section contains information about what you should be aware ofwhen using dynamic statements.How You Can Populate a FlexibleForm, StackField, or MatrixField DynamicallyDuplicating or creating several fields and parenting them to a FlexibleForm,StackField, or MatrixField that is currently displayed in a frame can beextremely slow because of the amount of configuration and redrawing thatmust take place as each new field is created and added to its parent field. Toincrease the performance of creating several fields in this situation, you shouldunparent the FlexibleForm, StackField, or MatrixField before creating theadditional children and reparent it immediately afterward.For example, if you have a FlexibleForm (flexform) that you are addingchildren to in a loop, you can use the following code to dramatically increasethe response time of this task:/* Unparenting the FlexibleForm first will speed** up the creation of all the children we are** adding.*/field(flexform).ParentField = null;for x = 1 to 100 dofld[x] = EntryField.Create();/*** Set additional attributes for** each EntryField here.*/fld[x].ParentField = field(flexform);endfor;/* Now we reparent the FlexibleForm to cause it** to reappear on the form (now it is only** reconfigured and drawn once, instead of** every time a child is added).*/field(flexform).ParentField = CurFrame.TopForm;418 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!