Page 1 of 1

Error es E0030 Syntacis error at "."

Posted: Sat Jun 24, 2017 3:08 am
by byrpa
Buenas noches estoy retomando HMG, para realizar un sistema pequeño y me da error el siguiente codigo, pero no le encuentro el porque. Alguien me podria ayudar?

Function boton1
Local cTexto:=lecturas.txt_text.value //En esta linea esta el error, en anteriores programas lo he realizado asi.
cTexto=cTexto+"1"
lecturas.txt_text.value=cTexto
Return

El Error es E0030 Syntacis error at "."

Saludos cordiales,

Re: Error es E0030 Syntacis error at "."

Posted: Sat Jun 24, 2017 3:57 am
by byrpa
Buenas noches estoy retomando HMG, para realizar un sistema pequeño y me da error el siguiente codigo, pero no le encuentro el porque. Alguien me podria ayudar?

Code: Select all

Function boton1
Local cTexto:=lecturas.txt_text.value //En esta linea esta el error, en anteriores programas lo he realizado asi.
cTexto=cTexto+"1"
lecturas.txt_text.value=cTexto
Return
El Error es E0030 Syntacis error at "."

Saludos cordiales,

Re: Error es E0030 Syntacis error at "."

Posted: Sat Jun 24, 2017 6:15 am
by mol
If your function is placed in other .prg file than window definition,you should declare this window before first use.
Simply add line
Declare lecturas
At the top of file.

Re: Error es E0030 Syntacis error at "."

Posted: Sat Jun 24, 2017 8:40 am
by serge_girard
Byrpa,

If LECTURAS is the name of the form, then try this:

cTexto := GetProperty('Lecturars' , 'txt_text' , 'Value' )
cTexto := cTexto + "1"
SetProperty('Lecturars' , 'txt_text' , 'Value', cTexto)

Serge