HMG 3.1.2

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

Post Reply
User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 1 time

Re: HMG 3.1.2 (Test)

Post by dhaine_adp » Fri Apr 12, 2013 4:29 pm

Hola Doctor,
I'm sorry Danny, it's my fault.
You change in file C:\hmg.3.1.2\SOURCE\UNICODE_STRING.prg


Code:
#translate HMG_LEN (<x>) => LEN (<x>)
#translate HMG_LOWER (<c>) => LOWER (<c>)
#translate HMG_UPPER (<c>) => UPPER (<c>)

#translate HMG_PADC (<x>,<n>,[<c>]) => PADC (<x>,<n>,[<c>])
#translate HMG_PADL (<x>,<n>,[<c>]) => PADL (<x>,<n>,[<c>])
#translate HMG_PADR (<x>,<n>,[<c>]) => PADR (<x>,<n>,[<c>])



for:


Code:
FUNCTION HMG_LEN(x); RETURN LEN (x)
FUNCTION HMG_LOWER(c); RETURN LOWER (c)
FUNCTION HMG_UPPER(c); RETURN UPPER (c)

FUNCTION HMG_PADC(x,n,c); RETURN PADC(x,n,c)
FUNCTION HMG_PADL(x,n,c); RETURN PADL(x,n,c)
FUNCTION HMG_PADR(x,n,c); RETURN PADR(x,n,c)



and rebuild the lib. with ANSI option (comment line #define COMPILE_HMG_UNICODE)
Best regards,
Claudio.
Muchas gracias Dr. Claudio para que esto esté arreglado. :D Now, it is working fine.

I have explored the generated libhmg.a using http://codigo-base.blogspot.com/search/ ... orer%20Lib

There are strange code attached to unicode_string.o in libhmg.a One possibility is that Explorer Lib does not support unicode. It seems its not a big deal though as long as the Public symbols, external symbols and COFF format is recognized. Other HMG objects are ok. This condition is the same between HMG Unicode Enabled and HMG ANSI build. See attached.

Thank you very much again for the fixed.

Regards,

Danny
Attachments
ansi2.JPG
ansi2.JPG (60.5 KiB) Viewed 1481 times
Regards,

Danny
Manila, Philippines

User avatar
Steed
Posts: 308
Joined: Sat Dec 12, 2009 3:40 pm
Been thanked: 2 times

Post by Steed » Tue Apr 16, 2013 4:22 am

Hi Again,

I post a little video at first compilation the text_box contros works well, bud at the second try it fails
Prueba error.rar
(381.98 KiB) Downloaded 105 times
thanks,

Ed

mol wrote:
Steed wrote:
srvet_claudio wrote:
Hi Ed.
Can you post a small example and describe the bug ?
Best regards,
Claudio
Hi, Claudio,

1- Run prueba.exe
2- Hit Properties button
3- Hit Save Button

Save button execute the next code:
* ~~~~~~~~~~~~~~~~~ *
cTemp:=GetProperty('Win2','Text_1a','Value')
msgbox(alltrim(cTemp)+"x")
* ~~~~~~~~~~~~~~~~~ *
But in a randomly manner the value is not returned, sometimes msgbox shows: "Pruebax"
And sometimes only shows "x"
The attachment Prueba.rar is no longer available
The attachment test1.PNG is no longer available

Thanks for your attention

Ed
I've compiled your sample with hmg 3.0.46 and 3.1.2. Everytime result of SAVE button was good.
Code is so simple, so I can't see any bug within.
Strange...

PS. One error was in line about 120 in procedure Get_Folders
before

Code: Select all

SetProperty('Win2','Text_'+ntrim(Opz),'Value',cFolder)
after change

Code: Select all

SetProperty('Win2','Text_'+ntrim(Opz)       + "a"      ,'Value',cFolder)
Marek

User avatar
Steed
Posts: 308
Joined: Sat Dec 12, 2009 3:40 pm
Been thanked: 2 times

Post by Steed » Wed Apr 17, 2013 2:36 am

Hi, Claudio

after follow the steps that you suggets to dhaine_adp
change in file C:\hmg.3.1.2\SOURCE\UNICODE_STRING.prg
and
and rebuild the lib. with ANSI option (comment line #define COMPILE_HMG_UNICODE)
y recompile the example
HMG_MYSYNC.rar
(8.22 KiB) Downloaded 103 times
, the text_box controls work well bud something happend with the grid that doesn´t show correctly the content
Captura1.PNG
Captura1.PNG (45.36 KiB) Viewed 1360 times
It should be "C:\Ins\" and not "H"
Captura2.PNG
Captura2.PNG (16.45 KiB) Viewed 1360 times
Sorry to bother you with that but the issues with the text_box is a problem.

with out comment line #define COMPILE_HMG_UNICODE
again the text_boxt fails



Steed wrote:Hi Again,

I post a little video at first compilation the text_box contros works well, bud at the second try it fails
The attachment Prueba error.rar is no longer available
thanks,

Ed

User avatar
srvet_claudio
Posts: 1958
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 32 times
Been thanked: 125 times
Contact:

Post by srvet_claudio » Wed Apr 17, 2013 4:01 am

Steed wrote:Sorry to bother you with that but the issues with the text_box is a problem.

with out comment line #define COMPILE_HMG_UNICODE
again the text_boxt fails
Hi Ed.
It's a strange problem, I made several tests with HMG.3.1.2 and works well your code.
Best regards,
Claudio.
Attachments
Captura1.PNG
Captura1.PNG (58.46 KiB) Viewed 1356 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil
Has thanked: 100 times
Been thanked: 177 times

Post by Pablo César » Wed Apr 17, 2013 3:01 pm

Dear colleagues Rathinagiri and Dr. Soto, is it possible to release a new version 3.1.3 ? With all patches and missing libs ?
Pablo César wrote:Dear Rathinagiri,

I am still without your return my questions of these:
Pablo César wrote:Dear Rathinagiri, thank you for this new release but basically in this version are applied modifications of UNICODE adjustments but regarding Build.bat in samples, Build.bat at HMG main folder, ComboSearchBox, AutoAdjust sample/library and QHTM library have It been included or not yet ?
Please also note to update in next release, version.txt file was not updated. In this last one version.txt should contains "3.1.2 (Test 2013-04-04)".
and
srvet_claudio wrote:Maybe lack the menu patch viewtopic.php?p=25991#p25991
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

User avatar
Steed
Posts: 308
Joined: Sat Dec 12, 2009 3:40 pm
Been thanked: 2 times

Post by Steed » Wed Apr 17, 2013 4:56 pm

Sorry, to be recurrent but even in this little example the textbox control fails

Atacched please find complied example (.exe)
prueba0.rar
(765.08 KiB) Downloaded 163 times

Code: Select all

#include <hmg.ch>

Function Main()

 DEFINE WINDOW Prueba AT 252 , 489 WIDTH 368 HEIGHT 274 MAIN 

    DEFINE TEXTBOX Text_1
        ROW    90
        COL    100
        WIDTH  120
        HEIGHT 24
        VALUE ""
    END TEXTBOX

    DEFINE BUTTON Button_1
        ROW    120
        COL    110
        WIDTH  100
        HEIGHT 28
        ACTION Muestra()
        CAPTION "Button_1"
    END BUTTON

 END WINDOW
  
 Prueba.Center
 Prueba.Activate

Return

Procedure Muestra()
   local cTemp
   
   cTemp:=Prueba.Text_1.Value
   msgbox(cTemp+"X")
   
Return
Thanks again for your attention and help

Leopoldo Blancas
Posts: 344
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 1 time
Been thanked: 4 times

Post by Leopoldo Blancas » Wed Apr 17, 2013 5:19 pm

Hola Steed...

Tu aplicación no falla, lo compile y todo Ok

Code: Select all

#include <hmg.ch>

Function Main()
  
 
 DEFINE WINDOW Prueba AT 252 , 489 WIDTH 368 HEIGHT 274 MAIN 

    DEFINE TEXTBOX Text_1
        ROW    90
        COL    100
        WIDTH  120
        HEIGHT 24
        VALUE ""
    END TEXTBOX

    DEFINE BUTTON Button_1
        ROW    120
        COL    110
        WIDTH  100
        HEIGHT 28
        ACTION Muestra()
        CAPTION "Button_1"
    END BUTTON

 END WINDOW
  
 Prueba.Center
 Prueba.Activate

Return


Procedure Muestra()
   local cTemp
   
   cTemp:=Prueba.Text_1.Value
   msgbox(cTemp+"X")
   Prueba.Text_1.Value := cTemp + " X"  //AGREGUE ESTO

Return
Attachments
HolaX.png
HolaX.png (22.83 KiB) Viewed 1311 times

User avatar
Steed
Posts: 308
Joined: Sat Dec 12, 2009 3:40 pm
Been thanked: 2 times

Post by Steed » Wed Apr 17, 2013 5:23 pm

Gracias, leopoldo

Probaste con el .exe que envié adjunto ?
si no, podiras probar con el exe adjunto, sin compilar en tu maquina.

cuando haces click en el boton deberia motrar el contenido del label+"x" pero ami solo me muestra la "x"

Algunas veces ejecuta bien, pero si la cierro y la ejecuto nuevamente comienza a fallar

Gracias,

Ed
Leopoldo Blancas wrote:Hola Steed...

Tu aplicación no falla, lo compile y todo Ok

Leopoldo Blancas
Posts: 344
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 1 time
Been thanked: 4 times

Post by Leopoldo Blancas » Wed Apr 17, 2013 5:39 pm

Hola Steed...

Ya lo volví a hacer con tu exe y todo bien..., por que no cargas otra vez el HMG.3.1.2,

Saludos
Polo
*---------------------------------------------------------------------------------------------------------------------------------------------
Hello Steed ...

I did it again with your exe and all good ..., why not again HMG.3.1.2 loads,

regards
Polo

User avatar
dhaine_adp
Posts: 457
Joined: Wed Aug 06, 2008 12:22 pm
Location: Manila, Philippines
Been thanked: 1 time

Post by dhaine_adp » Wed Apr 17, 2013 6:18 pm

Hi Steed,

I also tried your HMG_MySync and Prueba. I never encountered the problem you have described. I test it on Win XP Pro SP2 without XP Theme. Everything works fine for me.

If I am not mistaken there are two patches on this release, one reported by Marek (Mol) and the other one is about ANSI and UTF8. Have you tried a clean install of HMG 3.1.2? If you've done it then take a look at your <hmgDirInstallFolder>\IDE\hmg.ini if it match your current installation directory. Correct it if it didn't match.

Also check your buildalllib.bat if it points to the correct path. Then rebuild your HMG Libs. Look at the code below this is my test:

Code: Select all

#include <hmg.ch>

Function Main()
  
 
 DEFINE WINDOW Prueba AT 252 , 489 WIDTH 368 HEIGHT 274 MAIN 

    DEFINE TEXTBOX Text_1
        ROW    90
        COL    100
        WIDTH  120
        HEIGHT 24
        VALUE ""
    END TEXTBOX

    DEFINE BUTTON Button_1
        ROW    120
        COL    110
        WIDTH  100
        HEIGHT 28
        ACTION MsgBox( ltrim( rtrim( Prueba.Text_1.Value) ) + "X", "Test" )  // MsgInfo( ltrim( rtrim( Prueba.Text_1.Value) ) + "X" , "Test" )   //
        CAPTION "Button_1"
    END BUTTON

 END WINDOW
  
 Prueba.Center
 Prueba.Activate

Return


Procedure Muestra()
   local cTemp
   
   cTemp:=Prueba.Text_1.Value
   msgbox(cTemp+"X")
   

Return
Both of them works perfectly with me and I won't be able to duplicate the problem you have posted. When you rebuild your test apps, delete the executable files and the hbmk folder if present or simply from the IDE do Reset Project Incremental Data. Then build your app again.

Regards,

Danny
Regards,

Danny
Manila, Philippines

Post Reply