Running ABL programs hosted in OEA

Posted by vjug on 13-Nov-2007 02:38

All Replies

Posted by jankeir on 13-Nov-2007 03:02

Everything you need is in adecomm/oeideservice.i

It's in $DLC\src\adecomm.pl

Posted by Admin on 13-Nov-2007 03:10

I'm not sure if this is documented somewhere or supported by PSC - neither do I remember where I got that code exactly from...

You must include {adecomm/oeideservice.i}

Then you have to add

IDE-WINDOW-TYPE = 0 /* embedded mode */
IDE-PARENT-HWND = iViewHwnd

to the assign phrase of the CREATE WINDOW statement. There are APIs in the include file that enable creation of views and embedding of OE windows in that view. If you have created the window using the AppBuilder, you have to delete the window instance in the main block (and add those to options to the assign block). You may check the include file for additional APIs.

This code works for me (before RUN enable_UI that places the FORM on the new window instance):

DEFINE VARIABLE cViewId AS CHARACTER NO-UNDO
INIT "com.openedge.pdt.text.views.OERuntimeView".
DEFINE VARIABLE cSecondaryId AS CHARACTER NO-UNDO
INIT "mypersonalviewid".

DELETE OBJECT C-Win NO-ERROR.

showView(cViewId, cSecondaryId, {&VIEW_ACTIVATE}).
setViewTitle(cViewId, cSecondaryId, "My View Title").

RUN getViewHwnd IN hOEIDEService (cViewId, cSecondaryId, OUTPUT iViewHwnd) NO-ERROR.

CREATE WINDOW C-Win ASSIGN
IDE-WINDOW-TYPE = 0 /* embedded mode */
IDE-PARENT-HWND = iViewHwnd
HIDDEN = YES
TITLE = "Window Title"
HEIGHT = 11.24
WIDTH = 67.2
MAX-HEIGHT = 16
MAX-WIDTH = 93.2
VIRTUAL-HEIGHT = 16
VIRTUAL-WIDTH = 93.2
RESIZE = YES
SCROLL-BARS = NO
STATUS-AREA = NO
BGCOLOR = ?
FGCOLOR = ?
KEEP-FRAME-Z-ORDER = YES
THREE-D = YES
MESSAGE-AREA = NO
SENSITIVE = YES.

To launch that window when OEA starts the OpenEdge runtime, you may create a .p file called _idestartup.p (first occurance in Propath wins). Launch you window procedure persistent and don't create a WAIT-FOR statement! That might break the communication between OEA and the AVM.

HTH, Mike

Posted by vjug on 13-Nov-2007 04:31

Thank you, it works great!

Is there any reference documentation where I could find more details about integrating ABL programs with OEA? I'm interested in, for instance, if there is posibility to get project database connections and manipulate with them, etc

Posted by jankeir on 13-Nov-2007 05:16

Thank you, it works great!

Is there any reference documentation where I could

find more details about integrating ABL programs with

OEA? I'm interested in, for instance, if there is

posibility to get project database connections and

manipulate with them, etc

I don't think this is supported or documented. In 10.1A02 I've discovered C:\PROGRESS\OpenEdge\oeide\eclipse\plugins\com.openedge.pdt.text_10.1.0.02\runtime\_server.p provides a lot of usefull information about how architect works (you should be able to find the right path for your progress version.)

But anything you can get based on that is unsupported as far as I know.

This thread is closed