New topic: 

Threads and Progress Bars - Ready to do it Right

<http://forums.realsoftware.com/viewtopic.php?t=47164>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        RonBower          Post subject: Threads and Progress Bars - 
Ready to do it RightPosted: Tue Mar 05, 2013 2:20 pm                         
Joined: Wed Feb 01, 2012 3:06 pm
Posts: 53                Okay, I think I'm ready to do a thread and a progress 
bar the correct way.

I have a fairly long and complex processing loop that can take a very long time 
when opening a large file. I have isolated the very core central processing of 
the loop and placed it in a stand-alone method in preparation to put that 
method into a thread. A couple quick questions before I make the final plunge...

First question: The main looping process (the thread) will be filling a 
database with information from the file being read . The next step after 
reading the file and loading the database (when the thread ends) is to fill a 
list box from the data in the database. Since I can't fill the list box until 
the thread ends, how do I get my process to suspend until the thread completes 
filling the database?  That is, how do I essentially twiddle my thumbs until 
the thread ends?

Second question: Since the thread is reading a file and loading a database, 
there are some necessary error-checking processes that that could (in an 
extreme case) display a MsgBox with an error message informing the user of some 
unexpected error situation. Can I display a MsgBox in the middle of executing a 
thread?

Thanks to all - this is a really great support group.

Ron Bower
Ellicott City, MD   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to