In this thread, Alain wrote: > > 3. Another problem when working with massive text files is that the > > progress bar appears to stall at "Sorting word list...". > >Change the SortArray function to read like so: > >Local Fn SortArray >'~'9 >Dim @ b As Boolean > >b = _True >Def SetButtonData (_progrBtn, _kControlEntireControl, >_kControlProgressBarIndeterminateTag,Sizeof(Boolean), b) > >Edit$(1) = "Sorting word list (this may take a few minutes on very >large files)..." >Select gPrefs.smartSort >Case _false : Fn QuickSort >Case Else : Fn SmartSort >End Select > >b = _false >Def SetButtonData (_progrBtn, _kControlEntireControl, >_kControlProgressBarIndeterminateTag,Sizeof(Boolean), b) > >Appearance Button _progrBtn,,80 > >End Fn > > > >In the two routines (QuickSort and SmartSort) add an IdleControls call >almost at the end: > ><snip> ... > End If > IdleControls( Window( _wndRef ) ) > End If > Until 0 > >End Fn Alain, All your suggestions are fine with a small exception: The indeterminate progress bar works fine in PPC but not in Carbon. I've tried flushwindowbufferand extra handleevents with no success. A handleevent here: > End If > IdleControls( Window( _wndRef ) ) > Handleevent <---- added > > End If > Until 0 > >End Fn gets the indeterminate bar moving, but slows the sorting down so much it's useless on large texts since handlevents is called every iteration of the sort (effectively transforming QuickSort to SnailSort). Any ideas? Ken