Embedding OE .w file into ABL Form

Posted by Admin on 15-Sep-2010 16:16

I am attempting to get an OpenEdge window (.w) embedded into an ABL Form and having little success. I am able to manually create a form with a .p file and embed the window that way. However that will not work for my situation.

Is it as easy as drag-and-drop and I've missed something? The videos/documentation are great but I can't make heads or tails of what I'm doing wrong. A point in the right direction or a detailed explanation on how to do it would help greatly.

Thanks!

All Replies

Posted by Admin on 16-Sep-2010 01:26

It's not as easy as drag and drop but the basics are also no rocket science.

Embedding Window Widgets will always require a little coding - the AppBuilder used to write the .w file is not aware of the Form and the Form is not aware of the .w File...

I've written a little bit about embedding windows in the script about my Exchange Online presentation: http://blog.consultingwerk.de/consultingwerkblog/2010/09/openedge-gui-for-net-adoption-and-migration-strategies-part-4-understanding-embedded-windows/

Basically I prefer that the .w file controls the whole embedding process. And this needs to be done in a method library include. At the time of embedding the window widget needs to be valid (created) but not yet realized (created on the windows Desktop). The best place for this condition is the method library include (see the procedure settings dialog).

When you've created a Form in the Visual Designer that contains the Progress.Windows.WindowContainer control already, add a property or method to the Form that will allow the .w file to pass the reference of the window ({&window-name} in the .w file) thru to the WindowContainer control.

So your .i file (method library) will have two tasks:

- create an instance of the Form

- pass the reference of the window widget ({&window-name}) to the Form to be passed thru to the WindowContainer.

When you are already using an include file based framework like the ADM1 and ADM2 all this can be "hidden" in the existing SmartWindow include files. But that's another story...

Posted by Admin on 21-Sep-2010 08:54

Mike,

Thank you for the quick response. The reason I have not been so punctual to respond is that I have been working on this per your instructions. I assume that using the Method Library include is considered best practice, even though I have succeeded in getting a .w embedded without it. that however took some modification of a "quick and dirty" program i created in the Appbuilder.

Using the include file would render these changes unnecessary, correct?

Please forgive me for the novice question, been using Progress going on 2 months.

Thanks,

Cole

Posted by Admin on 21-Sep-2010 09:31

I assume that using the Method Library include is considered best practice, even though I have succeeded in getting a .w embedded without it.

I use the method library because that's the place where the AppBuilder generated Window-Widget is already valid and not yet realized (except when you are using an icon - which you need to remove). After the place for the method library include, the AppBuilder generated code usually contains setting the window visible or hidden (don't remember). This will cause the window to become realized. And then it's too late to start embedding it.

Posted by Admin on 22-Nov-2010 15:46

We have just released WinKitLE as a sample for using embedded windows.

http://www.consultingwerk.de/winkitle/

Posted by Wouter Dupré on 22-Nov-2010 15:50

Hi,

Thank you for your email. I'm currently out of the office travelling for business. I will return on November 24. During my absence I will have no or very limited access to my email. For urgent matters, call me on my mobile and leave a message on my voice mail or call our office.

Best regards,

Wouter.

--

Wouter Dupré

Senior Solution Consultant

Progress Software NV

Stocletlaan 202 B| B-2570 Duffel | Belgium

Office +32 (0) 15 30 77 00 | Mobile +32 (0) 478 50 00 49 wdupre@progress.com

This thread is closed