How to break a loop (progress bar) with mouse
Author: dammie@seznam.cz (dammie)
Hello,
I think it was here once but I cannot find it....
How can I break the loop (while-endwhile) with mouse clic on button (eventually with key press if mouse-clic is impossible to catch)...
Thanks for info
David
5 Comments
Local Administrator
Hi David,
if noone has some new info (may be it has fundamentally changed in latest uniface kernel),
my old one reads the uniface does not process windows messages while processing proc code.
The old "trick" was to "interrupt" the loop,
return to the structure editor
and call up the continuation of the loop.
Mostly a macro statement like "userkey" was used to return to the processing.
Or using a virtual "bumper" field with macro "^next_field^previous_field"
This gave other events a chance to find their place in the input queue of the structure edittor.
SUccess, Uli
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
I understand the princip but I dont know "how to".
Possible example please...
Thanks
David
Author: dammie (dammie@seznam.cz)
Local Administrator
Hi David,
in the USERKEY trigger, combine $char=65 ("A") with call process_loopstep()
it's just pseudocode but this is the HOW:
entry setup_loop
$something_to_do$ = list_of_jobs ; like setocc "myent",1
macro "^USER_KEYA"
end ; setup_loop
entry process_loopstep ; processs a single step in the loop
if ($something_to_do$) ; something else to do
call process_next_step
call reduce_something_to_do()
macro "^USER_KEYA"
else
endif
end ; process_loopstep
Success, Uli
P.S: if you need a solution for your purposes, send an email to ulrichmerkel@web.de
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
If you can accept pressing a key instead of using the mouse,
there is a beautiful solution from awen limbourg already.
The code (among others) is included in the dITo 3GL Toolbox.
Maybe it's worth to have a look into it as well.
Success, Uli
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
The discussion and some ideas on this theme can be found in the forum:
Forum > Uniface Development > Uniface 9 > Interrupting Process
http://uniface.communityzero.com/uniface?go=2209990
Updated version of my solution described in the article:
In Versions 8 and 9 it does work with async + postmessage, but it is not very stable. Some of the problems are in the keyboard buffer
when using mouse and keyboard simultanously.
I think there is also a wish concerning this item.
Wolfgang
Author: gypsilon (wva@gypsilon.de)