realbasic-nug
[Top] [All Lists]

REALSQL and Thread

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: REALSQL and Thread
From: Christian Miller <realbasic at nc dot rr dot com>
Date: Fri, 30 Dec 2005 16:12:42 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
I've a complex query that I'm performing which is hanging the app's interface while the query is performed. I thought, "I'll put the query in a thread and spin the barber pole while I wait."

<snippet>
  pBar.Visible = true
  pBar.Refresh // show progress bar
  Query.SetQuery sSQL  // setup thread
  Query.SetWindow self  // setup thread
  Query.Run  // query

  while not m_bQueryDone // while the thread hasn't finished
    pBar.Refresh // spin barber pole
  wend

  sData = Query.Data
  Query = nil
  pBar.Visible = false
  pBar.Refresh
</snippet>

In place of "pBar.Refresh", I've tried "app.SleepCurrentThread 500" and "app.Doevents". Nothing seems to make the pole spin. In the IDE, the maximum is set to zero so as soon as I show the progress bar it should be spinning.

Any ideas?

Christian
Pariahware, Inc. Custom Software
<pariahware at pariahware dot com>
<http://www.pariahware.com>
--
God loved you so much that He gave His only son Jesus. What have you done with God's gift?



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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>