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 FramesThe following example uses the SendUserEvent method to send theFlushvalues event to a child frame....begin...childframe.SendUserEvent(eventname = 'Flushvalues',messageobject = CurFrame,errorevent='WaitForEvent');end;To specify the frame that contains the user event you want to trigger, youmust reference the FrameExec variable for the running instance of the frame.(You cannot use the frame name because OpenROAD allows you to open thesame frame more than once.) There are four ways to reference the FrameExecvariable:• Use the CurFrame system variable name to reference the current frame.Use this variable when the frame needs to send a user event to it. Thefollowing frame script example illustrates this concept:CurFrame.SendUserEvent(eventname ='LoadBalanceTable');• Use the ParentFrame attribute to reference the parent of the currentframe.Because the ParentFrame attribute represents the ProcExec object for theparent frame, you must cast it as a FrameExec object in order to use it asa FrameExec reference. The following frame script example illustrates thisconcept:on windowclose =beginFrameExec(CurFrame.ParentFrame).SendUserEvent(eventname = 'GraphicClosed');return;end;• Use the reference variable returned by the openframe statement that youused to open the frame.In the following example, graphic_frame is a variable of type FrameExec:graphic_frame.SendUserEvent(eventname = 'UpdateTitle',messagevarchar = video.title);• Store a FrameExec reference obtained through any of the previouslymentioned methods in a global variable so you can access it from otherframes.340 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!