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.

Chapter 16: Writing a Template AssistantThis section contains the following topics:Conceptual Overview (see page 419)How You Can Write an Assistant (see page 420)How You Can Ensure Compatibility Between the Assistant and ApplyTemplate(see page 425)You can create and invoke sophisticated templates by writing a frame or fieldassistant and associating it with your template.Conceptual OverviewFrame and field templates can be thought of as “boilerplates” that are used tocreate standard frames and fields throughout your application. They provideconsistency in appearance and behavior among the frames and fields youcreate.AssistantsAssistants are procedures that can be attached to a frame or a field template.They can be designed to prompt the user for varying amounts of informationused to customize the frame or field according to the user's needs or toperform a certain function each time the field or frame is invoked.How You Can Attach an Assistant to a TemplateYou can attach an assistant to an existing template through the frame or fieldtemplate's Property Inspector. (For more information, see the User <strong>Guide</strong>.) Anassistant can also be attached to a field template from OpenROADWorkbench's Field Template Editor.How You Can Ensure Compatibility Between a Frame Assistant andApplyTemplateWhen you want to upgrade a frame that has been previously generated from atemplate, you can do so by using the ApplyTemplate utility. Doing soincorporates any enhancements or new features that you may have made tothe template into your existing frames and fields.Writing a Template Assistant 419

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

Saved successfully!

Ooh no, something went wrong!