Page 1 of 1

non modal window behaviour

Posted: Wed Mar 16, 2016 9:06 pm
by danca
Hi all, I am new to the forum (and to HMG).
I am converting a program written for HWGUI. If I define a non modal window in HWGUI the execution of program goes on after the window activation, as it happens in HMG with WAIT WINDOW ... NOWAIT:
<window definition>
...
<window activation>
<other stuff>
With HMG <other stuff> is not executed until I close the window.
I have a function that processes a number of images. Actually a window is created, or not, (because the program can run in unattended mode too), containing some infos and a button "stop" and the processing continues. If the user clicks the button, a flag is set (ON CLICK {||lStopEx:=.t.}, and the function completes the current operation then exits the loop.

I am not able to figure out how to do the same with HMG. Should I use the ON INIT clause? I would have to change the program flow in that case. Before reworking it, if someone can clarify this point would be greatly appreciated!
Many thanks and good programming to all.

BTW I am using HMG (v. 3.3.1) since a couple of weeks and I find it very good.
Dan

Re: non modal window behaviour

Posted: Wed Mar 16, 2016 9:17 pm
by trmpluym
Yep,

ON INIT <InitProcedureName> | <bBlock> ]

Will do the job !

Enjoy HMG ...

Re: non modal window behaviour

Posted: Thu Mar 17, 2016 1:46 am
by esgici
danca wrote:Hi all, I am new to the forum (and to HMG).
Hi Dan

You are welcome to wonderful word of HMG :arrow:
I am not able to figure out how to do the same with HMG. Should I use the ON INIT clause? I would have to change the program flow in that case.
In HMG, "main" loop of a program is loop of "main window".

As our friend trmpluym said, ON INIT sentence will be useful in order to solve your problem.

This topic also may be helpful to you.

Happy HMG'ing :D

Re: non modal window behaviour

Posted: Thu Mar 17, 2016 8:18 am
by serge_girard
Welcome Dan !

Serge from Belgium

Re: non modal window behaviour

Posted: Thu Mar 17, 2016 8:25 am
by danca
Ok, thanks for the quick answer. I think I'll need some more help in the future...

Dan