10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

How You Can Ensure Compatibility Between the Assistant and ApplyTemplateHow the Field Creation Process WorksFrom OpenROAD Workbench's Frame Editor, you can specify that a field becreated from a field template. When a field is created from a field template,the following steps are performed:• The field template specified by the user is fetched from its library imagefile.• All of the static functionality defined for the field template—in the form of a4GL field script and any visual characteristics—is copied to the newlycreated field.• If an assistant has been defined for the field template, the assistant is thencalled and is passed the newly created field for dynamic customization.The static functionality provided by the field template and the dynamicfunctionality provided by the assistant combine to create a field that isimmediately unique and usable. The ApplyTemplate is a mechanism to performthese three steps on fields that have already been created.How You Can Use ApplyTemplate on a FieldThe need to use the ApplyTemplate utility on a generated field arises in thefollowing situations:• When the static functionality provided by a field template has changed,and the user wants to introduce these changes that have already beengenerated• When the user wants to regenerate a field with new dynamiccharacteristicsUnlike frames generated from frame templates, fields generated from fieldtemplates are not partitioned into two areas, one belonging to the utility, andone belonging to the user. A field regenerated with the ApplyTemplate utilitycompletely replaces the previous field, and any user customizations are lost.Example—ApplyTemplate CompatibilityIn this example, the frame template assistant procedure from the previousexample has been modified for use with the ApplyTemplate utility. Thedifference between this example and the previous one is that the proceduremust place the dynamically generated trim field inside of the top-levelcomposite field of the frame template.For this example, assume that the $_TopComposite macro variable of theframe template has been assigned a value of FreetrimComposite.428 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!