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.

How You Can Communicate with an External Program Using External User EventsPurgeUserEvent MethodThe PurgeUserEvent method lets you remove user events from the eventqueue. If you trigger a series of related user events and one of the events failsfor some reason, you can use this method to remove the remaining userevents from the event queue.In addition, when you use the resume statement to prevent the user fromleaving a field that contains invalid data, OpenROAD does not remove the userevents from the event queue (although it does remove the other frame eventsfor the current frame). Use the PurgeUserEvent method to remove them ifnecessary. The PurgeUserEvent method removes one or all the user eventsfrom the event queue.The syntax of this method is:integer_var = FrameExec_var.PurgeUserEvent(eventname = varchar(256))The PurgeUserEvent method removes the specified user event from the eventqueue. If you do not specify the eventname parameter, it removes all userevents for the specified frame. The method returns the number of eventsremoved from the queue.You can use this method for any running version of a frame. To specify theFrameExec variable for the running version of the frame, use any of themethods described in SendUserEvent Method (see page 339).How You Can Communicate with an External ProgramUsing External User EventsIn many computing environments, there are multiple applications runningconcurrently. Often, it is critical that these applications communicate with eachother. For example, in a manufacturing plant, several applications mightcontrol the production process, each sending status information such astemperatures and inventory use to a central location. Another applicationmight gather this information continuously, providing a central display that letsworkers monitor the machines and tells them when there is a problem. Thisapplication communicates with the process applications to update its displays.OpenROAD applications can communicate with external programs through userevents. Just as you can trigger a user event for frames with 4GL code, you cantrigger a user event from an external program.Inter-Frame Communication Techniques 347

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

Saved successfully!

Ooh no, something went wrong!