Re: HMG 3.0.28
Posted: Sat Apr 03, 2010 5:50 pm
Hello Roberto,
I am facing problem regarding refresh method of grid. I compiled and ran some code with ver 3.0.27 without any problem. But it gives error with 3.0.28. I created a small sample to show the error. Please compile following code and run. Please click on "Calculate" button more than 2 or 3 times to see the problem.
Problem is that, I tested the code with 3.0.27 and installed the app in my client's place, and today when I made a small change at client's place, I didn't check for the grid refresh method (it's my fault
) and after returning home, I noticed the error.
Most probably I made some mistakes in my code.
But, when I compiled it with HMG 3.0.27 again, it worked fine
Thanks in advance
With best regards.
Sudip
I am facing problem regarding refresh method of grid. I compiled and ran some code with ver 3.0.27 without any problem. But it gives error with 3.0.28. I created a small sample to show the error. Please compile following code and run. Please click on "Calculate" button more than 2 or 3 times to see the problem.
Code: Select all
#include <hmg.ch>
REQUEST SQLMIX
Function Main()
local adbf := {}
local cCtrl := {"TEXTBOX", "CHARACTER"}, iCtrl := {"TEXTBOX", "NUMERIC", "999"}, nCtrl := {"TEXTBOX", "NUMERIC", "99999999.99"}
private aData := {}
set deleted on
for i := 1 to 10
aadd(aData, {'Emp '+ltrim(str(i)), i*1000.00})
next
aadd(adbf, {"empnm", "c", 40, 0})
aadd(adbf, {"basic", "n", 10, 2})
DBCREATE("salreg", adbf, "SQLMIX", .T., "salreg")
DEFINE WINDOW salreg ;
WIDTH 700 ;
HEIGHT 550 ;
TITLE "Grid Test" ;
main
DEFINE BUTTON Calc
ROW 40
COL 560
WIDTH 120
CAPTION "&Calculate"
ACTION SalRegCalc()
END BUTTON
define grid grid_1
row 70
col 10
WIDTH 670
HEIGHT 380
HEADERS {'Employee','Basic'}
WIDTHS {200,100}
justify {0,1}
COLUMNCONTROLS {cCtrl,nCtrl}
ROWSOURCE "salreg"
COLUMNFIELDS { 'empnm','basic'}
end grid
END WINDOW
salreg.Center
salreg.Activate
Return Nil
static function SalRegCalc()
select salreg
delete all
for i := 1 to len(aData)
append blank
replace empnm with aData[i, 1]
replace basic with aData[i, 2]
next
salreg.Grid_1.Refresh
return nil
Most probably I made some mistakes in my code.
Thanks in advance
With best regards.
Sudip