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 AssistantThe full text of the frame assistant procedure is as follows:Procedure Create_Dyn_Fld(fs = FrameSource not null,return_code = integer not null,batch_mode = integer not null)=declaretrim_field = FreeTrim default null;text_string = StringObject;status = integer not null;enddeclarebeginif batch_mode = TRUE thentext_string.value = 'Hello, world!';elsestatus = curprocedure.replypopup(messagetext= 'Enter text string.',reply = text_string);if status != PU_OK thenreturn_code = ER_FAIL;return;endif;endif;trim_field = freetrim.create();trim_field.textvalue = text_string.value;trim_field.ParentField = fs.TopForm;return_code = ER_OK;return;end;Example—Field Template AssistantIn this example, a field template assistant procedure has been designed tocustomize a field template.The field template consists of a composite field that contains several entryfields and one text field for the title. The field template assistant procedureprompts the user for the title and assigns that text string to the text field ofthe composite field.First, the parameters are defined:Procedure Create_Label(ff = FormField not null,return_code = integer not null,batch_mode = integer not null)=Writing a Template Assistant 423

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

Saved successfully!

Ooh no, something went wrong!