12. Inter-Frame Communication Techniques : How You Can Communicate with an External Program Using External User Events : External User Event Demo : How the External User Event Demo Works on UNIX or Linux
 
Share this page                  
How the External User Event Demo Works on UNIX or Linux
The directory $II_SYSTEM/ingres/w4glsamp/extevent contains the following files:
extevent.exp
An export file of the OpenROAD application used to run the sample application
exteventu.c
A source file for a non-OpenROAD executable
makefile
A makefile for compiling and linking the library file
To use the demo application, you must perform the following basic steps:
1. Build the 3GL application.
2. Import the sample application into your database.
3. Run the sample application.
See the following sections for details on each of these steps.
Build the 3GL Application
You can build the 3GL application by setting environment variables and using the makefile to build the sample application.
To build the 3GL application
1. Set your PATH and SHARED LIBRARY PATH environment variables to run OpenROAD.
The Mainwin runtime environment should also be initialized.
2. Use the makefile provided for your platform to compile exteventu.c:
cd $II_SYSTEM/ingres/w4glsamp/extevent
make
Import the Sample Application into Your Database
You can import the sample OpenROAD application by entering the following command on the command line:
w4gldev backupapp in dbname ExtEvent %II_SYSTEM%/ingres/w4glsamp/extevent/extevent.exp
Run the Sample Application
You can run the sample application by entering the following command at the command prompt:
w4gldev rundbapp dbname ExtEvent
The sample application starts.
To use the application
1. Click the Register Event button.
2. Click the Send menu button in the external application frame.
The ExtEvent demo frame displays a message that confirms that the event was received.
3. Click the UnRegister Event button in the ExtEvent demo.
4. Click the Send menu button again.
The OpenROAD application does not receive the external event.