Page 10 of 16

Re: HMG 3.1.1

Posted: Thu Feb 07, 2013 8:02 pm
by danielmaximiliano
CarlosRD wrote:gracias daniel por el tip.

efectivamente, hice funcionar el "read", pero creo que solo funciona para el modo DOS.
estuve leyendo la documentación de setmode(), y lo mejor que puedo hacer es trabajar con setmode(43,132), esto para salvaguardar que funcione en cualquier monitor...
ahora estoy decidiendo en seguir con el avance que ya tengo en ambiente windows, o modificar mis prgs a modo DOS.

saludos y gracias nuevamente...
El Tip es para el entorno D.O.S, si necesitas trabajar en entorno grafico necesitas utilizar el IDE que viene acompañado con HMG.3.1.1, ajustar el idioma y el editor que prefieras.
al crear un nuevo proyecto se genera el MAIN.PRG y el MAIN.FMG, este .FMG contendra todos los controles que necesites , puedes mirar los ejemplos que acompañan HMG.
tambien desde el IDE tienes el manual de REFERENCIA del entorno HMG. te sugiero leerlo
Menu Ayuda/Help , Reference / Referencia HMG.
cualquier cosa que no puedas implementar solo crea un nuevo topico en HMG Español dentro del FORO.

Re: HMG 3.1.1 (textbox Bug)

Posted: Thu Feb 07, 2013 11:15 pm
by Steed
Hi All,

After test a lot of times I discoverd that with HMG.3.1.1, the control textbox
some times doesn´t return the value

Code: Select all

aTemp2[2] := Main.Text_1a.Value
Prueba img_1.png
Prueba img_1.png (36.9 KiB) Viewed 7827 times
It has to show "Pruebax" but show only "x"

I went to C:\hmg\SOURCE\SET_COMPILE_HMG_UNICODE.ch
and comment the next line

Code: Select all

//#define COMPILE_HMG_UNICODE 
and then rebuild the hmg libraries and compile again
Prueba img_2.png
Prueba img_2.png (37.96 KiB) Viewed 7827 times
Aparently all was well, but i realized that the Grid control wasn´t display correctly
Prueba img_3.PNG
Prueba img_3.PNG (14.46 KiB) Viewed 7827 times
Atached please find example.


Thanks for your help

Ed

Code: Select all

#include <hmg.ch>
** --------------------------------------------------------------------------*
procedure main

   Local cTitle,aTemp
    
   aTemp := array(4)
   aTemp[2] := "prueba  " + Space(92)
   aTemp[3] := "123456  " + Space(92)
   

   Request DBFCDX
   RDDSETDEFAULT( "DBFCDX" )
   Set Deleted ON
   
   DBUSEAREA(.T.,'DBFCDX','Prueba.Dbf','Prueba',.F.)
   
   DEFINE WINDOW MAIN               ;
   WIDTH  500                       ;
   HEIGHT 450                       ;
   TITLE "Prueba"  ;
   MAIN    ;
   ON RELEASE dbclosearea('Prueba') 
   
   @ 30, 30  TextBox  Text_1a   Width 100 Height 20    
   @ 60, 30  Button   SaveButton    caption 'Save'   Action Properties() Width 100 Height 30

@ 90, 20 GRID Grid_1 ;
   WIDTH  300         ;
   HEIGHT 150         ;
   HEADERS {'Origin'} ;
   WIDTHS {150}           ;
   ITEMS NIL ;
   VALUE {1,1} ;
   ON DBLCLICK {|| Properties() };
   ROWSOURCE "Prueba" ;
   COLUMNFIELDS {'Origin'} ;
   DYNAMICDISPLAY {{|| This.CellValue }} ;
   JUSTIFY {BROWSE_JTFY_LEFT}   
   End Window     
   
   
   Main.Text_1a.Value:= alltrim(aTemp[2])
   
   Activate window Main      
   
return  
 
Procedure Properties()
   Local nRec,nCol
   Private aTemp2,cTemp
   
   aTemp2 := Array(4)
   aTemp2[2] := Main.Text_1a.Value 
   
   Replace Field->Origin with aTemp2[2]
     
   MSGBOX(Main.Text_1a.Value + "x" )
   
   Main.Grid_1.Refresh
Return



Re: HMG 3.1.1

Posted: Thu Feb 07, 2013 11:16 pm
by Steed
Atacched please find example

Re: HMG 3.1.1

Posted: Fri Feb 08, 2013 12:25 am
by Leopoldo Blancas
Insisto... a mi tu aplicación corre bien....

Saludos
Polo

Re: HMG 3.1.1

Posted: Fri Feb 08, 2013 7:41 am
by Rathinagiri
May be Claudio can answer this.

Re: HMG 3.1.1

