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.

How You Can Write an Assistantbatch_modeParameter Type: Integer (TRUE, FALSE)Specifies a Boolean parameter telling the frame assistant procedurewhether it is being run in batch mode. If TRUE, the procedure cannotdepend on any form of user interaction, including calling user frames foruser input. If FALSE, the frame assistant can make use of frames for userinput.In the ApplyTemplate utility dialog, selecting the Batch option passes avalue of TRUE; and for the Interactive option, FALSE.For field template assistant procedures, the parameters are:ffParameter Type: FormFieldSpecifies the instance of the field that is currently being createdreturn_codeParameter Type: Integer (ER_OK, ER_FAIL)Specifies a return code. It is assigned the value ER_OK if the procedurehas completed successfully; otherwise, it is assigned ER_FAIL.batch_modeParameter Type: Integer (TRUE, FALSE)Specifies a Boolean parameter telling the field assistant procedure whetherit is being run in batch mode. If TRUE, the procedure cannot depend onany form of user interaction, including calling user frames for user input. IfFALSE, the field assistant can make use of frames for user input.In the ApplyTemplate utility, selecting the Batch option passes a value ofTRUE; and for the Interactive option, FALSE.The following sections present examples of frame and field templateassistants.Example—Frame Template AssistantIn this example, a frame template assistant procedure has been designed tocustomize a frame template. The frame template assistant procedure promptsthe user for a text string, assigns that string to a dynamically created FreeTrimfield, and then places the field on the form.Writing a Template Assistant 421

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

Saved successfully!

Ooh no, something went wrong!