Macros dentro de tGet():New()

Macros dentro de tGet():New()

Postby gsabattino » Wed Sep 05, 2007 11:39 am

Hola a Todos...

En esta oportunidad me encuentro con el problema de que una serie de gets que defino dentro de un do while, cuyas variables son las celdas de un arreglo, al activarse el diálogo los datos de todos los gets comparten la ultima variable debido a que es el ultimo valor obtenido en _cItem...

Code: Select all  Expand view
        nItem     :=len( oGet )
        _cItem    :=strtrim( nItem, 2 )
        nRow      :=eval( bRow )-2
        cPicture  :=iif(  .not. empty( ConfResult->Mascara ),;
                          alltrim( ConfResult->Mascara ),;
                          NIL )
        lRight    :=( ValType( aGet[ &_cItem ] )='N' )
        oGet[ &_cItem ]   :=TGet():New( nRow, ConfResult->Col, aGet[ &_cItem ], oResult:oDlg,;
                                        ConfResult->Width, 10, cPicture,,,,,,, lPixels,,,,, lRight )

Esto funciona: oGet[ &_cItem ] :=TGet():New(...)
Pero aGet[ &_cItem ] dentro de TGet():New(...) es rechazado por xHarbour... Error E0047 Code block contains both macro and declared symbol references

Para evitar el error del xHarbour hice esto:
Code: Select all  Expand view
        bSetGet   :=bSETGET( aGet[ &_cItem ] )
        oGet[ &_cItem ]   :=TGet():New( nRow, ConfResult->Col, bSetGet, oResult:oDlg,;
                                        ConfResult->Width, 10, cPicture,,,,,,, lPixels,,,,, lRight )

Pero es asi cuando todos los gets quedan compartiendo la ultima variable del arreglo.

Recuerdo haber leído hace bastante tiempo una forma de hacer eso...


1GB de Gracias de antemano por los comentarios...


Giancarlo J. Sabattino S.
Valencia, Venezuela.
User avatar
gsabattino
 
Posts: 102
Joined: Fri Oct 14, 2005 12:03 am
Location: Valencia, Venezuela

Postby Willi Quintana » Wed Sep 05, 2007 11:59 am

Caballero,,, a los años,,, revisa este hilo
http://fivetechsoft.com/forums/viewtopi ... t=detached

Salu2
User avatar
Willi Quintana
 
Posts: 1011
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 62 guests