I am confused by the things that will and will not happen while a  
method is executing.

I am writing a method that is a 'batch' processor. Typical batch  
execution will take minutes. I want the user locked out of  
interacting with the program (other than, perhaps, terminating batch  
execution) but I want to keep the user updated about batch execution  
progress, ie, the number of files that have been processed and  
estimated time to completion.

At first, I assumed that I would have to put the batch execution into  
a thread. But I find that some things do happen and other things do  
not happen during the execution of the batch method.

Things that do update:
1. a canvas. The batch is built on multiple execution of a method  
that draws to a canvas. The canvas updates during batch execution.
2. statictext in a separate window. If I write to text fields in a  
floating window, they update.
4. statictext in the main window.
3. beep

Things that don't update:
1. window refresh (partial). controls, such as statictext, will  
update, but window will not resize or, apparently, redraw.
2. timers. They appear do not fire.
3. output from the command "speak". These stack up and are executed  
at the end.

very strange behavior (not really the question I'm asking):
beeps and timers. Beeps can happen during each pass through the batch  
operation. When I put a timer with 3 beeps at the end, the beep timer  
would not fire until I clicked on the window or brought another  
application to the front. In fact, the beep timer initialization  
froze display updates until the window was clicked on.

I don't see any pattern here. I have only tested a handful of  
operations in mac OS X, and it seems possible that I'd see different  
behavior on builds for different platforms.

I would rather not put the batch into a thread; if I do this i will  
have to manually inactivate menus other user interactions. I like the  
fact that user interaction is highly restricted during batch  
processing. Plus, putting batch execution into a thread might be  
slightly slower.

As usual, any suggestions or comments are appreciated.

John Kubie
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to