HMG 3.3.1 (Stable)

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

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

Re: HMG 3.3.1 (Stable)

Post by srvet_claudio »

Pablo César wrote:I made this test:

Code: Select all

#include <hmg.ch>

Function Main()
MsgInfo(GetCurrentFolder())
Return Nil
This display the current folder. This ok.

But when I try with this:

Code: Select all

#include <hmg.ch>

Function Main()
cLogFile:=GetFile( { {'Error','*.log'},{'Build','*.log'} }, "Open building log error" ) /* need to be selected file at another folder */

MsgInfo(GetCurrentFolder())
Return Nil
Then I receive display of another folder (same it was choosen at GetFile), not displaying the current folder... :shock: :o

So I have to use cFilePath( ExeName() ) to ensure the correct result for el CurrentFolder. :(

I do not know if this behaviour is normal or it is a bug in GetFile function.

Is this normal Claudio ?
Hi Pablo,


GetFile ( acFilter ,
cTitle ,
cDefaultPath ,
lMultiSelect ,
lNoChangeDir , // for default is .F.
nFilterIndex ) --> SelectedFileName(s)
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: 182 times

Post by Pablo César »

srvet_claudio wrote:
Pablo César wrote:I made this test:

Code: Select all

#include <hmg.ch>

Function Main()
MsgInfo(GetCurrentFolder())
Return Nil
This display the current folder. This ok.

But when I try with this:

Code: Select all

#include <hmg.ch>

Function Main()
cLogFile:=GetFile( { {'Error','*.log'},{'Build','*.log'} }, "Open building log error" ) /* need to be selected file at another folder */

MsgInfo(GetCurrentFolder())
Return Nil
Then I receive display of another folder (same it was choosen at GetFile), not displaying the current folder... :shock: :o

So I have to use cFilePath( ExeName() ) to ensure the correct result for el CurrentFolder. :(

I do not know if this behaviour is normal or it is a bug in GetFile function.

Is this normal Claudio ?
Hi Pablo,


GetFile ( acFilter ,
cTitle ,
cDefaultPath ,
lMultiSelect ,
lNoChangeDir , // for default is .F.
nFilterIndex ) --> SelectedFileName(s)
Thank you Claudio !

I've been omitting 4, 5 and 6 parameters and IMHO this 5th parameter should not be false as default, must be true.

More one item for missing info at hmgdoc.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein

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

Post by srvet_claudio »

mol wrote:My clients say my application is very slow after last release.
It's caused of GRID control, I think.
A lot of variants causes this control is slow. Maybe leak of memory? I can't find where real problem lays.

Is it the way to build simplified grid control to speed up browsing dbf tables?

Everything worked fine in hmg 3.2 or even 3.3.0.
I can't roll up to old hmg because of pdf generating.
Hi all,

change in SOURCE\c_grid.c (line 126):
ListView_SetExtendedListViewStyle ( hbutton, (hb_parl(9) ? 0 : LVS_EX_GRIDLINES) | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER | LVS_EX_SUBITEMIMAGES );
for this line:
ListView_SetExtendedListViewStyle ( hbutton, (hb_parl(9) ? 0 : LVS_EX_GRIDLINES) | LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES );
and rebuild lib.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

User avatar
dragancesu
Posts: 829
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 30 times
Been thanked: 234 times

Post by dragancesu »

Subscribe to this thread and I tried to make this correction, but no such line

Can someone please put a link to the current version of HMG, which includes all patch?

Thanks

User avatar
mol
Posts: 3495
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 289 times
Been thanked: 197 times
Contact:

Post by mol »

I've applied changes to hpg, rebuilt app and asked client for testing.
When I get response, I'll post about results.
Many thanks, Claudio!

User avatar
mol
Posts: 3495
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 289 times
Been thanked: 197 times
Contact:

Post by mol »

dragancesu wrote:Subscribe to this thread and I tried to make this correction, but no such line

Can someone please put a link to the current version of HMG, which includes all patch?

Thanks
You can download whole hmg 3.3.1 library with all patches from my ftp:
http://www.marekolszewski.info/hmg/hmg_20141218.zip

User avatar
mol
Posts: 3495
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 289 times
Been thanked: 197 times
Contact:

Post by mol »

srvet_claudio wrote:
mol wrote:I found strange behaviour of virtual grid - OnQueryData is fired everytime when mouse moves over grid - without changing anything. Is it right?
Try this little sample:

Code: Select all

/*
* HMG Virtual Grid Demo
* (c) 2003 Roberto Lopez
*/

#include "hmg.ch"

Function Main
	private nCounter := 0
	
	DEFINE WINDOW Form_1 ;
		AT 0,0 ;
		WIDTH 450 ;
		HEIGHT 400 ;
		TITLE 'Grid test' ;
		MAIN 

		DEFINE MAIN MENU
		
		@ 10,10 GRID Grid_1 ;
		WIDTH 170 ;
		HEIGHT 330 ;
		HEADERS {'Column 1'} ;
		WIDTHS {140};
		VIRTUAL ;
		ITEMCOUNT 3 ;
		ON QUERYDATA QueryTest() 
		
		@ 10,200 Label L1 ;
			Width 200 ;
			Height 20 ;
			value "Count of QueryData"
		@ 30,200 TEXTBOX Counter ;
			Width 100 ;
			Height 20 ;
			NUMERIC
			value 0

	END WINDOW

	CENTER WINDOW Form_1

	ACTIVATE WINDOW Form_1

Return

Procedure QueryTest()

	This.QueryData := Str ( This.QueryRowIndex )
	//msgdebug("Row is: "+ Str ( This.QueryRowIndex ))

	Form_1.Counter.Value := ++nCounter
Return
Hi Marek
Yes it is normal, it is the Window System that calls OnQuery "when necessary".
It's strange construction in my opinion, but, not for eliminating, I think

Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar »

Hola a todos,

Quiero poner la propiedad transparente en el control RadioGroup y no lo logro.

Alguna idea?

Saludos
///////////////////////////////////////////////////////////////////////////////
Hello everyone,

I want to put the transparent property in the RadioGroup control and I fail.

Any ideas?

regards

Code: Select all

/*
 * HMG - Harbour Win32 GUI library Demo
 *
 * Copyright 2002-2008 Roberto Lopez <mail.box.hmg@gmail.com>
 * http://www.hmgforum.com//
*/

#include "hmg.ch"

Function Main

   DEFINE WINDOW Form_1 ;
      AT 0,0 ;
      WIDTH 640 HEIGHT 480 ;
      TITLE 'HMG Demo' ;
      ICON 'DEMO.ICO' ;
      MAIN ;
      BACKCOLOR BLUE;
      FONT 'Arial' SIZE 10 

      DEFINE MAIN MENU 
         POPUP 'M&isc'
            ITEM 'Set RadioGroup 1 ReadOnly Property To {.T.,.T.,.T.,.T.}'   ACTION Form_1.Radio_1.ReadOnly := { .T. , .T. , .T. , .T. }
            ITEM 'Set RadioGroup 1 ReadOnly Property To {.F.,.F.,.F.,.F.}'   ACTION Form_1.Radio_1.ReadOnly := { .F. , .F. , .F. , .F. }
            ITEM 'Set RadioGroup 1 ReadOnly Property To {.F.,.T.,.F.,.T.}'   ACTION Form_1.Radio_1.ReadOnly := { .F. , .T. , .F. , .T. }
            SEPARATOR
            ITEM 'Set RadioGroup 2 ReadOnly Property To {.T.,.T.,.T.,.T.}'   ACTION Form_1.Radio_2.ReadOnly := { .T. , .T. , .T. , .T. }
            ITEM 'Set RadioGroup 2 ReadOnly Property To {.F.,.F.,.F.,.F.}'   ACTION Form_1.Radio_2.ReadOnly := { .F. , .F. , .F. , .F. }
            ITEM 'Set RadioGroup 2 ReadOnly Property To {.T.,.T.,.T.,.T.}'   ACTION Form_1.Radio_2.ReadOnly := { .F. , .T. , .F. , .T. }
            SEPARATOR
            ITEM 'Get RadioGroup 1 ReadOnly Property'   ACTION MsgInfo ( LogicalArrayToString ( Form_1.Radio_1.ReadOnly ) )
            ITEM 'Get RadioGroup 2 ReadOnly Property'   ACTION MsgInfo ( LogicalArrayToString ( Form_1.Radio_2.ReadOnly ) )
         END POPUP
      END MENU

      DEFINE RADIOGROUP Radio_1 
         OPTIONS   { 'One' , 'Two' , 'Three', 'Four' } 
         VALUE   1 
         WIDTH   100 
         TOOLTIP   'RadioGroup' 
         READONLY { .F. , .T. , .F. , .T. }
         ROW   10
         COL   10
         TRANSPARENT .T.
      END RADIOGROUP
         
      DEFINE RADIOGROUP Radio_2 
         ROW 10
         COL 150
         OPTIONS { 'One' , 'Two' , 'Three', 'Four' } 
         VALUE 1 
         WIDTH 100 
         TRANSPARENT .T.
         TOOLTIP 'RadioGroup' 
         READONLY { .F. , .T. , .F. , .T. }
         HORIZONTAL .T.
      END RADIOGROUP

      @ 150,10 DATEPICKER Date_1 ;
      VALUE CTOD('  / /  ') ;
      TOOLTIP 'DatePicker Control' 

   END WINDOW

   Form_1.date_1.SetFocus

   Form_1.Center

   Form_1.Activate

Return Nil

Function LogicalArrayToString ( lArray )
Local RetVal := '{ ' , I

   For I := 1 To Len ( lArray )

      If lArray [I]
         RetVal := RetVal + ' ".T." '
      Else
         RetVal := RetVal + ' ".F." '
      EndIf

   Next I

Return RetVal + ' }'

Modify: C:\hmg.3.3.1\SAMPLES\Controls\RadioGroup\RADIOGROUP_5

Javier Tovar
Posts: 1275
Joined: Tue Sep 03, 2013 4:22 am
Location: Tecámac, México
Has thanked: 1 time
Been thanked: 2 times

Post by Javier Tovar »

Hola a todos,

Estoy tratando de cambiar el color de fondo y la letra de un TextBox en tiempo de ejecución, el control tiene la propiedad "ReadOnly .T." y no lo logro. :(

Code: Select all

		
		CASE nOpcion = 6
			ColorGets := aColorSelect
			Colores.TextBox_3.ReadOnly := .F.
*			Colores.TextBox_3.DisabledFontColor := aColorSelect
			SetProperty ( 'Colores' , 'TextBox_3' , 'DisabledFontColor' , aColorSelect )
			Colores.TextBox_3.ReadOnly := .T.
			Actualiza()
		CASE nOpcion = 7
			ColorGets := aColorSelect
			Colores.TextBox_3.ReadOnly := .F.
			SetProperty ( 'Colores' , 'TextBox_3' , 'DisabledBackColor' , aColorSelect )
			Colores.TextBox_3.ReadOnly := .T.
			Actualiza()					
Tambien observo que si utilizo la sentencia:

Code: Select all

Colores.TextBox_3.DisabledFontColor := aColorSelect
Me da el siguiente error:

Code: Select all

Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/

C:\hmg.3.3.1\Mios\Colores\Main.Prg(1148) Error E0030  Syntax error "syntax error at '.'"

1 error
Tambien observo que el textbox en su información de control tiene:

DEFINE TEXTBOX <Controlname>
READONLY <lValue>
DISABLEDBACKCOLOR <aDisabledBackColor>
DISABLEDFONTCOLOR <aDisabledFontColor>

END TEXTBOX

y que sus propiedades tiene:

Code: Select all

     - FontColor
      - DisabledBackColor
      - DisabledFontColor
      - CaretPos
      - ReadOnly
      - Name (R)
      - TabStop (D)
      - Field (D)
      - Parent (D)
      - InputMask (D)
      - Format (D)
      - MaxLength (D)
      - RightAlign (D)
      - HelpId (D)
      - CaseConvert (D)
      - DataType (D)
Las cuales: ReadOnly, DisabledBackColor y DisabledFontColor se pueden cambiar en tiempo de ejecución y no lo hace.

Tambien observo que la documentación para ReadOnly no es clara, solo tiene:

Code: Select all

Syntax:
 
ReadOnly <lValue>
Lo cual intuyo yo que debería ser:

Code: Select all

Syntax:
 
ReadOnly  <lValue> (Control Definition)
 
<WindowName>.<ControlName>.ReadOnly :=  lValue
 
<WindowName>.<ControlName>.ReadOnly -->  lValue
This should be specified as a three element numeric array containing red, green and blue components.
Y también la propiedad: DisabledBackColor tiene el mismo problema.

Code: Select all

Syntax:
 
DisabledBackColor <anColor>
 
Must be specified as a three elements numeric array containing red, green and blue components
Se que es mucho trabajo, es un trabajo gigante, pero creo en mi humilde opinión, se debería avanzar concluyendo con cosas solidas, ya que me desanimo en seguir mi proyecto teniendo tantos tropiezos, yo creo que ya no deberían de existir estas cosas sin resolver o solo a mi me pasa?, acabo de revisar máquina, volvi a cargar HMG y último parche y todo igual.

Saludos

P.D.: Y no lo digo solo por mi, sino por todos los que empezamos con HMG.


//////////////////////////////////////////////////////////////////////////////////////////////////////////////

Hello everyone,

I'm trying to change the background color and font of a TextBox at run time, the control has the property "ReadOnly .T." and I fail. :(

Code: Select all

CASE nOpcion = 6
ColorGets: = aColorSelect
Colores.TextBox_3.ReadOnly: = .F.
* Colores.TextBox_3.DisabledFontColor: = aColorSelect
SetProperty ('Colors', 'TextBox_3', 'DisabledFontColor' aColorSelect)
Colores.TextBox_3.ReadOnly: = .T.
Refresh ()
CASE nOpcion = 7
ColorGets: = aColorSelect
Colores.TextBox_3.ReadOnly: = .F.
SetProperty ('Colors', 'TextBox_3', 'DisabledBackColor' aColorSelect)
Colores.TextBox_3.ReadOnly: = .T.
Refresh ()
Also I notice that if I use the sentence:

Code: Select all

 Colores.TextBox_3.DisabledFontColor: = aColorSelect 
I get the following error:

Code: Select all

 Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/

C:\hmg.3.3.1\Mios\Colors\Main.prg (1148) E0030 Error Syntax error "syntax error at '.'"

1 error 
I also note that the textbox in its control information is:

   DEFINE TEXTBOX <controlname>
             READONLY <lValue>
              DisabledBackColor <aDisabledBackColor>
             DISABLEDFONTCOLOR <aDisabledFontColor>

   END TEXTBOX

and that their properties have:

Code: Select all

 - FontColor
       - DisabledBackColor
       - DisabledFontColor
       - caretPos
       - ReadOnly
       - Name (R)
       - TabStop (D)
       - Field (D)
       - Parent (D)
       - InputMask (D)
       - Format (D)
       - MaxLength (D)
       - RightAlign (D)
       - HelpID (D)
       - CaseConvert (D)
       - DataType (D) 
Which: ReadOnly, DisabledFontColor DisabledBackColor and can be changed at runtime and does not.

I also note that the documentation for ReadOnly is unclear, simply:

Code: Select all

 Syntax:
 
ReadOnly <lValue> 
Which I can sense it should be:

Code: Select all

 Syntax:
 
ReadOnly <lValue> (Control Definition)
 
<WindowName> <ControlName> .ReadOnly:. = lValue
 
<WindowName> <ControlName> .ReadOnly -.> lValue
This should be specified as a numeric array element container containing three red, green and blue components. 
And the property: DisabledBackColor has the same problem.

Code: Select all

 Syntax:
 
DisabledBackColor <anColor>
 
Must be specified as a numeric array elements container containing three red, green and blue components 
I know it's hard work, is a giant work, but I believe in my humble opinion, should move concluding with solid things because I get discouraged to continue my project having so smoothly, I think it does not should be these things unresolved or only happens to me ?, I just checked machine turned refresh HMG and last patch and all the same.

regards

PS: And do not say just for me but for all those who started with HMG.

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

Post by srvet_claudio »

mol wrote:My clients say my application is very slow after last release.
It's caused of GRID control, I think.
A lot of variants causes this control is slow. Maybe leak of memory? I can't find where real problem lays.

Is it the way to build simplified grid control to speed up browsing dbf tables?

Everything worked fine in hmg 3.2 or even 3.3.0.
I can't roll up to old hmg because of pdf generating.
Hi Friends,
please test the GRID behavior with this new patch (is more fast):
Attachments
HMG.3.3.1_patch6.rar
(2.5 MiB) Downloaded 520 times
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com

Post Reply