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.

Communicating Between OpenROAD FramesIn the following example, the Terminate method is used to close thevideo_graphic window when the user switches the Graphics toggle on the Viewmenu to off:on click menu.view_menu.show_graphic =beginif menu.view_menu.show_graphic = FALSE thengraphic_frame.Terminate();graphic_frame = null;If you want to catch any terminate requests and do some processing beforethe frame is actually closed, you can provide an event block for the Terminateevent. The Terminate method triggers the Terminate event for the frame. Formore information on the Terminate event, see the Language Reference <strong>Guide</strong>online help.Note: The Terminate event block cannot prevent the frame from beingterminated. If you include a resume statement in the event block, OpenROADends the event block and terminates the frame.Global VariablesOpenROAD provides global variables that you can use to store information thatis available to all the frames in the application. You can use global variables tostore global state information, such as the user's name and security level. Youcan also use them to share information between frames. Because updates toglobal variables take effect immediately, when one frame changes the value ofa global variable, the new value is immediately available to any other frame inthe application.Global variables are not displayed directly on OpenROAD forms. To display theinformation contained in a global variable, you can assign the global variable toa local variable that is associated with a field on the form. In this case, to keepthe value of the local variable up to date, you must reassign the value of thelocal variable when updates are made to the global variable.For more information about how to declare global variables, see the User<strong>Guide</strong>.Inter-Frame Communication Techniques 335

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

Saved successfully!

Ooh no, something went wrong!