open a Windows from a Dialog

Posted by grunnpi on 06-Apr-2011 14:09

Hello Everybody,


We are using both Dialog and Windows to design screen, and want to open
a Windows from a Dialog button call.

As Dialog cannot open Windows (WAIT-FOR issue), was wondering is it
would be possible to change Windows behaviour by code.
Meaning, using a parameter + inside code to handle : "Windows mode" /
"Dialog mode".

Please note for various excuses, we cannot afford to fully redesign one
screen from Windows to Dialog nor Dialog to Windows.


My guess was :
- inside 4GL code ? (but maybe AppBuilder won't appreciate)
- using .dll code ?

Config :
- OE 10.1b sp2
- Windows 2K / 2003 server


Hope someone can have a clue.

Cheers,

Grunnpi

All Replies

Posted by rbf on 06-Apr-2011 14:45

Well the standard construct is to put the following line in your main block:

IF NOT THIS-PROCEDURE:PERSISTENT THEN

   WAIT-FOR CLOSE OF THIS-PROCEDURE.
this allows you to call the window both persistent (as a non-modal window) and non-persistent (as a modal window).
However, your users won't be able to see the difference so they might become confused if you call a window
non-persistently. It may even become hidden behind other windows/dialogs and if they don't realize that they are stuck.
But technically this is a solution to your problem.
-peter

Posted by grunnpi on 06-Apr-2011 14:50

Seems 'too' simple

Very thank you !

I'll try it asap.

Cheers

Posted by Admin on 06-Apr-2011 14:50

Please note for various excuses, we cannot afford to fully redesign one

screen from Windows to Dialog nor Dialog to Windows.

I can fully understand those excuses.

Is upgrading to 10.2B an option?

With .NET there is no differece in design between a Window and a Dialog. ABL allows you to embed ABL windows into .NET windows which I've used a couple of times successful to "turn a ABL window into a dialog". I can point you in the that direction, when 10.2B is an option.

Posted by grunnpi on 07-Apr-2011 13:45

10.2b ? Not yet... unfortunatly.

But I've tried running as persistent today.

Didn't trigger error message anymore, but as disabling WAIT-FOR, windows open and close immediatly. Not so usefull.

After some test & try, we figure out that coding like this :

HIDE FRAME myDialogFrame.

RUN myWindow.w.

DISPLAY FRAME myDialogFrame.

It's do the job.

So easy.

Thanks for supporting, see you next time !

This thread is closed