Page 1 of 1

TGet class difference FWH11.08 and 20.04 help (Solved) ...

Posted: Sat Feb 20, 2021 12:13 pm
by bosibila
Hello,
I need some help with TGet class. A few month ago I start to upgrade my software from version FWH11.08 to 20.07 and saw differences in TGet functionality. In old version I get variable name with "oget1:oGet:Name" but in new FWH same code return name of get object. How to retrieve variable name from get in FWH20.07 version? Here is small example ...

Code: Select all

#include "fivewin.ch"

//--------------------------------------------------
Function main()
local oGet1,oGet2
local cVar1,cVar2

cVar1:="  "
cVar2:="  "
DEFINE DIALOG oDlg FROM 0,0 TO 40,80
@ 1.20, 08.0 get oGet1 var cVar1  update SIZE 25,10 VALID (msginfo(oget1:oGet:Name),.t.)        // old FWH11.08 return good value "cVar1" but FWH20.07 return "oGet1" 
@ 2.20, 08.0 get oGet2 var cVar2  update SIZE 25,10 VALID (msginfo(oget2:oGet:Name),.t.)
ACTIVATE DIALOG oDlg 

return

Re: TGet class difference FWH11.08 and 20.04 help please ...

Posted: Sat Feb 20, 2021 4:25 pm
by nageswaragunupudi
Yes.
In version 11.08, both oGet:cVarName and oGet:oGet:Name contained the symbolic name of the variable being edited. This was correct. The behavior of Gets created from source code as well as from resources was the same.

But this change took place in version 12.07. From this version onwards till date, oGet:cVarName and oGet:oGet:Name contains the name of the "get variable" but not the "variable being edited". Further, this change was made in the case of Gets created from source code only but not for Gets created from Resources. Gets created from resources still contain the name of the variable being edited.

This is the history.

We will get back to you on this issue again.

Re: TGet class difference FWH11.08 and 20.04 help please ...

Posted: Sun Feb 21, 2021 8:22 am
by bosibila
Thanks Mr Rao ...

Re: TGet class difference FWH11.08 and 20.04 help please ...

Posted: Mon Mar 01, 2021 2:11 am
by nageswaragunupudi
DATA cVarName of any control/window is expected to store the name of the variable representing the control/window. But in case of TGet, it was storing the name of the variable being edited. This was fixed in FWH1207, but resulted in changing the contents of oGet:oGet:Name also. This is now fixed in FWH2102. Now, oGet:cVarName contains the name of the variable representing the get object ("oGet") but oGet:oGet:Name contains the name of the variable being edited. ("cVar" ).