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 Build a Frame DynamicallyHow You Can Create the Frame and Set AttributesTo create a frame dynamically, you must first create a FrameSource object forthe frame. The FrameSource object contains a frame's source definition, itsinitial settings when it is called or opened. You must first declare the referencevariable that points to the FrameSource object. For example:test_frame = FrameSource;A FrameSource has the following attributes that you must set to run theframe:TopFormScriptContains the form associated with the frameContains the frame's scriptIn a dynamic context, setting these attributes means that you must constructthe form and the script in your 4GL code. For a discussion of these procedures,see How You Can Create the Form (see page 393) and How You Can Createthe Script (see page 395).If the frame you are constructing has a menu, you must construct the menu(another attribute of the frame source) in your 4GL code. For a discussion ofthis procedure, see How You Can Create the Menu (see page 394).Other frame source attributes that you can set are:DataTypeSpecifies the data type of the frame's return valueIsNullableHow You Can Create the FormSpecifies whether the return value data type is nullableThe form that a frame displays is an object of the FrameForm class. AFrameForm object is a special case of a subform that encloses the full set ofFormField objects in a frame.After you have created the frame source, create the frame's form and assign itto the TopForm attribute of the frame source. For example:test_frame.TopForm = FrameForm.Create();At this point, your form is a blank form, without fields. The next step is tocreate the fields.Creating a Frame at Runtime 393

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

Saved successfully!

Ooh no, something went wrong!