browse ADO
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
browse ADO
Tava fácil demais....
A primeira tela a ser convertida é..... um browse ADO
A primeira tela a ser convertida é..... um browse ADO
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Mais um detalhe:
Necessário alterar o gtwvg.hbc
Removendo isso, sem problemas, exceto que se torna obrigatório colocar #include aonde precisa, que acho o correto.
Necessário alterar o gtwvg.hbc
Sei lá porque, mas na gtwvg está pra incluir automático os CH relacionados.#headers=hbgtwvg.ch wvgparts.ch wvtwin.ch
Removendo isso, sem problemas, exceto que se torna obrigatório colocar #include aonde precisa, que acho o correto.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Por hoje cansei.
Erro no Eval() não sei de onde, não sei porque.
Erro no Eval() não sei de onde, não sei porque.
Código: Selecionar todos
#include "hwgui.ch"
STATIC FUNCTION BrowseHWGUI( cnSQL )
LOCAL oModDlg, oBrw1
INIT DIALOG oModDlg TITLE "Licenças" AT 0,0 SIZE 1024,768
@ 1,1 BROWSE oBrw1 SIZE 1022,700 ;
STYLE WS_BORDER + WS_VSCROLL + WS_HSCROLL
@ 500,720 OWNERBUTTON ON CLICK {|| hwg_EndDialog()} ;
SIZE 180,36 FLAT ;
TEXT "Close" COLOR hwg_ColorC2N("0000FF")
oBrw1:aarray := cnSQL
oBrw1:AddColumn( HColumn():New( "Validade",{|v,cnSQL|(v),cnSQL:Date( "VENCTO" )},"D",8,0,.F.,DT_CENTER ) )
oBrw1:AddColumn( HColumn():New( "Id.Pat",{|v,cnSQL|(v),Str( cnSQL:Number( "PATDETPATRIMONIO" ), 6 )},"C",6,0,.T.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Patrimônio",{|v,cnSQL|(v),cnSQL:String( "PATRINOME", 20 )},"C",20,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Id.Lic",{|v,cnSQL|(v),Str( cnSQL:Number( "PATDETLICENCA" ), 6 )},"C",6,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Licença",{|v,cnSQL|(v),cnSQL:String( "LICENCANOME", 50 )},"C",50,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Obs",{|v,cnSQL|(v),Pad( AllTrim( cnSQL:String( "OBSVENCTO" ) + " " + cnSQL:String( "GERAOBS" ) ), 30 )},"C",30,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:aColumns[2]:lResizable := .F.
oBrw1:bSkip := { |o,nSkip| ADOSkipper( o:aArray, nSkip ) }
oBrw1:bGotop := { |o| o:aArray:MoveFirst() }
oBrw1:bGobot := { |o| o:aArray:MoveLast() }
oBrw1:bEof := { |o| o:aArray:Eof() }
oBrw1:bBof := { |o| o:aArray:Bof() }
oBrw1:bRcou := { |o| o:aArray:RecordCount() }
oBrw1:bRecnoLog := { |o| o:aArray:AbsolutePosition }
oBrw1:bGOTO := { |o,n| (o),o:aArray:Move( n ) }
ACTIVATE DIALOG oModDlg
Return Nil
FUNCTION ADOSkipper( cnSQL, nSkip )
LOCAL nRec := cnSQL:AbsolutePosition()
IF ! cnSQL:Eof()
cnSQL:Move( nSkip )
IF cnSQL:Eof()
cnSQL:MoveLast()
ENDIF
IF cnSQL:Bof()
cnSQL:MoveFirst()
ENDIF
ENDIF
RETURN cnSQL:AbsolutePosition() - nRec
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Código: Selecionar todos
Error BASE/1004 No exported method: EVAL
Called from (b)EVAL(0)
Called from HBROWSE:PAINT(752)
Called from HBROWSE:ONEVENT(304)
Called from HWG_DLGBOXINDIRECT(0)
Called from HDIALOG:ACTIVATE(156)
Called from BROWSEHWGUI(300)
Called from (b)JPPATRIMONIOCLASS_SHOWVENCIDAS(253)
Código: Selecionar todos
tmp := Eval( ::bRecno, Self )
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Achei...
Deixei passar essa bost.... porque tá junto no bRecNoLog
Era simples: era fazer ao contrário, o que precisa primeiro, é só pra confundir mesmo.
Deixei passar essa bost.... porque tá junto no bRecNoLog
Era simples: era fazer ao contrário, o que precisa primeiro, é só pra confundir mesmo.
Código: Selecionar todos
IF ::type == BRW_DATABASE
::alias := Alias()
::bSkip := { |o, n| ( ::alias ) -> ( dbSkip( n ) ) }
::bGoTop := { || ( ::alias ) -> ( DBGOTOP() ) }
::bGoBot := { || ( ::alias ) -> ( dbGoBottom() ) }
::bEof := { || ( ::alias ) -> ( Eof() ) }
::bBof := { || ( ::alias ) -> ( Bof() ) }
::bRcou := { || ( ::alias ) -> ( RecCount() ) }
::bRecnoLog := ::bRecno := { ||( ::alias ) -> ( RecNo() ) }
::bGoTo := { |o, n|( ::alias ) -> ( dbGoto( n ) ) }
ELSEIF ::type == BRW_ARRAY
::bSkip := { | o, n | ARSKIP( o, n ) }
::bGoTop := { | o | o:nCurrent := 1 }
::bGoBot := { | o | o:nCurrent := o:nRecords }
::bEof := { | o | o:nCurrent > o:nRecords }
::bBof := { | o | o:nCurrent == 0 }
::bRcou := { | o | Len( o:aArray ) }
::bRecnoLog := ::bRecno := { | o | o:nCurrent }
::bGoTo := { | o, n | o:nCurrent := n }
::bScrollPos := { |o, n, lEof, nPos|hwg_VScrollPos( o, n, lEof, nPos ) }
ENDIF
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Então... tá aí uma alteração simples, que não muda nada, mas é importante pra não causar confusão.
Ao invés de
::bRecnoLog := ::bRecno := ...
::bRecNo := ::bRecnoLog := ...
Ao invés de
::bRecnoLog := ::bRecno := ...
::bRecNo := ::bRecnoLog := ...
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Não deu erro, mas não mostrou nada.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
O equivalente em tbrowse:
Código: Selecionar todos
oTBrowse := { ;
{ "DTVALIDADE", { || :Date( "VENCTO" ) } }, ;
{ "ID.PAT", { || Str( :Number( "PATDETPATRIMONIO" ), 6 ) } }, ;
{ "PATRIMONIO", { || :String( "PATRINOME", 20 ) } }, ;
{ "ID.LIC", { || Str( :Number( "PATDETLICENCA" ), 6 ) } }, ;
{ "LICENCA", { || :String( "LICENCANOME", 50 ) } }, ;
{ "OBS", { || Pad( AllTrim( :String( "OBSVENCTO" ) + " " + :String( "GERALOBS" ) ), 30 ) } } }
BrowseADO( cnSQL, oTBrowse, "PATRINOME,LICENCANOME" )
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
me baseei no browse array
é usada a variável aArray pra guardar o array
e no hbrowse.prg, nos parâmetros recebidos
Pensei no parâmetro, já que DBF não tem.
Mas não faz diferença DBF ou Array. Em DBF apenas não é usado, mas é passado.
Código: Selecionar todos
Local aSample1 := { {"Alex",17,2500}, {"Victor",42,2200}, {"John",31,1800}, ;
{"Sebastian",35,2000}, {"Mike",54,2600}, {"Sardanapal",22,2350}, {"Sergey",30,2800}, {"Petr",42,2450} }
Local aSample2 := { {.t.,"Line 1",10}, {.t.,"Line 2",22}, {.f.,"Line 3",40} }
INIT DIALOG oModDlg TITLE "About" AT 190,10 SIZE 600,320
@ 20,16 BROWSE oBrw1 SIZE 280,220 ;
STYLE WS_BORDER + WS_VSCROLL + WS_HSCROLL
@ 310,16 BROWSE oBrw2 ARRAY SIZE 280,220 ;
STYLE WS_BORDER + WS_VSCROLL + WS_HSCROLL
oBrw1:aArray := aSample1
e no hbrowse.prg, nos parâmetros recebidos
Código: Selecionar todos
ELSEIF ::type == BRW_ARRAY
::bSkip := { | o, n | ARSKIP( o, n ) }
::bGoTop := { | o | o:nCurrent := 1 }
::bGoBot := { | o | o:nCurrent := o:nRecords }
::bEof := { | o | o:nCurrent > o:nRecords }
::bBof := { | o | o:nCurrent == 0 }
::bRcou := { | o | Len( o:aArray ) }
::bRecnoLog := ::bRecno := { | o | o:nCurrent }
::bGoTo := { | o, n | o:nCurrent := n }
::bScrollPos := { |o, n, lEof, nPos|hwg_VScrollPos( o, n, lEof, nPos ) }
ENDIF
Pensei no parâmetro, já que DBF não tem.
Mas não faz diferença DBF ou Array. Em DBF apenas não é usado, mas é passado.
Código: Selecionar todos
Eval( ::bGoTop, Self )
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Iniciando com hwgui
Ola!
Tenta isolar o problema. Antes de abrir no browse vê se mostra.
Saudações,
Itamar M. Lins Jr.
Tenta isolar o problema. Antes de abrir no browse vê se mostra.
Código: Selecionar todos
hwg_msginfo( {|v,cnSQL|(v),Str( cnSQL:Number( "PATDETLICENCA" ), 6 )} )Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Talvez melhor comparar com DBF:
troquei aquilo do DBF pelo equivalente em ADO.
Como dá pra ver no array, sempre é passado o objeto browse.
Len( o:aArray) é aquele aarray que foi atribuído ao browse.
Também já corrigi a indicação nas colunas, sem efeito.
Código: Selecionar todos
IF ::type == BRW_DATABASE
::alias := Alias()
::bSkip := { |o, n| ( ::alias ) -> ( dbSkip( n ) ) }
::bGoTop := { || ( ::alias ) -> ( DBGOTOP() ) }
::bGoBot := { || ( ::alias ) -> ( dbGoBottom() ) }
::bEof := { || ( ::alias ) -> ( Eof() ) }
::bBof := { || ( ::alias ) -> ( Bof() ) }
::bRcou := { || ( ::alias ) -> ( RecCount() ) }
::bRecnoLog := ::bRecno := { ||( ::alias ) -> ( RecNo() ) }
::bGoTo := { |o, n|( ::alias ) -> ( dbGoto( n ) ) }
ELSEIF ::type == BRW_ARRAY
::bSkip := { | o, n | ARSKIP( o, n ) }
::bGoTop := { | o | o:nCurrent := 1 }
::bGoBot := { | o | o:nCurrent := o:nRecords }
::bEof := { | o | o:nCurrent > o:nRecords }
::bBof := { | o | o:nCurrent == 0 }
::bRcou := { | o | Len( o:aArray ) }
::bRecnoLog := ::bRecno := { | o | o:nCurrent }
::bGoTo := { | o, n | o:nCurrent := n }
::bScrollPos := { |o, n, lEof, nPos|hwg_VScrollPos( o, n, lEof, nPos ) }
ENDIF
Como dá pra ver no array, sempre é passado o objeto browse.
Len( o:aArray) é aquele aarray que foi atribuído ao browse.
Código: Selecionar todos
oBrw1:aArray := aSample1
Código: Selecionar todos
oBrw1:AddColumn( HColumn():New( "Validade",{|v,o|(v),o:aArray:Date( "VENCTO" )},"D",8,0,.F.,DT_CENTER ) )
oBrw1:AddColumn( HColumn():New( "Id.Pat",{|v,o|(v),Str( o:aArray:Number( "PATDETPATRIMONIO" ), 6 )},"C",6,0,.T.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Patrimônio",{|v,o|(v),o:aArray:String( "PATRINOME", 20 )},"C",20,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Id.Lic",{|v,o|(v),Str( o:aArray:Number( "PATDETLICENCA" ), 6 )},"C",6,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Licença",{|v,o|(v),o:aArray:String( "LICENCANOME", 50 )},"C",50,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Obs",{|v,o|(v),Pad( AllTrim( o:aArray:String( "OBSVENCTO" ) + " " + o:aArray:String( "GERAOBS" ) ), 30 )},"C",30,0,.F.,DT_CENTER,DT_RIGHT ) )
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Comentário adicional, sobre o (v)
(v) não faz nada, é só pra compilar com -w3 -es2
E quando o codeblock tem várias expressões separadas por vírgula, o retorno é sempre o último, então o (v) a mais não faz diferença.
Código: Selecionar todos
{|v,o|(v),o:aArrray.... }
E quando o codeblock tem várias expressões separadas por vírgula, o retorno é sempre o último, então o (v) a mais não faz diferença.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
Deixar o fonte aqui.
Já ia direto pra cliente, mas como não funcionou, preciso do fonte funcionando, vou precisar apagar.
É a primeira tela que aparece pro gerente, ao entrar no aplicativo....
E não foi desta vez que vai ser em GUI.
Já ia direto pra cliente, mas como não funcionou, preciso do fonte funcionando, vou precisar apagar.
É a primeira tela que aparece pro gerente, ao entrar no aplicativo....
E não foi desta vez que vai ser em GUI.
Código: Selecionar todos
#include "hwgui.ch"
STATIC FUNCTION BrowseHWGUI( cnSQL )
LOCAL oModDlg, oBrw1
INIT DIALOG oModDlg TITLE "Licenças" AT 0,0 SIZE 1024,768
@ 1,1 BROWSE oBrw1 SIZE 1022,700 ;
STYLE WS_BORDER + WS_VSCROLL + WS_HSCROLL
@ 500,720 OWNERBUTTON ON CLICK {|| hwg_EndDialog()} ;
SIZE 180,36 FLAT ;
TEXT "Close" COLOR hwg_ColorC2N("0000FF")
oBrw1:aarray := cnSQL
oBrw1:AddColumn( HColumn():New( "Validade",{|v,o|(v),o:aArray:Date( "VENCTO" )},"D",8,0,.F.,DT_CENTER ) )
oBrw1:AddColumn( HColumn():New( "Id.Pat",{|v,o|(v),Str( o:aArray:Number( "PATDETPATRIMONIO" ), 6 )},"C",6,0,.T.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Patrimônio",{|v,o|(v),o:aArray:String( "PATRINOME", 20 )},"C",20,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Id.Lic",{|v,o|(v),Str( o:aArray:Number( "PATDETLICENCA" ), 6 )},"C",6,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Licença",{|v,o|(v),o:aArray:String( "LICENCANOME", 50 )},"C",50,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:AddColumn( HColumn():New( "Obs",{|v,o|(v),Pad( AllTrim( o:aArray:String( "OBSVENCTO" ) + " " + o:aArray:String( "GERAOBS" ) ), 30 )},"C",30,0,.F.,DT_CENTER,DT_RIGHT ) )
oBrw1:aColumns[2]:lResizable := .F.
oBrw1:bSkip := { |o,nSkip| ADOSkipper( o:aArray, nSkip ) }
oBrw1:bGotop := { |o| o:aArray:MoveFirst() }
oBrw1:bGobot := { |o| o:aArray:MoveLast() }
oBrw1:bEof := { |o| o:aArray:Eof() }
oBrw1:bBof := { |o| o:aArray:Bof() }
oBrw1:bRcou := { |o| o:aArray:RecordCount() }
oBrw1:bRecno := { |o| o:aArray:AbsolutePosition }
oBrw1:bGOTO := { |o,n| (o),o:aArray:Move( n ) }
ACTIVATE DIALOG oModDlg
Return Nil
FUNCTION ADOSkipper( cnSQL, nSkip )
LOCAL nRec := cnSQL:AbsolutePosition()
IF ! cnSQL:Eof()
cnSQL:Move( nSkip )
IF cnSQL:Eof()
cnSQL:MoveLast()
ENDIF
IF cnSQL:Bof()
cnSQL:MoveFirst()
ENDIF
ENDIF
RETURN cnSQL:AbsolutePosition() - nRec
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- Itamar M. Lins Jr.
- Administrador

- Mensagens: 7928
- Registrado em: 30 Mai 2007 11:31
- Localização: Ilheus Bahia
- Curtiu: 1 vez
Iniciando com hwgui
Ola!
Quintas o codeblock {||} tem que retornar conteúdo.
Testa antes o codeblock, pq no seu browse tem muitos comandos... dificulta os teste aqui.
Pode usar BROWSE_DATABASE com code block {||} que funciona também.
Saudações,
Itamar M. Lins Jr.
Quintas o codeblock {||} tem que retornar conteúdo.
Testa antes o codeblock, pq no seu browse tem muitos comandos... dificulta os teste aqui.
Pode usar BROWSE_DATABASE com code block {||} que funciona também.
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Itamar M. Lins Jr.
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Iniciando com hwgui
É sério isso.
Já fiz outras correções, e estou instalando no cliente neste momento, mas sem GUI.
Se tivesse funcionado já ia ser instalado.
Já fiz outras correções, e estou instalando no cliente neste momento, mas sem GUI.
Se tivesse funcionado já ia ser instalado.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/