Posted: Fri Feb 08, 2013 4:46 pm
by CarlosRD
danielmaximiliano wrote:
CarlosRD wrote:gracias daniel por el tip.

efectivamente, hice funcionar el "read", pero creo que solo funciona para el modo DOS.
estuve leyendo la documentación de setmode(), y lo mejor que puedo hacer es trabajar con setmode(43,132), esto para salvaguardar que funcione en cualquier monitor...
ahora estoy decidiendo en seguir con el avance que ya tengo en ambiente windows, o modificar mis prgs a modo DOS.

saludos y gracias nuevamente...
El Tip es para el entorno D.O.S, si necesitas trabajar en entorno grafico necesitas utilizar el IDE que viene acompañado con HMG.3.1.1, ajustar el idioma y el editor que prefieras.
al crear un nuevo proyecto se genera el MAIN.PRG y el MAIN.FMG, este .FMG contendra todos los controles que necesites , puedes mirar los ejemplos que acompañan HMG.
tambien desde el IDE tienes el manual de REFERENCIA del entorno HMG. te sugiero leerlo
Menu Ayuda/Help , Reference / Referencia HMG.
cualquier cosa que no puedas implementar solo crea un nuevo topico en HMG Español dentro del FORO.
GRACIAS POR TU RESPUESTA DANIEL.
TE COMENTO QUE CON TROPIEZOS YA TENGO COMPLETO EL PRIMER MODULO DE MI APLICACION EN AMBIENTE GRAFICO. VOY CON EL SEGUNDO Y COMO YA ME ESTOY ACOSTUMBRANDO Y APRENDIENDO, PUES YA HE AVANZADO UN POCO MAS RAPIDO, PERO DE PRONTO SE ME OCURRIO PROBAR EL "read".
ESTOY APRENDIENDO DANIEL, DESPUES DE CASI 20 AÑOS DE ESTAR ALEJADO DE LA PROGRAMACION, CREO QUE LLEVO UN MUY BUEN AVANCE. EN CUANTO TENGA OTRA DUDA, TENLO POR SEGURO QUE VOY A PREGUNTAR.
CARLOS RD.

Re: HMG 3.1.1

Posted: Fri Feb 08, 2013 4:53 pm
by danielmaximiliano
CarlosRD wrote:
GRACIAS POR TU RESPUESTA DANIEL.
TE COMENTO QUE CON TROPIEZOS YA TENGO COMPLETO EL PRIMER MODULO DE MI APLICACION EN AMBIENTE GRAFICO. VOY CON EL SEGUNDO Y COMO YA ME ESTOY ACOSTUMBRANDO Y APRENDIENDO, PUES YA HE AVANZADO UN POCO MAS RAPIDO, PERO DE PRONTO SE ME OCURRIO PROBAR EL "read".
ESTOY APRENDIENDO DANIEL, DESPUES DE CASI 20 AÑOS DE ESTAR ALEJADO DE LA PROGRAMACION, CREO QUE LLEVO UN MUY BUEN AVANCE. EN CUANTO TENGA OTRA DUDA, TENLO POR SEGURO QUE VOY A PREGUNTAR.
CARLOS RD.
Para "Read" utiliza los controles "Textbox", puede ser que necesites validar o/u otra cosa, utilza los metodos On Lostfocus para que valide la salida del mismo. creo que hay en el foro una constestacion sobre ello.

igual estamos aqui algunos de los amigos para darte una mano si la necesitas.

Re: HMG 3.1.1

Posted: Sat Feb 09, 2013 5:08 pm
by srvet_claudio
danielmaximiliano wrote:TextBox controls work erratically
Steed wrote:Something is happen with textbox control, randomly their value is not returned.
I have reviewed the source code of TextBox and I found that at PRG level has some of Harbour functions that do not support Unicode.
At this moment I am traveling, when I return I will try to correct it.
Best regards,
Claudio.

Re: HMG 3.1.1

Posted: Sat Feb 09, 2013 7:53 pm
by danielmaximiliano
srvet_claudio wrote:
danielmaximiliano wrote:TextBox controls work erratically
Steed wrote:Something is happen with textbox control, randomly their value is not returned.
I have reviewed the source code of TextBox and I found that at PRG level has some of Harbour functions that do not support Unicode.
At this moment I am traveling, when I return I will try to correct it.
Best regards,
Claudio.
Gracias Claudio, en estos momentos comente el archivo .hbc, escribo el fuente en formato ansi sin ningun problemas con los controles HMG.

Re: HMG 3.1.1

Posted: Sat Feb 09, 2013 8:31 pm
by esgici
srvet_claudio wrote: At this moment I am traveling, ...
Bon voyage amigo :arrow:

Saludos cordiales