GET WITH "ON CHANGE" PROBLEM
Posted: Thu Apr 20, 2006 12:00 am
We are using:
xHarbour built 01/24/06
All FWH libraries from 03/15/06
We have GET problem (simplified, it looks like this):
At the entering to dialog:
nSalary := 7,500.00
cText := "SOME TEXT"
....
REDEFINE GET oGet1 VAR nSalary ID 101 OF oDlg ;
ON CHANGE (cText := "CHANGED",oget2:SetText(cText),oget2:refresh()) UPDATE
REDEFINE GET oget2 VAR cText ID 102 OF oDlg UPDATE
....
Now, if we click into the oGet1 GET field and just hit enter to continue,
the cText becomes "CHANGED" and oGet2 is refreshed with this content.
Even if we DID NOT CHANGE the content of oGet1 VAR nSalary !!
Basicaly what happens is that no mater if the "nSalary" variable IS changed or NOT
after we leave it by hitting ENTER or TAB, the "ON CHANGE" clause evaluates
as TRUE and because of this, the rest of code
is evaluated (changes variable cText to "CHANGED")
and oGet2 GET shows "CHANGED" on dialog!
Is there a fix for this, or there is something which was changed either in xHArbour
or FWH?
Thanks for any help or advice
xHarbour built 01/24/06
All FWH libraries from 03/15/06
We have GET problem (simplified, it looks like this):
At the entering to dialog:
nSalary := 7,500.00
cText := "SOME TEXT"
....
REDEFINE GET oGet1 VAR nSalary ID 101 OF oDlg ;
ON CHANGE (cText := "CHANGED",oget2:SetText(cText),oget2:refresh()) UPDATE
REDEFINE GET oget2 VAR cText ID 102 OF oDlg UPDATE
....
Now, if we click into the oGet1 GET field and just hit enter to continue,
the cText becomes "CHANGED" and oGet2 is refreshed with this content.
Even if we DID NOT CHANGE the content of oGet1 VAR nSalary !!
Basicaly what happens is that no mater if the "nSalary" variable IS changed or NOT
after we leave it by hitting ENTER or TAB, the "ON CHANGE" clause evaluates
as TRUE and because of this, the rest of code
is evaluated (changes variable cText to "CHANGED")
and oGet2 GET shows "CHANGED" on dialog!
Is there a fix for this, or there is something which was changed either in xHArbour
or FWH?
Thanks for any help or advice