Page 13 of 16

Re: HMG 3.1.1

Posted: Mon Mar 04, 2013 10:59 am
by danielmaximiliano
I think you need a new version HMG, changes on Harbour and many about UTF and languages.

Look ChangeLog.txt 18891 2013-03-03 14:30:58

Re: HMG 3.1.1

Posted: Thu Mar 07, 2013 1:38 am
by quartz565
Thanks you very much Claudio :)

Nikos

Re: HMG 3.1.1

Posted: Sat Mar 09, 2013 10:27 pm
by Mario Mansilla
Hola :
En mi pc tengo instalados tanto la version HMG.3.0.46 como HMG.3.1.1 . Mi sistema funciona perfectamente con ambas versiones . Pero hoy al instalarlo en un cliente (con la version 3.1.1) me encuentro que la siguiente parte del sistema me ocasiona problemas al darme siempre el error "Password inválido" con usuario y clave correctas .

Code: Select all

*----------------------
Function Aceptar_Login()
*----------------------

c_User := Padr(Form_01.Text_1.Value,10)
c_Pass := Padr(Form_01.Text_2.Value,6)

Users->(DbSeek(c_User))

If Found()
   If Encripta(c_Pass) != Users->Clave
      *--
      MsgInfo("Password Invalido","Atencion")
      *--
      Form_01.Text_2.Setfocus
      Return Nil
      *--   
   Endif
Else
   *--
   MsgInfo("Usuario Invalido","Atencion")
   *--
   Form_01.Text_1.Setfocus
   Return Nil
   *--
Endif

c_Nivel := Users->Nivel
c_User  := Users->Usuario

Declare Window Main
Main.StatusBar.Item(2) := "Usuario : " + Users->Nombre
Form_01.Release

Return 
En mi pen drive tenia el instalador de la version de la version 3.0.46 lo instale en la pc del cliente , compile nuevamente y funciono sin problemas .

Si bien HMG.3.1.1 es unicode , no entiendo porque en mi pc funciona sin problemas y en otra me ocasiono este inconveniente . Basicamente esto tambien tendria que haber ocurrido en mi pc .
Mi pc tiene win xp sp2 y la del cliente win xp sp3 con el patch vista inspirat .

La funcion encripta es esta :

Code: Select all

*-------------------------
FUNCTION Encripta(Palabra)
*-------------------------

Local T[50]
Local Salida := ""
Local I := 1

For I = 1 To Len(Palabra)
   *--
   Do Case
      *--
      Case I = 1
         J := 10
      Case I = 2
         J := -8
      .
      .
      Case I = 49
         J := -9
      Case I = 50
         J := 41
      *--
   Endcase
   *--
   T[I] := Chr(Asc(Substr(Palabra,I,1)) + J) 
   *--
Next

      
For I = 1 To Len(Palabra)
  Salida := Salida + T[I]
Next

Return Salida
Saludos .
Mario Mansilla

Re: HMG 3.1.1

Posted: Sat Mar 09, 2013 11:03 pm
by danielmaximiliano
Mario Mansilla wrote:Hola :
En mi pc tengo instalados tanto la version HMG.3.0.46 como HMG.3.1.1 . Mi sistema funciona perfectamente con ambas versiones . Pero hoy al instalarlo en un cliente (con la version 3.1.1) me encuentro que la siguiente parte del sistema me ocasiona problemas al darme siempre el error "Password inválido" con usuario y clave correctas .


Saludos .
Mario Mansilla
Hace tiempo tuve problemas con los Textbox a causa de que el prg fuente estaba escrito en ANSI, fúe el ejemplo que publique sobre Incomming Gmail, el control funcionaba erraticamente a veces pasaba el valor correcto a la otra funcion para el envio.

puedes comprobar que se pierde el contenido introduciendo un MSGBOX(cVariable) y mostrara que esta vacio por eso el error.

solucion : comentar la unica linea de codigo en C:\hmg.3.1.1\SOURCE\SET_COMPILE_HMG_UNICODE.ch
construir de nuevo la libreria con C:\hmg.3.1.1\buildlib.bat
compilar de nuevo con el IDE o Build.bat

Re: HMG 3.1.1

