oasys.info Posted February 26, 2007 Report Share Posted February 26, 2007 O trecho abaixo não dá erro no fivewim mas dá no xHarbour, qual é a incompatibilidade? @ 0.4,0.5 listbox oBrw fields aFiles[n][1],; str(aFiles[n][2],10,0),; dtoc( aFiles[n][3] ),; aFiles[n][4] ; headers "Nome", "Tamanho", "Data", "Hora" ; fieldsizes 120,80,80,60 ; FONT oFontSay ; of odlg size 200, 100 oBrw:bGotop := { || n := 1 } oBrw:bGoBottom := { || n := eval( oBrw:bLogicLen ) } oBrw:bSkip := { | nwant, nold | nold := n , n += nwant,; n := max( 1, min( n, eval( oBrw:bLogicLen ))),; n - nOld } oBrw:bLogicLen := { || len( aFiles ) } oBrw:cAlias := "Array" Obrigado, Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 26, 2007 Author Report Share Posted February 26, 2007 O trecho abaixo não dá erro no fivewim mas dá no xHarbour, qual é a incompatibilidade? @ 0.4,0.5 listbox oBrw fields aFiles[n][1],; str(aFiles[n][2],10,0),; dtoc( aFiles[n][3] ),; aFiles[n][4] ; headers "Nome", "Tamanho", "Data", "Hora" ; fieldsizes 120,80,80,60 ; FONT oFontSay ; of odlg size 200, 100 oBrw:bGotop := { || n := 1 } oBrw:bGoBottom := { || n := eval( oBrw:bLogicLen ) } oBrw:bSkip := { | nwant, nold | nold := n , n += nwant,; n := max( 1, min( n, eval( oBrw:bLogicLen ))),; n - nOld } oBrw:bLogicLen := { || len( aFiles ) } oBrw:cAlias := "Array" Obrigado, Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 26, 2007 Report Share Posted February 26, 2007 POSTE COMPLETO, E INFORME CUAL É O ERRO. PEQUENA CONFUSAO: FIVEWIN É FIVEWIN... XHARBOUR, É O COMPILADOR PARA O FIVEWIN DE 32 BITS, BEM COMO O CLIPPER, É O COMPILADOR PARA FIVEWIN 16 BITS. SE USAS PROGRAMAS EM D.O.S, XHARBOUR SUBSTITUE O CLIPER NA COMPILACAO. ES ESTO. regards, saludos. SE É D.O.S, NAO PODES USAR COMANDOS DE FIVEWIN. João Santos - São Paulo. kmt_karinha@pop.com.br kapiaba@brfree.com.br FWH 2.7 - xHARBOUR 0.99.61 - WorkShop.Exe Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 27, 2007 Author Report Share Posted February 27, 2007 Lá vai a função completa: O erro no xHarbour é: Erro BASE/1070 Argument error:= (na linha onde está o oof odlg size 200,100 Obrigado. ******************************************************************************************* ********************************** VISUALIZA RELATÓRIOS *********************************** ******************************************************************************************* FUNCTION VerRel() ******************************************************************************************* Local oDlg, oCbx, oBrw, n := 1 Local bFech Local cCombo := "Arquivos (*.prn)" Local cItens := { "Arquivos (*.prn)",; "Documentos (*.doc)",; "Textos (*.txt)"} // Verifica o acesso ao formulario // if !Acesso(PROCNAME(), .F. ) Return nil endif if Acesso("c_Para", ,.F. ) // verificar se tem acesso ao parametros cItens := { "Arquivos (*.prn)",; "Auditoria (*.aud)",; "Documentos (*.doc)",; "Textos (*.txt)"} endif HelpSetTopic(oaHelp(ProcName())) aFiles := directory( pDado+"*.prn" ) if len( aFiles ) < 1 aFiles := {{" ",0,CTOD(" / / ")," "}} endif asort( aFiles,,, { |x, y | x[1] < y[1] } ) SET _3DLOOK ON define dialog odlg from 2,2 to 18.5, 54.5 title "Selecione o arquivo na pasta "+pDado @ 0.4,0.5 listbox oBrw fields aFiles[n][1],; str(aFiles[n][2],10,0),; dtoc( aFiles[n][3] ),; aFiles[n][4] ; headers "Nome", "Tamanho", "Data", "Hora" ; fieldsizes 120,80,80,60 ; FONT oFontSay ; of odlg size 200, 100 oBrw:bGotop := { || n := 1 } oBrw:bGoBottom := { || n := eval( oBrw:bLogicLen ) } oBrw:bSkip := { | nwant, nold | nold := n , n += nwant,; n := max( 1, min( n, eval( oBrw:bLogicLen ))),; n - nOld } oBrw:bLogicLen := { || len( aFiles ) } oBrw:cAlias := "Array" @ 6,16 BUTTON "&Consultar" of oDlg SIZE 30,12 ACTION Consulta(n) @ 6,22 BUTTON "Apa&gar" of oDlg SIZE 30,12 ACTION Apaga(oDlg,oBrw,cCombo,n) @ 6,28 BUTTON bFech Prompt "&Sair" of oDlg SIZE 30,12 ; MESSAGE "("+ProcName()+") - FECHA esta janela." ; ACTION oDlg:end() bFech:cToolTip="("+ProcName()+") - FECHA esta janela." @ 7.8, 0.5 COMBOBOX oCbx VAR cCombo STYLE CBS_DROPDOWN ; ITEMS cItens ; SIZE 80,50 ; ON CHANGE (AtuCombo(oDlg,oBrw,cCombo)) OF oDlg activate dialog oDlg centered ON INIT SetaBrw3d( oBrw ) SET _3DLOOK OFF return NIL Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted February 27, 2007 Report Share Posted February 27, 2007 Tente retirar isto e veja o que acontece. fieldsizes 120,80,80,60 João Santos - São Paulo. kmt_karinha@pop.com.br kapiaba@brfree.com.br FWH 2.7 - xHARBOUR 0.99.61 - WorkShop.Exe Quote Link to comment Share on other sites More sharing options...
kleyber Posted February 27, 2007 Report Share Posted February 27, 2007 Oscar, Experimente mudar isto aqui: FONT oFontSay ; of odlg size 200, 100 para: FONT oFontSay ; size 200, 100 of odlg Abraços, Kleyber Derick xHarbour 0.99.4 + FWH 2.5 + xDevStudio + SQLLIB Visite São LuÃs - MA A Ilha dos Amores Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 27, 2007 Author Report Share Posted February 27, 2007 Obrigado Kleyber pela dica, mas não deu certo, o problema parece que está no aFiles, deve haver alguma diferença entre o Fivewin+Clipper e o xHarbour. Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
miragerr Posted February 27, 2007 Report Share Posted February 27, 2007 Ola amigo O que acontece é que vc esta uma ARRAY no LISTBOX para vc usar ARRAY vc deve fazer desta forma REDEFINE LISTBOX oBrowse; FIELDS "","","",""; HEADERS "Marca",; "Referência",; "Qtd",; "Valor Avista"; FONT oFont; OF oDlg; COLOR "N/W","n/GR+"; ID 101 oBrowse:aJustify := { .F., .F., .T., .T.} // oBrowse:lMChange := .F. oBrowse:nAt := 1 oBrowse:l3d = .T. oBrowse:l3dlook = .T. oBrowse:nLineStyle := 3 oBrowse:SetArray( aProd ) oBrowse:bLine = { || { aProd[ oBrowse:nAt, 2 ],; aProd[ oBrowse:nAt, 3 ],; aProd[ oBrowse:nAt, 4 ],; aProd[ oBrowse:nAt, 5 ] } } oBrowse:bGoTop = { || oBrowse:nAt := 1 } oBrowse:bGoBottom = { || oBrowse:nAt := Eval( oBrowse:bLogicLen ) } oBrowse:bSkip = { | nWant, nOld | nOld := oBrowse:nAt, oBrowse:nAt += nWant,; oBrowse:nAt := Max( 1, Min( oBrowse:nAt, Eval( oBrowse:bLogicLen ) ) ),; oBrowse:nAt - nOld } oBrowse:bLogicLen = { || Len( aProd ) } oBrowse:blDblClick := {|| oDlg:End } oBrowse:bKeyDown := {|nKey| iif(nKey=VK_RETURN , oDlg:end(), .T. ) } id=code>id=code>Veja que para trabalhar com ARRAY em um LISTBOX, tem varios parametros Qual quer coisa GRITE Jackson Douglas Boa Vista - RR FWH 2.8 Ferrari VERMELINHA + WS + XH 0.99.61 + (Ja comprei a SQLLIB, e em breve irei DESISTIR de usa-la ) miragerr@osite.com.br Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 28, 2007 Author Report Share Posted February 28, 2007 Jackson, O seu exemplo funciona perfeitamente no Fivewin 16bits, mas no xHarbour dá o mesmo erro. Por favor, veja se você consegue executar o meu exemplo aÃ. Obrigado. Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
pauloaraujo Posted February 28, 2007 Report Share Posted February 28, 2007 Oscar Faça esse teste: FUNCTION VerRel() Local oDlg, oCbx, oBrw Local bFech Local cCombo := "Arquivos (*.prn)" Local cItens := { "Arquivos (*.prn)",; "Documentos (*.doc)",; "Textos (*.txt)"} Private n:=1 Editado por - pauloaraujo on 28/02/2007 08:32:50 Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 28, 2007 Author Report Share Posted February 28, 2007 Paulo, Agradeço a sua ajuda, mas continua dando erro, mesmo transformando a variável em privada. Se alguém conseguir compilar em xHarbour o exemplo que está em \fwh\samples\testbrar.prg já me ajuda. O exemplo compila e roda perfeitamente em Fivewin mas não roda no xHarbour. // Browsing a two dimensions array with FiveWin powerfull TWBrowse #include "FiveWin.ch" //----------------------------------------------------------------------------// function Main() local oDlg, oBrw local aData := { { "1", "Cliente", "=", "123456" },; { "2", "Direccion", "$", "Spain" },; { "3", "Telefono", "<>", "889977665" } } SET _3DLOOK ON DEFINE DIALOG oDlg FROM 2, 2 TO 20, 50 @ 1, 1 LISTBOX oBrw FIELDS aData[ oBrw:nAt ][ 1 ],; aData[ oBrw:nAt ][ 2 ],; aData[ oBrw:nAt ][ 3 ],; aData[ oBrw:nAt ][ 4 ] OF oDlg ; SIZE 150, 100 oBrw:SetArray( aData ) @ 10, 9 BUTTON "&End" OF oDlg ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED return nil //----------------------------------------------------------------------------// Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 28, 2007 Author Report Share Posted February 28, 2007 Puxa vida! Esse erro tá difÃcil de resolver. Compilei o meu programa isolado, fora do sistema e ele roda, quando compilo junto com os outros programas, dentro do sistema ele não roda. O que será que é? Alguém já teve esse problema antes? Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
pauloaraujo Posted February 28, 2007 Report Share Posted February 28, 2007 Oscar, Basta abrir um dbf qualquer que o TESTBRAR.PRG vai funcionar function Main() local oDlg, oBrw local aData := { { "1", "Cliente", "=", "123456" },; { "2", "Direccion", "$", "Spain" },; { "3", "Telefono", "<>", "889977665" } } SET _3DLOOK ON USE CLIENTES NEW DEFINE DIALOG oDlg FROM 2, 2 TO 20, 50 @ 1, 1 LISTBOX oBrw FIELDS aData[ oBrw:nAt ][ 1 ],; aData[ oBrw:nAt ][ 2 ],; aData[ oBrw:nAt ][ 3 ],; aData[ oBrw:nAt ][ 4 ] OF oDlg ; SIZE 150, 100 oBrw:SetArray( aData ) @ 10, 9 BUTTON "&End" OF oDlg ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED return nil Quote Link to comment Share on other sites More sharing options...
oasys.info Posted February 28, 2007 Author Report Share Posted February 28, 2007 Era só isso? Quebrei a cabeça. Oscar Ribeiro Fº OASyS Informática Itu - São Paulo Fwh27+xHarbour0.99.60+BCC55 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.