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.
#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 ?
#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 ?
Regards,
Erik
I will review the code
You're right, this bug I introduced in a previous patch.