HMG 3.1.1

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
danielmaximiliano
Posts: 1981
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 12 times
Been thanked: 8 times
Contact:

Re: HMG 3.1.1

Post by danielmaximiliano » Thu Mar 28, 2013 4:26 pm

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 3514 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 3514 times
This is the search functions in Changelog.txt, at the end of the text are dated 1999.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp / Telegrams To cel +54 011 690 26 142

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

Post by Steed » Thu Mar 28, 2013 5:02 pm

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: 1981
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 12 times
Been thanked: 8 times
Contact:

Post by danielmaximiliano » Thu Mar 28, 2013 10:39 pm

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

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp / Telegrams To cel +54 011 690 26 142

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

Post by Steed » Thu Mar 28, 2013 10:52 pm

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

Post by melliott42 » Fri Mar 29, 2013 11:08 am

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: 2668
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 69 times
Been thanked: 24 times
Contact:

Post by mol » Fri Mar 29, 2013 12:35 pm

I don't need unicode and I'm still using hmg 3.0.46.
Works perfect!

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

Post by srvet_claudio » Tue Apr 02, 2013 2:14 am

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: 1904
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Has thanked: 25 times
Been thanked: 81 times
Contact:

Post by srvet_claudio » Tue Apr 02, 2013 6:18 pm

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

User avatar
esgici
Posts: 4264
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 140 times
Been thanked: 54 times
Contact:

Post by esgici » Tue Apr 02, 2013 7:45 pm

Thanks Dr.

Best Regards
Viva INTERNATIONAL HMG :D

User avatar
danielmaximiliano
Posts: 1981
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 12 times
Been thanked: 8 times
Contact:

Post by danielmaximiliano » Tue Apr 02, 2013 10:24 pm

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

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp / Telegrams To cel +54 011 690 26 142

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests