Hi Art,

Hmm, I wrote this some time ago and never pressed Send.  ;-(

Have you taken a look at the ProgressDialog class?  It should be usable for your scenario, I think.

In the example programs, there is examples\addManyRows.rex that shows some usage of the ProgressDialog.  Look at the createRows() method in the example.

I'll try to put together a short example of using the ProgressDialog in the scenario you explained.

Mark Miesfeld

On Wed, Aug 14, 2013 at 2:52 PM, Art Heimsoth <artstore@artheimsoth.com> wrote:
>> On Tue, Aug 13, 2013 at 2:08 PM, Art Heimsoth
>>> For your specific problem here, I would write my own timed
>>> message dialog.  When using it, send a reference to the executing
>>> dialog to your timed message dialog.  In your timed message,
>>> periodically check back to see if the other dialog is still
>>> alive.  Quit the timed message if you discover the other dialog is ended.
>>> I tried to start a second dialog and then use WinTimer in that
>>> dialog, with the intention of setting a shared variable from the main dialog
>>> when I wanted the second dialog to end.  The second dialog would put up a panel
>>> that includes a "Cancel" button to allow manual cancellation if necessary.  
>> You need to use popup() to start the second dialog.  The popup()
>> method returns immediately and your first dialog can continue
>> working.
I'm still having trouble with this, but I am not sure my approach will work
anyway.  I am trying to get an operation like .timedmessage but where I
can cancel it from the popup panel; ie, add a cancel button to that dialog
that would do the same thing as sending ok to the .timedmessage dialog.
In using a dialog that I build and kick off with popupAsChild() or with popup()
the child panel is not displayed until after the child InitDialog returns.  I was
intending to put the timed logic in the InitDialog, but seems like I need some
other method for it - how do I kick that off?  
To test this, I put a do loop with say statements in the child and parent
dialogs, and found that if I canceled the parent dialog, the do loops
continued until they timed out - they were not canceled.  I assume that
in normal for dialogs?
Another problem with this approach, is the underlying dialog is allowed to run,
but the user dialog buttons, menu, etc are also active allowing user input which
is what I need to block; ie, a modal setup.
I am looking for something that will notify the user the application is busy, but
allow them to cancel it manually if necessary without using task manager.  While
this notification is showing, all interfacing controls should be disabled, but the
underlying dialog logic; ie, SQL lookups should be allowed to continue.
If I could figure out how to get the timed message to run in the child dialog,
I could disable all the buttons and menu items while the child dialog is active
and then enable them again when the lookup operation is complete and the
child is ended.  Are there other (simpler) ways to accomplish this?

 Art Heimsoth - artstore@artheimsoth.com

Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
Oorexx-users mailing list