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 ApplyTemplateA tag associated with this field is assigned to a specific macro variable definedfor the frame template. The tag exists as a string value assigned to theClientText attribute of the high-level composite field. The value of the string isequal to the value of the $_TopComposite macro variable defined for the frametemplate.By evaluating the $_TopComposite macro variable for a frame template andthe frame generated from it, the ApplyTemplate utility is able to identify whichspecific high-level composite field on the frame's form comprises the templateownedportion. By overwriting only this high-level composite, and no other, theApplyTemplate utility can be guaranteed to not affect any user changes to theframe.Because the high-level composite of the frame is overwritten by thecorresponding high-level composite from the frame template, all of the fieldsgenerated by the frame template assistant when the frame was first created(or since the last time the ApplyTemplate utility was run) are overwritten orlost. The second function of the ApplyTemplate utility, therefore, is toregenerate the dynamic fields and queries created by the frame templateassistant. This function, however, is not performed by the ApplyTemplateutility itself, but is instead performed entirely by the frame assistant, which iscalled from the ApplyTemplate utility.Batch Mode Compared to Interactive ModeThe ApplyTemplate utility has a mode value, with the values of interactive orbatch, which it passes to the frame template assistant when it is called. TheApplyTemplate utility itself does not behave differently when in these twomodes.Note: A frame template does not need to have changed for the ApplyTemplateutility to be run. The ability to regenerate fields and queries can also be usedto reconfigure a frame to accommodate changes since the frame was firstgenerated—for example, either in the database tables or in the applicationrequirements.The ApplyTemplate utility cannot itself guarantee that user customizations to aframe are not affected by sending it through its frame template assistantprocedure again. The frame template assistant procedure must be designed insuch a way so that it honors the $_TopComposite boundary.Writing a Template Assistant 427

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

Saved successfully!

Ooh no, something went wrong!