I declared the method below:
- Code: Select all Expand view
METHOD FieldName(cFieldName, uValue) SETGET
and the function below:
- Code: Select all Expand view
****************************************************************************
METHOD FieldName(cFieldName, uValue ) CLASS TDlgCadMySql
****************************************************************************
*
* Pegar o valor do campo informado da matriz
* Parametros: cFieldName
* Retorno: Variavel indefinida
*
* Autor: Anderson
* 12/11/2008 - 15:54:50
*
****************************************************************************
local Result := nil, i := 0
if PCount() == 2
//-- Set -----------------------------------------------------------//
for i := 1 to Len(::aFields)
if Upper(cFieldName) == ::aFields[i,1]
::aFields[i,2] := uValue
exit
end
end//for i := 1 to Len(::aFields)
else
//-- Get -----------------------------------------------------------//
for i := 1 to Len(::aFields)
if Upper(cFieldName) == ::aFields[i,1]
Result := ::aFields[i,2]
exit
end
end//for i := 1 to Len(::aFields)
end
return Result
/*------------------------------------------------------------------------*/
When I execute it generates mistake.
- Code: Select all Expand view
---------------------------
Unrecoverable error 9009:
---------------------------
---------------------------
[ OK ]
---------------------------
Solution for this??!!