FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posted: Thu Aug 14, 2008 03:57 PM

Hi Friends

I have a multiline get. I want save the value to database only when the
get value is changed.

How can I know wether the get value is updated or not.

Thanks

  • Ramesh Babu P
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posted: Thu Aug 14, 2008 04:38 PM

Can't you just compare the current value with the original one?

EMG

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posted: Thu Aug 14, 2008 05:15 PM

Mr.Enrico

Yes. But I was looking for a simplest way like clipper's ISUPDATED()
like functionality in Gets.

Thanks for your suggestion.

  • Ramesh Babu P
Posts: 244
Joined: Fri Oct 28, 2005 06:29 PM
HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posted: Thu Aug 14, 2008 05:35 PM

Can use on change:

Local lUpdated := .F.

DEFINE GET oGet ON CHANGE lUpDated := .T.

Regards / Saludos

Alejandro Cebolido

Buenos Aires, Argentina
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posted: Thu Aug 14, 2008 05:37 PM

You might try something like:

oGet:cargo:=.f.
oGet:bChange:= {|| oGet:cargo := .t. }

Then you can test for oGet:cargo to see if it is True.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT
Posted: Thu Aug 14, 2008 09:44 PM

Unfortunately there are a couple of bugs that prevent ON CHANGE (and bChange that is the same) from working fine. Specifically, ESC wrongly activates ON CHANGE and Enter erroneously does not.

EMG

Continue the discussion