Bug character in file name

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Bug character in file name

Post by esgici »

danielmaximiliano wrote: La función Directory acepta los comodines "*" y "?" para reemplazar todo o parte de "Palabras" para hacer referencia al nombre o extesiónes de archivos.
Ejemplo :
aLanguaje :=Directory("C:\Myprogram\espa?ol.lng")

aqui funciona correctamente el siguiente codigo.
Google Translate wrote:Directory function accepts wildcards "*" and "?" to replace all or part of "Words" to reference the file name or extesiónes.
example:
aLanguaje: = Directory ("C: \ myprogram \ space? ol.lng")

here the following code works correctly.
Gracias Daniel :)

I will try it :arrow:

Saludos

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: Bug character in file name

Post by IMATECH »

Hi Esgici !



I tell "components": Forms, Buttons, Menus and other objects (in HMG pseudo-objects)...

HB_CDPSELECT() same as HB_SETCODEPAGE()



Hello Ronaldo

Thanks, I didn't know this "components" ( HB_CDPSELECT( ) ... ) :(

...



Best regards...
M., Ronaldo

By: IMATECH

Imation Tecnologia
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Bug character in file name

Post by esgici »

Hi Ronaldo

Thanks to clarification :)

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Bug character in file name

Post by esgici »

Hi Friends

:D Finally, problem found :!:

Thanks to all interested friends :)

In the above sixth program guilty line is :

Code: Select all

CP_Test.Activate()

When it changed to :

Code: Select all

ACTIVATE WINDOW CP_Test
program backed out from "quietly abend" :D

The puzzling is, as soon as I seen,

Code: Select all

<FormName>.Activate
command causing this problem ONLY when my language / codepage has been set :?

Any idea :?:

Regards, saludos.

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Bug character in file name

Post by esgici »

Sadly NO; problem not solved, solution is for only one situation :cry:

My little sample "Dynamic ComboBox" too doesn't work properly when language / codepage set :cry:

Beside understand, I can't imagine the problem :!: :?:

How a relation may be between language /code page setting and random sections of GUI library :?:

Now I have only one option : returning previous version ( 3.40.0 ) of HMG :cry:

Regards

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Bug character in file name

Post by danielmaximiliano »

esgici wrote:Sadly NO; problem not solved, solution is for only one situation :cry:

My little sample "Dynamic ComboBox" too doesn't work properly when language / codepage set :cry:

Beside understand, I can't imagine the problem :!: :?:

How a relation may be between language /code page setting and random sections of GUI library :?:

Now I have only one option : returning previous version ( 3.40.0 ) of HMG :cry:

Regards

--

Esgici
Hola Esgici:
puede ud. subir un ejemplo que use los archivos de lenguajes, intentare ver que sucede con hmg.3.0.41
realmente aqui no uso otro lenguaje que no sea español/latino y las aplicaciones ejemplos que suben en el foro no presentan ningun inconveniente al compilar en mi maquina.
(Lease traduccion)

Google Translate :

Hello Esgici:
can up an example that uses the language files, will try to see what happens to hmg.3.0.41
here do not really use another language than Spanish / Latino and applications examples that come up in the forum do not have any problem to compile on my machine.
(reads translations)
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

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

Re: Bug character in file name

Post by esgici »

Thanks to interest, Daniel

Here the example :

Code: Select all

/*
   HMG Dynamic ComboBox Demo

   (c) 2008 Bicahi Esgici
   
*/

#include <hmg.ch>
        
#define CMBMAXITCOUNT 10

REQUEST HB_LANG_TRWIN 
REQUEST HB_CODEPAGE_TRWIN
  
Function Main

   SET( _SET_CODEPAGE, "TRWIN" ) // REM this line for see how must run the program

   PRIV aSrcStrgs := { '' }
    
   DEFINE WINDOW Form_1 ;
        AT 0,0 ;
        WIDTH 400 ;
        HEIGHT 200 ;
        TITLE 'Dynamic ComboBox Demo' ;
        MAIN

      ON KEY ESCAPE ACTION Form_1.Release

        @ 10,10 COMBOBOX Combo_1 ;
            WIDTH  200  ;
            HEIGHT 200 ;
            ITEMS aSrcStrgs ;
            VALUE 1 ;
            DISPLAYEDIT ;
            ON LOSTFOCUS DynCmbDone() ;
            ON ENTER  DynCmbDone() ;
            DROPPEDWIDTH 250
            
        @ 10,230 TEXTBOX txbDummy         // For forcing combo to lostfocus
            
    END WINDOW

    CENTER WINDOW Form_1

    ACTIVATE WINDOW Form_1

RETURN // Main()

*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._


PROC DynCmbDone()

   IF Form_1.Combo_1.Value == 0 .AND. !EMPTY( Form_1.Combo_1.DisplayValue )       
      IF LEN( aSrcStrgs ) <= CMBMAXITCOUNT
         AADD( aSrcStrgs,  )
      ENDIF    
      AINS( aSrcStrgs, 1 )
      aSrcStrgs[ 1 ] := ''
      aSrcStrgs[ 2 ] := Form_1.Combo_1.DisplayValue
      Form_1.Combo_1.DeleteAllItems()
      AEVAL( aSrcStrgs, { | c1 | Form_1.Combo_1.AddItem( c1 ) } )
      Form_1.Combo_1.Value := 2
   ENDIF   

RETU // DynCmbDone()

*-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._
Thanks in advance,

Saludos

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2763
Joined: Fri Apr 09, 2010 4:53 pm
DBs Used: DBF
Location: Argentina
Contact:

Re: Bug character in file name

Post by danielmaximiliano »

esgici wrote:
Now I have only one option : returning previous version ( 3.40.0 ) of HMG :cry:

Regards

--

Esgici
Hola Esgici: Todavia no puedo encontrar el error, ya instale las previas versiones HMG.3.0.40 y HMG.3.0.39 y "Dynamic ComboBox" no trabaja con estas lineas.

Code: Select all

unction Main

   SET( _SET_CODEPAGE, "TRWIN" ) // REM this line for see how must run the program

   PRIV aSrcStrgs := { '' }
zhmg_2012-07-06_20-56-20.jpg
zhmg_2012-07-06_20-56-20.jpg (117.29 KiB) Viewed 2970 times
Igual estoy sigo mirando.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

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

Re: Bug character in file name

Post by esgici »

Hola Daniel

Thanks again to your valuable interest; valuable, because no anyone interested other than you :(

You are right,

Code: Select all

SET( _SET_CODEPAGE, "TRWIN" ) 
is causing problem in old versions too.

As far as I know, Harbour introduced to UT8 with version 3.0 ( actually it is in 3.1 or higher ) and our HMG begun use this version with HMG 3.0.41.

Until this, we haven't any problem with file names included local characters, and with this big innovation we must set our local language for acquire correct file name within our Harbour / HMG programs.

My problem is that, whenever (with last or old versions) I set my own language ( TRWIN ) some understandable things occurs: <WindowName>.Activate command is causing immediate, unexpected and quiet end of program; and as you see in Dynamic Combobox,
program doesn't run as expected due to unknown reason(s) :(

So I don't know when and where will occurs same problem :cry:

When I return to previous version, I don't must set my language and no problem come upon.

As I already cited, I'm impotent to understand

- why we must set our language for acquire correct file names; ( every program / application automatically detect local language setting within OS installation and use that language if necessary) ?

- what relation may be between language setting and some random section of GUI library ?

That is all my brother, again thanks to your interest to my problem.

Saludos

--

Esgici
Viva INTERNATIONAL HMG :D
User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: Bug character in file name

Post by IMATECH »

Hello Esgici !

I think this link would be usefull to you

https://docs.google.com/document/d/1ihs ... -BYJo/edit


Credits: Massimo Belgrano
M., Ronaldo

By: IMATECH

Imation Tecnologia
Post Reply