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 Frames/* Determine which row in table contains** video. */if find_video_row(video_list = vlist, details_frame= delete_details_frame, row = byref(i))= TRUEthen/* Now delete it */vlist.RemoveRow(rownumber = i);endif;/* Now add it to new details frames list,** since it is now in insert mode */i = new_details_frames.LastRow() + 1;new_details_frames[i] = delete_details_frame;end;How You Can Access the SendUserEvent ParametersThe SendUserEvent method has four message parameters, messageobject,messageinteger, messagefloat, and messagevarchar that you can use to passvalues to the receiving frame. For information about these parameters, seeSendUserEvent Method (see page 339).If the SendUserEvent call activates a userevent event block in the receivingframe, OpenROAD stores these values in four corresponding FrameExecattributes, MessageObject, MessageInteger, MessageFloat, andMessageVarchar, that are accessible only in the event block. To access thisdata, use the CurFrame system variable to reference the current FrameExec.In the following sample from a frame script, the UpdateTitle event block setsthe window title to the value of the MessageVarchar attribute that is passed tothe frame by the messagevarchar parameter of the SendUserEvent method:on userevent 'UpdateTitle' =beginCurFrame.WindowTitle =CurFrame.MessageVarchar;end;Because the MessageObject attribute stores an object of the generic Objectclass, you must cast the object to the appropriate system or user class in orderto work with it in your user event block. (Casting is described in How You CanWork with Attributes (see page 140).)338 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!