fluna Posted October 24, 2014 Report Share Posted October 24, 2014 ***************************************** estr:=dbstruct() For i=1 to len(estr) estr[i,1]:=upper(substr(estr[i,1],1,1))+lower(substr(estr[i,1],2)) cVar:=estr[i,1] estr[i,2]:=&cVar. Next nMax:=min( len(estr) , 20 ) DEFINE DIALOG xDlg FROM 1, 5 TO 40, 100 TITLE alias() nLin:=0.99 For i=1 to nMax @ nLin,1 say estr[i,1] of xDlg nLin+=0.86 Next For i=1 to nMax @ i,5 get estr[i,2] of xDlg Next ACTIVATE DIALOG xDlg CENTERED return nil Quote Link to comment Share on other sites More sharing options...
sambomb Posted October 24, 2014 Report Share Posted October 24, 2014 estr := DbStruct() For i=1 to Len(estr) estr[i,1] := Upper( Substr( estr[i,1], 1, 1 ) ) + Lower( Substr( estr[i,1], 2 ) ) cVar := estr[i,1] estr[i,2] := &(cVar) End nMax := Min( Len(estr) , 20 ) DEFINE DIALOG xDlg; FROM 1, 5; TO 40, 100; TITLE Alias() nLin := 0.99 For i=1 to nMax @ nLin,1 say estr[i,1] of xDlg nLin+=0.86 End For i=1 to nMax @ i,5 get estr[i,2] of xDlg End ACTIVATE DIALOG xDlg CENTERED return nil Quote Link to comment Share on other sites More sharing options...
fluna Posted October 24, 2014 Author Report Share Posted October 24, 2014 Obrigado por edentar; não sei porquê raios os gets ficam vazios... Quote Link to comment Share on other sites More sharing options...
sambomb Posted October 24, 2014 Report Share Posted October 24, 2014 Local oGet := {}, cGet := {} estr := DbStruct() For i=1 to Len(estr) estr[i,1] := Upper( Substr( estr[i,1], 1, 1 ) ) + Lower( Substr( estr[i,1], 2 ) ) cVar := estr[i,1] estr[i,2] := &(cVar) End nMax := Min( Len(estr) , 20 ) DEFINE DIALOG xDlg; FROM 1, 5; TO 40, 100; TITLE Alias() nLin := 0.99 oGet := Array(nMax) cGet := aFill(Array(nMax),Space(20)) For i=1 to nMax @ nLin,1 say estr[i,1] of xDlg nLin+=0.86 End For i=1 to nMax cGet := estr[i,2] @ i,5 get oGet var cGet of xDlg End ACTIVATE DIALOG xDlg CENTERED return nil Quote Link to comment Share on other sites More sharing options...
fluna Posted October 24, 2014 Author Report Share Posted October 24, 2014 Error description: Error BASE/1132 Bound error: array access Args: [ 1] = A { ... } [ 2] = N 21 Ô treinzim complicado rssssss Quote Link to comment Share on other sites More sharing options...
fluna Posted October 24, 2014 Author Report Share Posted October 24, 2014 Resolvido assim: *****************************************Function EditCell( )******************************************* USE CLIENTES // abrir qualquer arquivo que tenha mais de 30 campos para fazer um scroll automático...** oGet := {} cGet := {} estr := DbStruct() For i=1 to Len(estr) estr[i,1] := Upper( Substr( estr[i,1], 1, 1 ) ) + Lower( Substr( estr[i,1], 2 ) ) End nMax := Len(estr) DEFINE DIALOG xDlg FROM 1,5 TO 44,100 TITLE Alias() nLin := 0.5 oGet := Array(nMax) For i=1 to nMax @ nLin,1 say estr[i,1] of xDlg nLin+=0.86 End nCtn:=0 nLin:=-0.5 For i=1 to nMax nLin+=1 nCtn++ cGet:=field(i) @ nLin,5 get oGet var &cGet of xDlg End ACTIVATE DIALOG xDlg CENTERED return nil Abrindo agora novo tópico para auxílio no scroll automático... valeu SAMBOMB!!!! Quote Link to comment Share on other sites More sharing options...
sambomb Posted October 27, 2014 Report Share Posted October 27, 2014 Resolvido assim: ***************************************** Function EditCell( ) ***************************************** * * USE CLIENTES // abrir qualquer arquivo que tenha mais de 30 campos para fazer um scroll automático... * * oGet := {} cGet := {} estr := DbStruct() For i=1 to Len(estr) estr[i,1] := Upper( Substr( estr[i,1], 1, 1 ) ) + Lower( Substr( estr[i,1], 2 ) ) End nMax := Len(estr) DEFINE DIALOG xDlg FROM 1,5 TO 44,100 TITLE Alias() nLin := 0.5 oGet := Array(nMax) For i=1 to nMax @ nLin,1 say estr[i,1] of xDlg nLin+=0.86 End nCtn:=0 nLin:=-0.5 For i=1 to nMax nLin+=1 nCtn++ cGet:=field(i) @ nLin,5 get oGet var &cGet of xDlg End ACTIVATE DIALOG xDlg CENTERED return nil Abrindo agora novo tópico para auxílio no scroll automático... valeu SAMBOMB!!!! Disponha! Edita o título para por como resolvido e na próxima tenta um título pro post mais sugestivo, fica mais simples de entender sobre o que se trata e ajudar quem vier a ter o mesmo problema que você 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.