Error BROWSE

14 views
Skip to first unread message

Luis R. Stach

unread,
Dec 5, 2025, 1:13:42 PM12/5/25
to [oohg]
Hola a todos,

Estoy haciendo pruebas con los ejemplos de BROWSE y cuando quiero editar
algún registro me genera error, tiene que ver con la validación del campo.

Adjunto el ejemplo y el error


--
Saludos
Luis R. Stach
browse4.prg
ErrorLog.htm

Ciro Vargas C

unread,
Dec 5, 2025, 5:33:13 PM12/5/25
to oo...@googlegroups.com
He tratado de reproducir el error pero no me sale nada mal
Que pasos exactanente hay q seguir
Para que salga el error? 

Saludos 


--
Has recibido este mensaje porque estás suscrito al grupo "[oohg]" de Grupos de Google.
Para cancelar la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a oohg+uns...@googlegroups.com.
Para ver este debate, visita https://groups.google.com/d/msgid/oohg/88a6bd84-82fd-4c47-a29c-68d77a850788%40gmail.com.

Luis R. Stach

unread,
Dec 5, 2025, 5:53:41 PM12/5/25
to oo...@googlegroups.com

Al editar cualquier registro, al momento de dar ENTER para pasar al siguiente campo se genera el error

Saludos
Luis R. Stach

Ciro Vargas C

unread,
Dec 5, 2025, 8:21:07 PM12/5/25
to oo...@googlegroups.com
A. Mi me funciona bien debe haber alguna diferencia entre lo que tu tienes y lp que yo tengo, q version de ooHG usas? 

Luis R. Stach

unread,
Dec 5, 2025, 8:29:41 PM12/5/25
to oo...@googlegroups.com

Version: OOHG Ver. 2025.07.20.rc1 (32 bits)

Descargue los archivos fuentes el 03/11/2025


Saludos
Luis R. Stach

Ciro Vargas C

unread,
Dec 5, 2025, 8:58:10 PM12/5/25
to oo...@googlegroups.com


por sis caso bale el brose4.prg de tu mismo correo, lo compile y lo probe y no me falla

es extrano.

alguien mas puede probar para ver si tambien le falla, pq a mi no me falla


saludos




--

Luis R. Stach

unread,
Dec 5, 2025, 9:45:09 PM12/5/25
to oo...@googlegroups.com

OOHG lo descargo y compila con la versión oficial de Harbour, no estoy usando ninguna librería de terceros, solamente Harbour y OOHG, el BROWSE4.PRG es el que viene con los SAMPLES de OOHG, sin ninguna modificación, no se que puede ser.

De acuerdo al error que aparece el problema esta en el uso de la variable que crea el browse para hacer la validaciones MEMVAR.AREA.FIELD, hice unas pruebas y si pongo un MsgInfo(Valtype(MEMVAR.AREA.FIELD)) me devuelve "U" o sea un valor desconocido o no definido


Saludos
Luis R. Stach

Ciro Vargas C

unread,
Dec 5, 2025, 9:50:09 PM12/5/25
to oo...@googlegroups.com
prueba esta version...

y dime si funciona

b.prg

Luis R. Stach

unread,
Dec 5, 2025, 10:10:57 PM12/5/25
to oo...@googlegroups.com

Funciona bien, no hay error


Saludos
Luis R. Stach

Ciro Vargas C

unread,
Dec 5, 2025, 10:30:47 PM12/5/25
to oo...@googlegroups.com

El array VALID tiene 6 elementos (uno por cada campo), pero solo se definen 4 condiciones y hay comas vacías.

Error original:


VALID { { || MemVar.Test.Code <= 1000 } , { || !Empty(MemVar.Test.First) } , { || !Empty(MemVar.Test.Last) } , { || Year(MemVar.Test.Birth) >= 1900 } , , } ;
```

Corrección:


VALID { { || _OOHG_ThisItemCellValue <= 1000 } , { || !Empty(_OOHG_ThisItemCellValue) } , { || !Empty(_OOHG_ThisItemCellValue) } , { || Year(_OOHG_ThisItemCellValue) >= 1900 } , NIL, NIL } ;
```

No se pq a mi me funcionan los dos 

Dale las gracias a deepseek 


Yo solo copie y pegue 

Luis R. Stach

unread,
Dec 5, 2025, 10:59:54 PM12/5/25
to oo...@googlegroups.com

Sigo haciendo pruebas y se pueden definir algunas validaciones y funciona bien siempre que no se use la opción MEMVAR.AREA.FIELD, cuando quiero usar eso falla, sin importar si están definidas todas o algunas validaciones.

Creo que el problema esta en la creación de esas MEMVAR

El error que muestra está claro 

Error BASE/1074  Argument error: <= Arguments: (1) = Tipo: U (2) = Tipo: N Value: 1000

el problema es el Argumento (1) o sea la MEMVAR que define el browse


Saludos
Luis R. Stach

Ciro Vargas C

unread,
Dec 5, 2025, 11:13:20 PM12/5/25
to oo...@googlegroups.com
Sospecho es algún include 
Que le falta algo 

Ciro Vargas C

unread,
Dec 5, 2025, 11:27:11 PM12/5/25
to oo...@googlegroups.com


 Sintaxis incorrecta

La sintaxis MemVar.Test.Code supone que:

· Existe una variable pública o privada llamada MemVar
· MemVar es un objeto con una propiedad Test
· Test es un objeto con una propiedad Code

Pero en realidad, ooHG no crea esta estructura automáticamente.

3. Versiones de ooHG

En versiones antiguas (basadas en MiniGUI clásico), sí se creaba una variable MemVar durante la edición, pero en ooHG moderno esto cambió.

Soluciones:

Opción 1: Usar _OOHG_ThisItemCellValue (Recomendado)

Luis R. Stach

unread,
Dec 6, 2025, 12:36:55 AM12/6/25
to oo...@googlegroups.com

> Opción 1: Usar _OOHG_ThisItemCellValue (Recomendado)

Si voy a usar esta opción

Gracias Ciro por tu tiempo

Saludos
Luis R. Stach

José Quintas

unread,
Dec 11, 2025, 4:47:28 PM12/11/25
to [oohg]
hbmk2 testoohg.prg oohg_hb.hbc -w3 -es2

Harbour 3.2.0dev (r2510231945)
Copyright (c) 1999-2025, https://harbour.github.io/

testoohg.prg:73: warning W0001  Ambiguous reference 'MEMVARTESTCODE'
testoohg.prg:73: warning W0001  Ambiguous reference 'MEMVARTESTFIRST'
testoohg.prg:73: warning W0001  Ambiguous reference 'MEMVARTESTLAST'
testoohg.prg:73: warning W0001  Ambiguous reference 'MEMVARTESTBIRTH'
testoohg.prg:95: warning W0006  Procedure returns value
testoohg.prg:102: warning W0006  Procedure returns value
testoohg.prg:143: warning W0001  Ambiguous reference 'I'
testoohg.prg:145: warning W0001  Ambiguous reference 'I'
testoohg.prg:146: warning W0001  Ambiguous reference 'I'
testoohg.prg:147: warning W0001  Ambiguous reference 'I'
testoohg.prg:149: warning W0001  Ambiguous reference 'I'
testoohg.prg:150: warning W0001  Ambiguous reference 'I'
testoohg.prg:150: warning W0001  Ambiguous reference 'I'
testoohg.prg:152: warning W0001  Ambiguous reference 'CODE'

José M. C. Quintas
Reply all
Reply to author
Forward
0 new messages