On 4/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On Apr 26, 2007, at 18:59 UTC, Peter K. Stys wrote:
>
> > So I took your advice Joe, and transferred my batch code from a
> > button to a thread. I must admit the GUI is more Mac-like. Want to
> > hear what's ironic tho: when the thread is first run by the button,
> > my app "hangs" for seconds (sometimes 20 or more) at a time with the
> > beach ball of death until "things get going" and the main thread
> > regains control of the app. Previously, there was no beach ball.
> > Curious no?
>
> Very curious yes. Are you sure your button code is returning as soon
> as it runs the thread?
>
I imagine yes, 'cause this is the whole button:
if self.convertThread.State = self.convertThread.Running then
app.showErrDialog "A batch is already running: you must abort it
or wait until it finishes before starting another conversion."
else
if self.niceCheckBox.Value then
self.convertThread.Priority = self.convertThread.LowestPriority
else
self.convertThread.Priority = self.convertThread.NormalPriority
end if
self.convertThread.Run
end if
return
so unless the self.convertThread.Priority = ... stmnts take 20 sec I
don't see what else would "beach-ball" my app (with a "ImageTrak not
responding" warning in the Force Quit window list to boot, really
fooling the user into thinking the app crashed and tempting him to
force-quit: not pretty).
Is this the beauty of a thread?
P.
--
-------------------------------------------------------------------------------
Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience
Ottawa Hospital / University of Ottawa
Ontario, CANADA
tel: (613)761-5444
fax: (613)761-5330
http://www.ohri.ca/profiles/stys.asp
-------------------------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>