showDialog from an ABL Window/procedure - Forum - OpenEdge Development - Progress Community

showDialog from an ABL Window/procedure

 Forum

showDialog from an ABL Window/procedure

  • No. I thought it was only to launch .NET Applications from ABL and in my case I run directly from Architect.

     

    As I tried to explain before: It enables the client for proper event handling on the ABL and .NET side of things. The first WAIT-FOR in the application must be

    WAIT-FOR System.Windows.Forms.Application:Run () . /* no .net main menu */

    or

    WAIT-FOR System.Windows.Forms.Application:Run (oForm) . /* .net main menu in oForm reference */

    See http://blog.consultingwerk.de/consultingwerkblog/2010/09/openedge-gui-for-net-adoption-and-migration-strategies-part-2-parallel-use/

  • Deep breath...

    I've read Mike's article but concretely I still don't know, with my example, how to fix this crash.

  • I've read Mike's article but concretely I still don't know, with my example, how to fix this crash.

    Get rid of the WAIT-FOR CLOSE OF THIS-PROCEDURE or WAIT-FOR CLOSE OF {&WINDOW-NAME} in your main ABL window.

  • Get rid of the WAIT-FOR CLOSE OF THIS-PROCEDURE or WAIT-FOR CLOSE OF {&WINDOW-NAME} in your main ABL window.

    It's done.

    I give you a tiny archive with my sources files.

    You will see inside:

    Menu.w : my main ABL Window.

    gridViewTest.cls : sample Grid View Form.

    c-win.w : classic ABL Window.

    I''m using Sports database.

    My real problem is this one in attached files ( processus.jpg).

    I've understood that on step 3, the bindingsource handle is no more valid! Progress bug?

    MainOE.rar.zip

    Hope to find any solutions...

  • supportg2 wrote:

    Get rid of the WAIT-FOR CLOSE OF THIS-PROCEDURE or WAIT-FOR CLOSE OF {&WINDOW-NAME} in your main ABL window.

    It's done.

    Hope to find any solutions...

    There's a WAIT-FOR in c-win.w, and that WAIT-FOR is being executed because you're running c-win.w NON-persistently (in the trigger it just says "RUN c-win."

    Change that to RUN c-win PERSISTENT and things will work as you'd expect.

    You should always run GUIs persistently (unless they're dialogs).

    -- peter

  • Yes it works, it's great!

    I confess that I never use PERSISTENT in my application and what will be the consequence on it? No stack oversize? Consequence on transactions?

    I have to make sure that it's for my customers safe.

    Thank you very much guys.

  • Well PERSISTENT is what you should always use for Windows.

    NON-PERSISTENT should be used for dialogs only.

    If you start windows non-persistently like you did until today you can get strange side effects, one of which you have noticed here.

    Starting a window non-persistently makes it more or less modal like a dialog while windows must be non-modal.

    One world, one wait-for to handle all your events (except for modal dialogs).

    Therefore your application will become more stable and safer for your customers if you start your windows persistently.

    -peter