10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Communicating Between OpenROAD FramesMessage ParametersThe four optional message parameters of the SendUserEvent method,messageinteger, messagefloat, messagevarchar, and messageobject, let youpass values to the receiving frame. If the SendUserEvent method triggers auser event block, OpenROAD stores the values in the corresponding messageattributes of the receiving frame's FrameExec object, MessageInteger,MessageFloat, MessageVarchar, and MessageObject. If the SendUserEventmethod completes a WaitFor call in the receiving frame, OpenROAD stores thevalues in the Event object returned by the WaitFor call when it completes.Use the three simple-variable parameters, messageinteger, messagefloat, andmessagevarchar, to pass integer, float, and varchar values, respectively. Thefollowing example uses the messagevarchar parameter to send the title of thevideo to a frame:on setvalue video.title =beginCurFrame.WindowTitle = video.title;if graphic_frame is not null thengraphic_frame.SendUserEvent(eventname= 'UpdateTitle',messagevarchar = video.title);endif;end;Use the messageobject parameter to pass any object. Because the object canbe any system or user class, this parameter enables you to send any set ofinformation that you want. This is especially useful with user classes. Simplycreate a user class that specifies the set of data you want to pass and then usethe messageobject parameter to pass an object of that class. The followingexample uses this technique to pass information about a new video to thevideo_list frame. New_video is a reference variable of the video_row userclass.parent_frame.SendUserEvent(eventname ='InsertEntry',messageobject = new_video);Focusbehavior ParameterIn the receiving frame, you can access the object with the MessageObjectattribute for CurFrame (described in UserEvent Event Block (see page 337)).Every frame has its own input focus. When the user leaves a window, theframe does not lose its input focus. The input focus stays on the same field,even though the user has selected another field in another window.Inter-Frame Communication Techniques 341

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

Saved successfully!

Ooh no, something went wrong!