FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TGet class difference FWH11.08 and 20.04 help (Solved) ...
Posts: 53
Joined: Wed Aug 06, 2008 05:27 PM
TGet class difference FWH11.08 and 20.04 help (Solved) ...
Posted: Sat Feb 20, 2021 12:13 PM
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: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 (fw): Select all Collapse
#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
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TGet class difference FWH11.08 and 20.04 help please ...
Posted: Sat Feb 20, 2021 04:25 PM

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.

Regards



G. N. Rao.

Hyderabad, India
Posts: 53
Joined: Wed Aug 06, 2008 05:27 PM
Re: TGet class difference FWH11.08 and 20.04 help please ...
Posted: Sun Feb 21, 2021 08:22 AM

Thanks Mr Rao ...

Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TGet class difference FWH11.08 and 20.04 help please ...
Posted: Mon Mar 01, 2021 02:11 AM

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" ).

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion