Page 16 of 20

Re: HMG 3.4.1

Posted: Mon Aug 10, 2015 3:15 pm
by esgici
Clip2Mania wrote: Maybe Dr. Soto can help - if he reads this?
Hopefully yes :) ( Don't forget time zone difference ;) )
I only started working with version 3.4.0 last year, so I have no experience with older versions of HMG - and I really want to use 3.4.1 for the bug-fixes and new functions... :(
OK. My opinion is behavior of 3.4.1 is correct.

Anyway I will try with older versions and inform the result.

Happy HMG'ing :D

Re: HMG 3.4.1 - Order of Controls

Posted: Mon Aug 10, 2015 4:23 pm
by srvet_claudio
Clip2Mania wrote:Hi,

when I compile following code in 3.4.0 everything works fine.

Code: Select all


#include "hmg.ch"

function main()
local aHeaders:={'Column1','Column2','Column3'}
public aList:={}

SET MULTIPLE OFF WARNING
SET DATE ITALIAN

DEFINE WINDOW MainForm;
	AT 90,90;
	WIDTH 1025;
	HEIGHT 550;
       TITLE 'Resize Error';
	MAIN;
	ON SIZE Resize();
	ON MAXIMIZE Resize()
	
DEFINE MAIN Menu of MainForm
   DEFINE POPUP "File"
	MENUITEM "About" ACTION MsgInfo("Action")
   END POPUP
	END MENU

	@ 005,005 GRID Grid_1    ;
                 WIDTH 1000 HEIGHT 490 ;
		 HEADERS aHeaders;
	         WIDTHS {300,300,300}  ;
		 ITEMS aList  	;
		 VALUE 1;
		 FONT "Courier New" SIZE 10 ;	
		 FONTCOLOR {000,000,255}; 
                 EDIT;
		 CELLNAVIGATION;
		 LOCKCOLUMNS 1
	
END WINDOW       
MainForm.Center
MainForm.Activate

return NIL
//-----------------------
function Resize()
MainForm.Grid_1.Width:=MainForm.Width-25
MainForm.Grid_1.Height:=MainForm.Height-60

rturn NIL
//----------------------
-
When I compile this code in 3.4.1 (+ patch 3), I get a runtime-error that the "form is not defined"?
When I change the order of the Controls, i.e. I put the grid as first Control, followed by the menu, I get no error.
When I add a status-bar control, I have to put it below the grid also, otherwise: error again.

This has changed in comparison with 3.4.0. ??? Is there an order in which you have to place the controls ? :o

Regards,
Erik
I will review the code

Re: HMG 3.4.1

Posted: Mon Aug 10, 2015 8:16 pm
by esgici
esgici wrote: I will try with older versions and inform the result.
Tried ( with HMG 3.0.46, 3.1.5, 3.2, 3.3.0, and 3.3.1 ) all results are same as 3.4.0 :arrow:
My opinion is behavior of 3.4.1 is correct.
I gave up that idea :oops:

Happy HMG'ing :D

Re: HMG 3.4.1 - Order of Controls

Posted: Tue Aug 11, 2015 2:25 am
by srvet_claudio
srvet_claudio wrote:
Clip2Mania wrote:Hi,

when I compile following code in 3.4.0 everything works fine.

Code: Select all


#include "hmg.ch"

function main()
local aHeaders:={'Column1','Column2','Column3'}
public aList:={}

SET MULTIPLE OFF WARNING
SET DATE ITALIAN

DEFINE WINDOW MainForm;
	AT 90,90;
	WIDTH 1025;
	HEIGHT 550;
       TITLE 'Resize Error';
	MAIN;
	ON SIZE Resize();
	ON MAXIMIZE Resize()
	
DEFINE MAIN Menu of MainForm
   DEFINE POPUP "File"
	MENUITEM "About" ACTION MsgInfo("Action")
   END POPUP
	END MENU

	@ 005,005 GRID Grid_1    ;
                 WIDTH 1000 HEIGHT 490 ;
		 HEADERS aHeaders;
	         WIDTHS {300,300,300}  ;
		 ITEMS aList  	;
		 VALUE 1;
		 FONT "Courier New" SIZE 10 ;	
		 FONTCOLOR {000,000,255}; 
                 EDIT;
		 CELLNAVIGATION;
		 LOCKCOLUMNS 1
	
END WINDOW       
MainForm.Center
MainForm.Activate

return NIL
//-----------------------
function Resize()
MainForm.Grid_1.Width:=MainForm.Width-25
MainForm.Grid_1.Height:=MainForm.Height-60

rturn NIL
//----------------------
-
When I compile this code in 3.4.1 (+ patch 3), I get a runtime-error that the "form is not defined"?
When I change the order of the Controls, i.e. I put the grid as first Control, followed by the menu, I get no error.
When I add a status-bar control, I have to put it below the grid also, otherwise: error again.

This has changed in comparison with 3.4.0. ??? Is there an order in which you have to place the controls ? :o

Regards,
Erik
I will review the code
You're right, this bug I introduced in a previous patch.

This a new patch with fixed bug.

Re: HMG 3.4.1 - Order of Controls

Posted: Tue Aug 11, 2015 3:03 am
by esgici
srvet_claudio wrote:...

You're right, this bug I introduced in a previous patch.

This a new patch with fixed bug.
Thanks Doc, problem solved :arrow:

Viva HMG :D

Re: HMG 3.4.1

Posted: Tue Aug 11, 2015 4:08 am
by Rathinagiri
Thank you Claudio. The patch file is updated in the download page also. :)

Re: HMG 3.4.1

Posted: Tue Aug 11, 2015 4:11 am
by bpd2000
Rathinagiri wrote:Thank you Claudio. The patch file is updated in the download page also. :)
+1

Re: HMG 3.4.1

Posted: Tue Aug 11, 2015 5:57 am
by mol
I can see a lot of news here.
I'll have a lot of work after return from vacation :-)
Regards, Marek

Re: HMG 3.4.1

Posted: Tue Aug 11, 2015 6:08 am
by Clip2Mania
Thanks Claudio!
Erik

Re: HMG 3.4.1

Posted: Tue Aug 11, 2015 5:40 pm
by EduardoLuis
Thanks Claudio
Eduardo