Page 1 of 1

too busy to response

Posted: Sun Dec 22, 2019 7:50 pm
by Jimmy
hi,

i try to use a GET MULTILINE to show "Output" under GUI

Code: Select all

PROCEDURE SetStatusText( cData )
LOCAL ControlHandle
   cStatusBox += cData
   #IFDEF Use_Gui
      #IFDEF __HMG__
         ControlHandle := GetControlHandle( "StatusBox", "Main" )
      #ELSE
         ControlHandle := oStatusBox:hwnd
      #ENDIF
   #ENDIF

   IF !EMPTY( ControlHandle )
      #IFDEF Use_Gui
         #IFDEF __HMG__
            SendMessage(ControlHandle  ,;
                  WM_SETTEXT     ,;
                  LEN(cStatusBox),;
                  cStatusBox      )

*           SetProperty("Main","StatusBox","CaretPos", -1 )
*           Main.StatusBox.CaretPos := - 1
         #ELSE
            oStatusBox:cText := cStatusBox
            oStatusBox:GoBottom()
         #ENDIF
         InvalidateRect( ControlHandle, NIL, .F. )
      #ENDIF
   ENDIF
   cStatusBox += CRLF
RETURN
 
i do assign "growing" String direct to o:cText and show it with Scroll Effect.

under HMG i have to use API else Memory goes up until crash while FiveWin is Stable :D
but in both Version "Output" will get slower with every line ... :( ... hm

now i have a BIG Problem with HMG and Fivewin when "Focus is lost". (click on other App)
HMG and FiveWin App does run but no "Output" ("no response" Timeout Problem) any more until End :shock:

App does read file, analyze it, new align it, write new file
both work with "Output" to GET Object ... and no "sleep"

without "OutPut" (VERBOSE=NO) it just take < 5 Sec
HMG and FiveWin need Minutes with (not optimized) GUI "Output" which is "normal"

neverless i like to ask is there a Way to "Speed" up "OutPut" :idea:
what can i do against "no response" Timeout Problem :?:

---

it is a old Cl*pper code and does not use RAM> 640 KB as we have now.
it also use Function Code which are not Thread safe.
but i don't want to revise hole Cl*pper Code ... only make it faster in GUI

Re: too busy to response

Posted: Tue Dec 24, 2019 6:43 am
by Jimmy
got the Solution

Code: Select all

   hb_IdleSleep( 0.01 )
   SysRefresh()     // Let Windows process
as i say there was no time for Windows.
hb_IdleSleep( 0.01 ) does not help but SysRefresh() ... which also need time

but now i can play Solitar in Foreground while FW App work in Backgound and does "Output" hole time :D

have a nice Xmas
Jimmy