Posted: Sun Mar 10, 2013 12:23 pm
by Mario Mansilla
Hola Daniel :
Muchas gracias .
En este caso ya no seria necesario cambiar mi editor (notepad++) a UTF-8 o UTF-8 without BOM :?

Saludos .
Mario Mansilla

Re: HMG 3.1.1

Posted: Sun Mar 24, 2013 12:25 pm
by majkll_ns
In this example

-------------------------------
#include <hmg.ch>
#include <i_lang.ch>
#include <hbcompat.ch>

Function Main

SET CODEPAGE TO slovenian
SET language TO english

DEFINE WINDOW Form_Main ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'Label' ;
MAIN

@ 50,250 LABEL Label_1 ;
WIDTH 150 HEIGHT 40 ;
VALUE ' '

@ 100,250 LABEL Label_2 ;
WIDTH 150 HEIGHT 40 ;
VALUE ' '

@ 150,250 LABEL Label_3 ;
WIDTH 150 HEIGHT 40 ;
VALUE ' '

@ 200,250 LABEL Label_4 ;
WIDTH 150 HEIGHT 40 ;
VALUE ' '


END WINDOW



select 10
use sr_ini

SR_CH1:=alltrim(sr_ini->p2)
skip 1
SR_CH2:=alltrim(sr_ini->p2)


sr_ch3:= 'Üèd╨cCcC₧Ä'
sr_ch4:= 'τc╨Nz¼åZºª'


Form_Main.Center

Form_main.label_1.value:= sr_ch1
Form_main.label_2.value:= sr_ch2
Form_main.label_3.value:= sr_ch3
Form_main.label_4.value:= sr_ch4

Form_Main.Activate

Return
-------------------------------

I wont to set st_ch3 within program to get same result as with sr_ch1. Same with st_ch4 and sr_ch2.
Meaning, I wont to avoid using sr_ini and get same result.
How can it be done ?

Re: HMG 3.1.1

Posted: Sun Mar 24, 2013 1:14 pm
by Pablo César
majkll_ns wrote:I wont to set st_ch3 within program to get same result as with sr_ch1. Same with st_ch4 and sr_ch2.
Meaning, I wont to avoid using sr_ini and get same result.
How can it be done ?
Even not knowing which language you are using, my advised is to set you prg editor (normally is Notepadd++ from installation) to UTF-8 then correct your string according your local language. This is just to use properly HMG version 3.1.1.

Regarding st_ch3 = st_ch1 and st_ch4 = st_ch2, I suggest to use variables and assign you LABEL property VALUE <name_of_var>

If uses to change value, make a routine to reassign values.

Sorry my friend if I ca't help you better. It is very dificult to understand when samples are in another language. Please can you mention examples in English ?

Re: HMG 3.1.1

Posted: Mon Mar 25, 2013 11:54 pm
by majkll_ns
Pablo César wrote: Even not knowing which language you are using, my advised is to set you prg editor (normally is Notepadd++ from installation) to UTF-8 then correct your string according your local language. This is just to use properly HMG version 3.1.1.

Sorry my friend if I ca't help you better. It is very dificult to understand when samples are in another language. Please can you mention examples in English ?
Thanks.
I'll try to set notepad++.

I use serbian (actualy it is set as SET CODEPAGE TO slovenian ).
My workaruond is to save string to .dbf from which i can use it correctly. I don't know how to set it inside of .prg without
using .dbf. I use pspad as editor and instead of Latin capital letter C with caron (U+010C) i get Latin capital letter C (U+0043). What is the way to define label1:= Latin capital letter C with caron and not depend to editor ?

Re: HMG 3.1.1

Posted: Tue Mar 26, 2013 4:15 am
by Pablo César
May you translate to English dbf records just to make a test. That characters is really very dificult to recognize here in this part of world. Make in English strings, just to give us an idea what you are needing. Because I am still do not understanding what is your problem.

Sorry for not understanding you what you want. But please make a short examples mentioned what you expect with each English strings.

Re: HMG 3.1.1

Posted: Thu Mar 28, 2013 3:40 pm
by Steed
Hi, all

I confirm the issue posted by Mario Mansilla, I have the same problem with text_box controls, they doesn´t return their value, I post some example some days ago
viewtopic.php?f=2&t=2606&start=90

