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 parent can also assign the opened child to a different parent by specifyinga third frame's FrameExec as the child's ParentFrame. You might change aframe's parent to allow the child frame to remain open when the frame thatcalled it closes. The following illustration demonstrates two frames, Frame_Band Frame_C, that are opened from Frame_A. Frame_D is opened byFrame_C. If Frame_C closes, Frame_D closes automatically. To allow Frame_Dto remain open after Frame_C closes, you could parent Frame_D to Frame_Bor Frame_A.For Example, to change Frame_D's parent from its calling frame (Frame_C) tothat frame's parent (Frame_A), you would type:openframe Frame_D with parentframe =FrameExec(Curframe.Parentframe);Note: Because the data type of the ParentFrame attribute is ProcExec, theprevious statement converts it to FrameExec. The process used to convert thedata type is called casting. For more information about casting, see How YouCan Work with Attributes (see page 140).You can also enable two child frames to communicate with each other bypassing the appropriate FrameExec to a child or storing a FrameExec object ina global variable.A child frame can always communicate with its parent by accessing the valueof the ParentFrame attribute. For a parent frame to access its child, it must getthe child's FrameExec object when it opens the child. The openframestatement provides access to the FrameExec object for the child frame. For anexplanation of obtaining the FrameExec object of the called frame from thereturn value of the openframe statement, see How You Can CommunicateBetween Open Frames (see page 104).Access to a frame's FrameExec object lets you use the SendUserEvent methodto send events to the called frame. For more information about communicatingbetween frames, see Inter-Frame Communication Techniques (see page 333).<strong>Programming</strong> Frames 97

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

Saved successfully!

Ooh no, something went wrong!