HMG 3.0.28

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG 3.0.28

Post by sudip »

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.

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
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
With best regards,
Sudip
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG 3.0.28

Post by sudip »

Hello All,

Did anyone check the problem I mentioned in previous post?

You may also download from
GridTest001.zip
(1.3 KiB) Downloaded 268 times
Thanks in advance :)

With best regards.

Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.28

Post by Rathinagiri »

I too confirm the same Sudip.

I think Roberto would solve the problem in the next release.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG 3.0.28

Post by sudip »

Thank you Friend :)
With best regards.
Sudip
With best regards,
Sudip
User avatar
swapan
Posts: 242
Joined: Mon Mar 16, 2009 4:23 am
Location: Kolkata, India
Contact:

Re: HMG 3.0.28

Post by swapan »

Dear Sudip:

Its perfectly alright in HMG 3.0.24 (2010.03.07) version.
Not yet installed this latest 3.0.28 though!

I think it will be not a major issue (as it is ok in previous versions), and would be resolved
with the next release, if there's no workaround for it in .28 version.
Thanks & Regards,
Swapan Das

http://www.swapandas.com/
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.28

Post by Roberto Lopez »

sudip wrote:Hello All,

Did anyone check the problem I mentioned in previous post?

You may also download from
GridTest001.zip
Thanks in advance :)

With best regards.

Sudip
I'll review it ASAP.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.28

Post by Roberto Lopez »

sudip wrote: 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 :)
Please, consider that data-bound grid is fully new code and thus, it could has some undiscovered problems.

Moreover, every time you fix something, there is a possibility that a new problem arises.

I'm doing my best.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: HMG 3.0.28

Post by sudip »

Roberto Lopez wrote:...
Please, consider that data-bound grid is fully new code and thus, it could has some undiscovered problems.

Moreover, every time you fix something, there is a possibility that a new problem arises.

I'm doing my best.
Yes Roberto :) Please continue the improvement of HMG in your time :)
For the time being I compiled my code into 3.0.27 and it is running fine :)

With best regards.

Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5481
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.0.28

Post by Rathinagiri »

every time you fix something, there is a possibility that a new problem arises.
Then you don't fix that something. ;)

Haa haa. Just joking.

It is a nice Murphy's law:

A solution to a problem will be the root of a new problem.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Roberto Lopez
HMG Founder
Posts: 4023
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 3.0.28

Post by Roberto Lopez »

rathinagiri wrote:
every time you fix something, there is a possibility that a new problem arises.
Then you don't fix that something. ;)

Haa haa. Just joking.

It is a nice Murphy's law:

A solution to a problem will be the root of a new problem.
Data-bound grid is specially tricky and difficult because it works on a 'callback' basis.

This means that the OS calls the specified procedure when it 'needs' to repaint a specific cell.

I've already fixed all bugs reported about grid for 3.0.28, but I'll tag the next release as 'Test', since its 'sensitive nature'.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply