The function should be ok in this way (I don't like macros, if it's possible to do in iother ways please tell me)mrduck wrote:GetControlType in hmg3 is a function and it is ok in the hmg3 semi-oop style...Code: Select all
Function GetControlType (ControlName,ParentForm)
Code: Select all
Function GetControlType (xControlName,xParentForm)
Local mVar
mVar := xParentForm + ":" + xControlName + ":cClass"
Return ( &mVar )
Since I don't like to use macros I decided to change the calling code to use objects directly:Done that, now is the linethat doesn't work since hmg4 implementation has only 3 parameters.... I'm trying to understand what this line wants to get... do you how to translate it in hmg4 ?Code: Select all
aRet := GetProperty ( ParentForm , ControlName , 'Item' , GetProperty( ParentForm , ControlName , 'Value' ) )
Code: Select all
// cPesq := ValorDaColuna( "GIndice" , "Form_1" , 1 ) it called GetProperty
v := Form_1:GIndice:Value
cPesq := form_1:GIndice:cell( 1,v )
Then I spent a lot of time trying to understand why my grids were always empty.... the problem is in grid.prg where is still used ::lCreated to guard code with IFs... this use of ::lCreated has been changed and so the IF ::lCreated must be removed (not all, one by one checking what we are doing).
I temporarily solved setting lCreated=.T. in New().
Then I had to remove NOMAXIMIZE and NOSIZE since not present in hmg4 now.
Now the program starts and partially works... I attach a screenshot of hmg4 (left) and hmg3 (right)... there are some differences...
- background color of the grid
- row header
- navigation cursor in the grid
- doublecking a cell in hmg4 grid enables it for editing
- the animation and icon but it was expected