O meu erro inexplicável
Enviado: 14 Fev 2023 16:24
Código: Selecionar todos
FUNCTION SetColorFocus()
RETURN "W/N,N/W,W/N"
Código: Selecionar todos
FUNCTION SetColorFocus()
RETURN "W/N,N/W,W/N"
Código: Selecionar todos
FOR EACH oColuna IN oBrowse1:aColumns
oColuna:bColorBlock := {|| IIF(oBrowse1:aArray[oBrowse1:nCurrent,14] = 1 , BrowseBarColorSecondary, BrowseBarColorPrimary) }
NEXTCódigo: Selecionar todos
************************************************************************************************************************************************************************************************************************
METHOD MANUTENCAO_CARREGA( cAlvo_Consulta ) CLASS PRODUTOSCLASS
************************************************************************************************************************************************************************************************************************
LOCAL aResult :={};
, oQuery;
, cQuery
IF strzero(M->NIV_ACESSO,1,0)$"01"
cQuery := "SELECT ";
+ "produtos.PRODUTOS_ID, ";
+ "produtos.DESPRO, ";
+ "produtos.TIPUNI, ";
+ "produtos.PREVEN, ";
+ "produtos.ESTATU, ";
+ "if((produtos.ESTATU + produtos.ESTL02) > 0.0000, 0, 1) AS ESTOQUE_TOTAL ";
+ "FROM produtos ";
+ cAlvo_Consulta
oQuery := CONECCOESCLASS():ExecuteSQL(::oServer, cQuery)
else
cQuery := "SELECT ";
+ "produtos.PRODUTOS_ID, ";
+ "produtos.DESPRO, ";
+ "produtos.TIPUNI, ";
+ "produtos.ESTATU, ";
+ "produtos.ESTL02, ";
+ "produtos.CODREF, ";
+ "produtos.PRECUS, ";
+ "produtos.PREVEN, ";
+ "produtos.EAN13, ";
+ "produtos.NCM, ";
+ "produtos.CEST, ";
+ "IF(produtos.PROSER ='1','PRODUTO','SERVICO') AS PROSER, ";
+ "produtos.QUEM_BLOQ, ";
+ "if((produtos.ESTATU + produtos.ESTL02) > 0.0000, 0, 1) AS ESTOQUE_TOTAL ";
+ "FROM produtos ";
+ cAlvo_Consulta
oQuery := CONECCOESCLASS():ExecuteSQL(::oServer, cQuery)
endif
if ! oQuery:Eof()
aResult := InverseArray( oQuery:GetRows() )
endif
oQuery:Close()
RETURN aResultEstá usando Harbour ou xHarbour na MINIGUI ?hb_gcall
Código: Selecionar todos
2022-10-17 19:57 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbvm.h
* include/harbour.hbx
* src/harbour.def
* src/vm/hvm.c
+ added new C function:
extern HB_EXPORT HB_BOOL hb_vmSetKeyPool( HB_BOOL fEnable );
It allows to disable keyboard pooling by GT driver in main HVM loop.
It's important in programs which mix GT terminal with GUI library
which use common event loop. Many GUI objects are not reentrant
safe and activating event loop during big changes may cause crash.
Such things can happen in applications which try to mix HBQT
and GTQTC. To avoid such problems before PRG code is called it's
enough to disable keyboard pooling in main HVM loop, eg.
if( hb_vmRequestReenter() )
{
HB_BOOL fKeyPool = hb_vmSetKeyPool( HB_FALSE );
hb_vmPushEvalSym();
hb_vmPush( pBlockItm );
hb_vmSend( 0 );
hb_vmSetKeyPool( fKeyPool );
hb_vmRequestRestore();
}
+ added new PRG function:
__vmKeyPool( [<fEnable>] ) -> <fPrevState>
It's PRG interface to above C function. If application uses GT driver
and GUI library using the same event loop and such GUI library does not
disable keyboard pooling in main HVM loop before PRG code is activated
then it's enough to call this function at the beginning of application,
eg.
PROCEDURE INIT Clip()
__vmKeyPool( .f. )
RETURN
With above peace of code you can mix HBQT or other QT wrapper with GTQTC.Código: Selecionar todos
2023-01-30 15:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/arc4.c
! include hbarc4.h instead of arc4.h which does not contain
required for dynamic libraries export attributes in function
declaration
* src/vm/classes.c
! cleaned module symbol range checking
* src/vm/arrays.c
% optimized AClone() and hb_HClone()
* src/vm/hvmall.c
% changed the order of included files to keep alive function macros
undefined in garbage.c and fm.c
* src/vm/hvm.c
! fixed hb_vmGetRealFuncSym() to work with PRG functions written in C
and registered in HVM without their own symbol table
* src/vm/dynsym.c
; comment updatedNÃOItamar M. Lins Jr. escreveu:libload = Usar DLLs do windows para acesso a base de dados.
Sobre o problema do 3.2.2023-02-03 02:46 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/vm/arrays.c
! fixed buffer allocation in AClone()/hb_HClone() with possible cyclic
references.
I created the problem on 2023-01-30 15:18 UTC+0100 and it was reported
as internal error 9024: hb_xrealloc requested to resize to zero bytes
Código: Selecionar todos
METHOD Init() INLINE ::hDLL := hb_libLoad( "RMChart.dll" )
METHOD Destroy() INLINE hb_libFree( ::hDLL )
Pois é. Este sempre foi o meu medo de upgrade. Porque se o sistema está funcionando e ao fazer upgrade do compilador passou a acontecer erros os erros não são no sistema mas no compilador então transplantar pedaços do morto no novo vivo resolvem.A função em questão no 3.4 retorna números, e no 3.2 retorna sei lá o que.
A função da hwgui vai retornar números nos dois.
Bem, pode ser um bug do compilador.Este sempre foi o meu medo de upgrade.
Com isso encontrar o ponto em comum se torna mais fácil.(ADO/classes ?)com isso são 3 confirmados.