HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT

HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT

Postby RAMESHBABU » Thu Aug 14, 2008 3: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
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: HOW TO KNOW WETHER MULTIGET VALUE IS UPDATED OR NOT

Postby Enrico Maria Giordano » Thu Aug 14, 2008 4:38 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby RAMESHBABU » Thu Aug 14, 2008 5: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
User avatar
RAMESHBABU
 
Posts: 614
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby TecniSoftware » Thu Aug 14, 2008 5:35 pm

Can use on change:

Local lUpdated := .F.

DEFINE GET oGet ON CHANGE lUpDated := .T.



Regards / Saludos
Alejandro Cebolido
Buenos Aires, Argentina
User avatar
TecniSoftware
 
Posts: 233
Joined: Fri Oct 28, 2005 6:29 pm
Location: Quilmes, Buenos Aires, Argentina

Postby James Bott » Thu Aug 14, 2008 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Enrico Maria Giordano » Thu Aug 14, 2008 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 50 guests