HMG 3.1.1

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.1.1

Post 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.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: HMG 3.1.1 (textbox Bug)

Post 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 7672 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 7672 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 7672 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


User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: HMG 3.1.1

Post by Steed »

Atacched please find example
Attachments
Prueba.zip
(1.6 KiB) Downloaded 395 times
Leopoldo Blancas
Posts: 388
Joined: Wed Nov 21, 2012 7:14 pm
Location: México

Re: HMG 3.1.1

Post by Leopoldo Blancas »

Insisto... a mi tu aplicación corre bien....

Saludos
Polo
Attachments
prueba.jpg
prueba.jpg (30.67 KiB) Viewed 7661 times
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.1.1

Post by Rathinagiri »

May be Claudio can answer this.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
CarlosRD
Posts: 63
Joined: Thu Jan 31, 2013 9:20 pm
Location: Orizaba, México

Re: HMG 3.1.1

Post 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.
Todo en el Nombre de Jesus / All in the name of Jesus
Carlos RD
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.1.1

Post 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.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG 3.1.1

Post 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.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.1.1

Post 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.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.1.1

Post by esgici »

srvet_claudio wrote: At this moment I am traveling, ...
Bon voyage amigo :arrow:

Saludos cordiales
Viva INTERNATIONAL HMG :D
Post Reply