non modal window behaviour

Moderator: Rathinagiri

Post Reply
danca
Posts: 13
Joined: Wed Mar 16, 2016 7:09 pm

non modal window behaviour

Post by danca » Wed Mar 16, 2016 9:06 pm

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

trmpluym
Posts: 246
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands
Has thanked: 6 times
Been thanked: 22 times

Post by trmpluym » Wed Mar 16, 2016 9:17 pm

Yep,

ON INIT <InitProcedureName> | <bBlock> ]

Will do the job !

Enjoy HMG ...

User avatar
esgici
Posts: 4513
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 389 times
Been thanked: 111 times
Contact:

Post by esgici » Thu Mar 17, 2016 1:46 am

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
Viva INTERNATIONAL HMG :D

User avatar
serge_girard
Posts: 2342
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 588 times
Been thanked: 124 times
Contact:

Post by serge_girard » Thu Mar 17, 2016 8:18 am

Welcome Dan !

Serge from Belgium

danca
Posts: 13
Joined: Wed Mar 16, 2016 7:09 pm

Post by danca » Thu Mar 17, 2016 8:25 am

Ok, thanks for the quick answer. I think I'll need some more help in the future...

Dan

Post Reply