if I follow the advice given by Daniel, comment the line

Code: Select all

//#define COMPILE_HMG_UNICODE 
in C:\hmg\SOURCE\SET_COMPILE_HMG_UNICODE.ch
and recompile again hmg sources , using builalllib.bat.

I have the following errors when I try to compile the example

Code: Select all

Harbour 3.2.0dev (Rev. 18706)
Copyright (c) 1999-2012, http://harbour-project.org/
C:/Ins/hmg/lib/libhmg.a(h_controlmisc.o):h_controlmisc.c:(.data+0x28): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_controlmisc.o):h_controlmisc.c:(.data+0x208): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_windows.o):h_windows.c:(.data+0x38): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_windows.o):h_windows.c:(.data+0x10e8): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_tab.o):h_tab.c:(.data+0x58): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_tab.o):h_tab.c:(.data+0x128): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_grid.o):h_grid.c:(.data+0x68): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_grid.o):h_grid.c:(.data+0xb8): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_button.o):h_button.c:(.data+0x158): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_listbox.o):h_listbox.c:(.data+0x138): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_checkbox.o):h_checkbox.c:(.data+0x148): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_label.o):h_label.c:(.data+0x108): undefined reference to `HB_FUN_HMG_LOWER'
C:/Ins/hmg/lib/libhmg.a(h_textbox.o):h_textbox.c:(.data+0x148): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_textbox.o):h_textbox.c:(.data+0x228): undefined reference to `HB_FUN_HMG_LOWER'
C:/Ins/hmg/lib/libhmg.a(h_textbox.o):h_textbox.c:(.data+0x2b8): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_radio.o):h_radio.c:(.data+0xe8): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_dialogs.o):h_dialogs.c:(.data+0xb8): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_browse.o):h_browse.c:(.data+0xa8): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_browse.o):h_browse.c:(.data+0x948): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_hotkey.o):h_hotkey.c:(.data+0x68): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_combo.o):h_combo.c:(.data+0x78): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_font.o):h_font.c:(.data+0xb8): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_tree.o):h_tree.c:(.data+0xd8): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_status.o):h_status.c:(.data+0x48): undefined reference to `HB_FUN_HMG_UPPER'
C:/Ins/hmg/lib/libhmg.a(h_status.o):h_status.c:(.data+0x58): undefined reference to `HB_FUN_HMG_LEN'
C:/Ins/hmg/lib/libhmg.a(h_timer.o):h_timer.c:(.data+0xa8): undefined reference to `HB_FUN_HMG_UPPER'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe C:/Users/PEC0081/AppData/Local/Temp/hbmk_4268m0.dir/hmg_mysync.o C:/Users/PEC0081/AppData/Local/Temp/hbmk_4268m0.dir/hbmk_e3xb6y.o C:/HMG_MYSYNC/_temp.o    -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lhfcl -lini -lreport -lmsvfw32 -lvfw32 -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbmysql -lmysql -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbfimage -lhbpgsql -lhbnetio -lxhb -lpng -llibhpdf -lhbvpdf -lhbziparc -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib   -Wl,--end-group -oHMG_MySync.exe  -LC:/Ins/hmg/harbour/lib/win/mingw -LC:/Ins/hmg/lib

hbmk2: Error: Referenced, missing, but unknown function(s): HMG_UPPER(),
       HMG_LEN(), HMG_LEN(), HMG_UPPER(), HMG_LEN(), HMG_UPPER(), HMG_LEN(),
       HMG_UPPER(), HMG_UPPER(), HMG_LEN(), HMG_LEN(), HMG_LOWER(), HMG_LEN(),
       HMG_LOWER(), HMG_UPPER(), HMG_LEN(), HMG_LEN(), HMG_LEN(), HMG_UPPER(),
       HMG_LEN(), HMG_LEN(), HMG_LEN(), HMG_LEN(), HMG_UPPER(), HMG_LEN(),
       HMG_UPPER()
I had applied the source patch : HMG.3.1.1_SOURCE_patch(2013-03-03), and the last updated of HMG_UNICODE_H given by Claudio in their example Set_Version_IDE

I think we have to wait for some help of our friend Claudio


Regards,

Ed