HMG 3.1.1

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

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

Re: HMG 3.1.1

Post by danielmaximiliano »

Hola ED: como dice nuestro amigo Esgici, esas funciones Harbour solo estan en changed.log

esta es una busqueda en los Sources de harbour mediante TextCrawler.


esta es la busqueda de las funciones en Changelog.txt, estan al final del texto con fecha 1999.



Hello ED: as our friend Esgici, these functions are only in changed.log Harbour
TextCrawler_2013-03-28_13-19-16.png
TextCrawler_2013-03-28_13-19-16.png (127.52 KiB) Viewed 15068 times
This is a search of the harbor by TextCrawler Sources.
Crimson Editor_2013-03-28_13-22-38.png
Crimson Editor_2013-03-28_13-22-38.png (37.75 KiB) Viewed 15068 times
This is the search functions in Changelog.txt, at the end of the text are dated 1999.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. 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

Post by Steed »

Hi, Daniel,

Maybe I didn´t explain me very well, If I left

Code: Select all

#define COMPILE_HMG_UNICODE  
without comments "//"

and recompile hmg sources, the error about the functions doesn´t appear, the example compile very well, but the problem is that the text_box controls remains with fails at the moment of return their value
as I post some time ago :viewtopic.php?f=2&t=2606&start=90

Thanks,


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

Re: HMG 3.1.1

Post by danielmaximiliano »

Steed wrote:Hi, Daniel,

Maybe I didn´t explain me very well, If I left

Code: Select all

#define COMPILE_HMG_UNICODE  
without comments "//"

and recompile hmg sources, the error about the functions doesn´t appear, the example compile very well, but the problem is that the text_box controls remains with fails at the moment of return their value
as I post some time ago :viewtopic.php?f=2&t=2606&start=90

Thanks,


Ed
Ed: underneath your comment our friend Claudio answered this
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.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. 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

Post by Steed »

Thanks Daniel, for your attention. So I will be waiting Claudio's help.

Regards,

Ed
melliott42
Posts: 119
Joined: Wed Feb 18, 2009 2:14 pm

Re: HMG 3.1.1

Post by melliott42 »

Guys,

Which one?

If I want to both take ideal advantage of HMG AND have stability what version of HMG should one be using at this point?

Thanks,

Michael
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HMG 3.1.1

Post by mol »

I don't need unicode and I'm still using hmg 3.0.46.
Works perfect!
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 »

Hi all.

The Unicode text presents some difficult for encrypt password with the tradicinal algorithm to process byte by byte.
In a recent post (I do not remember its location) I saw this difficulty.
Here is the skeleton of a very simple function of encryption of ANSI/UNICODE strings.
I hope it is usefull.

Best regards,
Claudio.

Code: Select all


#include "hmg.ch"

Function Main
   cPassword := "ABC áéíóú ABC"  // Ansi or Unicode Text
   cCrypt := Example_ANSI_UNICODE_Encrypt (cPassword) 
   MsgInfo (cCrypt)
   cPassword := Example_ANSI_UNICODE_Decrypt (cCrypt) 
   MsgInfo (cPassword)
Return Nil


Function Example_ANSI_UNICODE_Encrypt (cText)
LOCAL i, nByte, cAux, cCrypt := ""
   FOR i = 1 TO HB_BLEN (cText)
       cAux := HB_BSUBSTR (cText, i, 1)
       nByte := ASC (cAux)
       
       /* Begin: User Byte Encryption Algorithm */    
           nByte ++
           IF nByte > 255
              nByte := 0
           ENDIF
       /* End: User Byte Encryption Algorithm */
       
       cAux := CHR (nByte)
       cCrypt := cCrypt + cAux
   NEXT
Return cCrypt



Function Example_ANSI_UNICODE_Decrypt (cText)
LOCAL i, nByte, cAux, cCrypt := ""
   FOR i = 1 TO HB_BLEN (cText)
       cAux := HB_BSUBSTR (cText, i, 1)
       nByte := ASC (cAux)
       
       /* Begin: User Byte Encryption Algorithm */    
           nByte --
           IF nByte < 0
              nByte := 255
           ENDIF
       /* End: User Byte Encryption Algorithm */
       
       cAux := CHR (nByte)
       cCrypt := cCrypt + cAux
   NEXT
Return cCrypt

Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
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 »

srvet_claudio wrote:Hi All.
I attached a patch for source code of HMG.3.1.1

Best regards,
Claudio.

Code: Select all

Summary all of the changes made to the source code:
---------------------------------------------------

1) I set the compiler warnings to W2.

2) I fixed Browse control problem.

3) I fixed the problem in IMAGE property in COMBOBOX control.

4) I added functions HMG_LOWER() and HMG_UPPER() 
(see source\Unicode_Strings.PRG) for support LowerCase and UpperCase of 
strings in Unicode.

5) I added functions HMG_PADC(), HMG_PADL() and HMG_PADR() 
(see source\Unicode_Strings.PRG) for Unicode string padded.

6) I replaced in the source code: ANSI functions strings with UNICODE/ANSI functions strings equivalent:

UNICODE/ANSI            ANSI Only
------------            ---------
HMG_LEN()         <=>   LEN()
HMG_LOWER()       <=>   LOWER()
HMG_UPPER()       <=>   UPPER()
HMG_PADC()        <=>   PADC()
HMG_PADL()        <=>   PADL()
HMG_PADR()        <=>   PADR()

HB_USUBSTR()      <=>   SUBSTR()
HB_ULEFT()        <=>   LEFT()
HB_URIGHT()       <=>   RIGHT()
HB_UAT()          <=>   AT()
HB_UTF8RAT()      <=>   RAT()
HB_UTF8STUFF()    <=>   STUFF()
Hi all.
This is a new patch for HMG.3.1.1
Best Regards,
Claudio.

PS: In the last patch I forgot the INCLUDE folder.

Code: Select all


1) I fixed the EDIT Control language problem.
2) All messages of HMG are in ANSI and UNICODE.
3) Now is posisible Define/Release at runtime Main / Context / Notify / DropDown Menu

4) I added the following commands / functions (see example):

IsMainMenuDefined ( cFormName )
IsContextMenuDefined ( cFormName )
IsNotifyMenuDefined ( cFormName )
IsDropDownMenuDefined ( cButtonName,  cFormName )

RELEASE MAIN MENU   OF  FormName
RELEASE MAINMENU    OF  FormName   
ReleaseMainMenu  ( cFormName )

RELEASE CONTEXT MENU  OF  FormName
RELEASE CONTEXTMENU   OF  FormName
ReleaseContextMenu ( cFormName )

RELEASE NOTIFY MENU  OF FormName
RELEASE NOTIFYMENU   OF FormName
ReleaseNotifyMenu ( cFormName )

RELEASE DROPDOWN  MENU  BUTTON    ButtonName OF FormName
RELEASE DROPDOWNMENU  OWNERBUTTON  ButtonName OF FormName
ReleaseDropDownMenu ( cButtonName, cFormName )

Attachments
MENU_Dynamic_Demo.rar
(10.29 KiB) Downloaded 581 times
hmg.3.1.1_patch2.rar
(603.32 KiB) Downloaded 602 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
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 »

Thanks Dr.

Best Regards
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2607
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.1.1

Post by danielmaximiliano »

srvet_claudio wrote:
srvet_claudio wrote:Hi All.
I attached a patch for source code of HMG.3.1.1

Best regards,
Claudio.
Hola Claudio: Como siempre muchas gracias por su esfuerzo en las contribuciones para con HMG.

este segundo patch contiene el 1° patch ? sino es asi puede ser un nuevo topico acerca del mismo( Patch para HMG.3.1.1)
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply