El metodo que viene en la clase TGet no me funciona correctamente . ¿ Es cosa mia ( or algún cambio en las clases ) , o pasa a mas gente ? . Por cierto que tambien existe un gazapor en la declaracion del metodo New ya que aparece dos veces cVarname , se tendría que quitar la última supongo.
Pongo el metodo modificado que a mi si me funciona .:
METHOD New( nRow, nCol, bSetGet, oWnd, nWidth, nHeight, cPict, bValid,;
nClrFore, nClrBack, oFont, lDesign, oCursor, lPixel,;
cMsg, lUpdate, bWhen, lCenter, lRight, bChanged,;
lReadOnly, lPassword, lNoBorder, nHelpId,;
lSpinner, bUp, bDown, bMin, bMax, bAction, cBmpName, cVarName,;
cCueText, cVarName ) CONSTRUCTORPongo el metodo modificado que a mi si me funciona .:
METHOD cGenPrg( lDlgUnits) CLASS TGet // cambiado
local nFactorX, nFactorY
local cTop, cLeft, cWidth, cHeight
local cCode := ""
DEFAULT lDlgUnits := .F.
nFactorX = If( lDlgUnits, 4 / nLoWord( GetDlgBaseUnits() ), 1 )
nFactorY = If( lDlgUnits, 8 / nHiWord( GetDlgBaseUnits() ), 1 )
cTop = LTrim( Str( Int( ::nTop * nFactorX ) ) )
cLeft = LTrim( Str( Int( ::nLeft * nFactorY ) ) )
cWidth = LTrim( Str( Int( ::nWidth * nFactorY ) ) )
cHeight = LTrim( Str( Int( ::nHeight * nFactorX ) ) )
::CoorsUpdate()
cCode += CRLF + " @ " + cTop + ", " + cLeft + ;
" GET "+ ::cVarName +" VAR "+ "c" + SubStr( ::cVarName, 2 ) + ;
" SIZE " + cWidth + ;
", " + cHeight + ;
" PIXEL OF " + ::oWnd:cVarName + CRLF
/*
cCode += CRLF + " @ " + Str( ::nTop, 3 ) + ", " + Str( ::nLeft, 3 ) + ;
" GET " + ::cVarName + " VAR " + "c" + SubStr( ::cVarName, 2 ) + ;
" SIZE " + Str( ::nWidth, 3 ) + ", " + Str( ::nHeight, 3 ) + ;
" PIXEL OF " + ::cVarName + CRLF
*/
return cCode