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 FramesIn the following example, the MessageObject attribute contains a bitmap, so itis cast to the BitmapObject system class:on userevent 'UpdateGraphic' =beginvid_graphic_bitmap =BitmapObject(CurFrame.MessageObject);CurFrame.Flush();CurFrame.IsAutoSized = TRUE;CurFrame.WindowVisibility = WV_VISIBLE;CurFrame.BringToFront();end;In the next example, the MessageObject attribute contains an object of typevideo_row. The UpdateEntry event block casts the MessageObject to thevideo_row user class.on userevent 'UpdateEntry' =beginvideo = VIDEO_ROW(CurFrame.MessageObject);SendUserEvent MethodNote: If the SendUserEvent call completes a WaitFor method call, themessage parameters are stored in the Event object returned by the WaitForcall. The Event object has five attributes. One attribute holds the name of theevent and each of the other four holds one message parameter. You canaccess the parameter values in the Event object attributes in the event blockthat contains the WaitFor call.Use the SendUserEvent method to trigger the user event in a frame. When theuser event is triggered, OpenROAD adds it to the application's native eventqueue. If the frame is active, OpenROAD queues the user event immediately.If the frame is inactive because it has called another frame or procedure,OpenROAD waits until the frame becomes active again before it queues theuser event. The message parameters of the SendUserEvent method let yousend data to the receiving frame.The syntax of the SendUserEvent method is:FrameExec_var.SendUserEvent(eventname = varchar,messageobject = object, messageinteger = integer,messagefloat = float, messagevarchar = varchar,delay = float, focusbehavior = integer,errorevent = varchar)Inter-Frame Communication Techniques 339

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

Saved successfully!

Ooh no, something went wrong!