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 Invoke FramesThe example also illustrates how the calling frame can set an attribute(WindowTitle) of the called frame using the with clause of the openframestatement.on click view_button ={if (vlist[].details_frame is null) thenvlist[].details_frame = openframe video_detail(video_info = vlist[])with WindowTitle = vlist[].title;elsevlist[].details_frame.BringToFront();endif;}Any parameter in the called frame that you do not include in the parameter listis set to its default value.How You Can Close a FrameWhen you pass a simple variable, such as an integer or text string, anychanges made to its value in the called frame are not reflected in the callingframe. However, when you pass a 4GL object, such as a table field, you arepassing a reference to the object, not the object itself. Therefore, both thecalled frame and the calling frame have references to the same object, andany changes made to the object by the called frame are reflected in the callingframe as well. For more information about changing the value of a simplevariable in both the calling and the called frames, see How You Can PassParameters Between an Active Child and Inactive Parent (see page 101).To close a frame, use the return statement. This statement closes the frameand returns control to the calling frame. The following example shows how thereturn statement is used to take users back to the control frame when theyclick the Close button or close the window:on click close_button,on windowclose =begincleanup processing statementsreturn;endIn addition, when you return from a frame invoked by the callframe statement,you can use the return statement to pass a return value back to the callingframe.<strong>Programming</strong> Frames 99

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

Saved successfully!

Ooh no, something went wrong!