FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Method Eval
Posts: 187
Joined: Mon Oct 20, 2008 06:33 PM
Method Eval
Posted: Wed Sep 05, 2018 05:10 PM
Is it possible to put SySRefresh () in Eval class while it runs the code block?

I ask why I have a problem when the code block is waiting too long to respond and the user clicks on the window. In this case, the application appears to be locked and the user drops the application.

Example:
Code (fw): Select all Collapse
        MsgRun("Attention: The System has not locked! This routine will take a long time because of the size of your database. Wait until completion.",,{ | oDlg | ;
                lOkZip := hb_ZipFile( cFolderTargetZip  ,; // ZipFile (nome do zip)
                                      acFiles           ,; // File to Compress, pode ser array
                                      HBL_ZIPLEVEL      ,; // Nivel de compressão
                                      bOnZipFile        ,; // Codeblock a executar enquanto comprime
                                      XBL_ZIPOVERWRITE  ,; // Overwrite
                                      "1234"            ,; // Password
                                      XBL_ZIPWITHPATH   ,; // Armazena caminho (PATH)
                                      NIL             ) }) // Codeblock para file progress



// FiveWin CodeBlock Class
Code (fw): Select all Collapse
#include "FiveWin.ch"

//----------------------------------------------------------------------------//

CLASS TBlock

   DATA   cExpression
   DATA   bBlock

   METHOD New( cExpression ) CONSTRUCTOR

   METHOD Eval( uPar1, uPar2, uPar3, uPar4, uPar5 ) INLINE ;
                If( ::bBlock != nil,;
                Eval( ::bBlock, uPar1, uPar2, uPar3, uPar4, uPar5 ),)

   METHOD Exec( uPar1, uPar2, uPar3, uPar4, uPar5 ) INLINE ;
                If( ::bBlock != nil,;
                Eval( ::bBlock, uPar1, uPar2, uPar3, uPar4, uPar5 ),)

ENDCLASS

//----------------------------------------------------------------------------//

METHOD New( cExpression ) CLASS TBlock

   if Type( cExpression ) $ "UEUI"
      MsgAlert( "Invalid expression at Block constructor" )
   else
      ::cExpression = cExpression
      ::bBlock      = &( cExpression )
   endif

return nil

//----------------------------------------------------------------------------//
Oscar Ribeiro

OASyS Informática

Fwh18.02 + xHarbour 1.2.3 + Bcc72
Posts: 187
Joined: Mon Oct 20, 2008 06:33 PM
Re: Method Eval
Posted: Mon Sep 10, 2018 10:22 AM

No one else is having problems with Eval in functions where the user needs to wait for the program to respond and the message appears that Windows is not responding?

Oscar Ribeiro

OASyS Informática

Fwh18.02 + xHarbour 1.2.3 + Bcc72
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Method Eval
Posted: Mon Sep 10, 2018 02:08 PM
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 187
Joined: Mon Oct 20, 2008 06:33 PM
Re: Method Eval
Posted: Mon Sep 10, 2018 03:36 PM

Obrigado pela ajuda João, mas o meu problema não é apenas com o Zip/Unzip. Mas toda vez que o usuário precisa esperar o sistema executar uma função que é demorada e eu não tenho como colocar Sysrefresh() nessa função, aparece no título da janela que o sistema não está respondendo e o usuário pensa que o sistema travou.

Thanks for the help John, but my problem is not just with Zip / Unzip. But every time the user needs to wait for the system to perform a function that is time consuming and I can not put Sysrefresh() on that function, it appears in the window title that the system is not responding and the user thinks the system has crashed.

Oscar Ribeiro

OASyS Informática

Fwh18.02 + xHarbour 1.2.3 + Bcc72
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Method Eval
Posted: Mon Sep 10, 2018 04:01 PM

Ponha um METER e um SAY piscante, para ele ver, que está fazendo a tarefa. Escreva, <Aguarde, pode demorar...>

Abs.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Method Eval
Posted: Mon Sep 10, 2018 04:10 PM
Imagem do xBlite:



Inspire-se,

Regards.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion