Page 15 of 20

Re: HMG 3.4.1

Posted: Thu Aug 06, 2015 10:55 pm
by klauskugel
Thanks Doc,
you're the greatest.

That should solve the probs.

Greetings from Germany
klauskugel

Re: HMG 3.4.1

Posted: Fri Aug 07, 2015 8:04 am
by serge_girard
Thanks Claudio !

Serge

Re: HMG 3.4.1

Posted: Sat Aug 08, 2015 10:47 am
by dragancesu
I tried a demo for SQLite, build demo.hbp fault occurs,
then I added a line sqlite.hbc in demo.hbp and build demo.hbp make compilation

demo from \hmg.3.4.1\samples\hfcl\sql\sqlite

hmg version 3.4.1 patch 3

Re: HMG 3.4.1

Posted: Sat Aug 08, 2015 1:43 pm
by danielmaximiliano
HI Dragan :

It works on 64-bit Windows 10, HMG.3.4.1 patch 3 and compiled in 32 bits

Re: HMG 3.4.1 - Order of Controls

Posted: Mon Aug 10, 2015 6:08 am
by Clip2Mania
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

return 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

Re: HMG 3.4.1

Posted: Mon Aug 10, 2015 7:29 am
by serge_girard
Order of the Controls is often giving compile errors.
I don't have a sample at this moment.

Serge

Re: HMG 3.4.1 - Order of Controls

Posted: Mon Aug 10, 2015 11:46 am
by esgici
Clip2Mania wrote:...
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
Hi Erik
IMO you need something like this :

Code: Select all

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

lFirstRun := .T.                     // <--- added 

...

function Resize()

IF lFirstRun
   lFirstRun := .F.
ELSE
   MainForm.Grid_1.Width:=MainForm.Width-25
   MainForm.Grid_1.Height:=MainForm.Height-60
ENDIF   
   
return NIL
So, the problem isn't related to "control order" but "execution order"

But it's strange how this code running without error when compiled with 3.4.0 :? ( Tried and confirmed )

Happy HMG'ing :D

Re: HMG 3.4.1

Posted: Mon Aug 10, 2015 1:54 pm
by Clip2Mania
Esgici,

that is indeed a workaround, but how come if I place the controls in another order it works (in 3.4.0, all combinations work)... ?
So the order of the controls does matter.

More specifically, all my programs have a resize function, which also resizes the grid - so I have to change everything now...

Regards,
Erik

Re: HMG 3.4.1

Posted: Mon Aug 10, 2015 2:13 pm
by esgici
Clip2Mania wrote:... how come if I place the controls in another order it works (in 3.4.0, all combinations work)... ?
This is really a big ( a bit academic :? ) question for me; definitely I don't know the answer :(
So the order of the controls does matter.
Apparently yes; and reason this effect too is also obscure for me :(
More specifically, all my programs have a resize function, which also resizes the grid - so I have to change everything now...
Did you tried with pre-3.4.0 verisons ?

Happy HMG'ing :D

Re: HMG 3.4.1

Posted: Mon Aug 10, 2015 2:31 pm
by Clip2Mania
This is really a big ( a bit academic :? ) question for me; definitely I don't know the answer :(
Maybe Dr. Soto can help - if he reads this?
Did you tried with pre-3.4.0 verisons ?
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... :(

Regards,
Erik