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

Post Reply
User avatar
bosibila
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

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

Post 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
Last edited by bosibila on Mon Mar 01, 2021 11:09 am, edited 1 time in total.
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

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

Post 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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
bosibila
Posts: 53
Joined: Wed Aug 06, 2008 5:27 pm
Location: Osijek, Croatia

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

Post by bosibila »

Thanks Mr Rao ...
Boris (FWH 20.07, xHarbour 1.2.3, Harbour 3.2.0, BCC74, MySql 5.7)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

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

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

G. N. Rao.
Hyderabad, India
Post Reply