With this code, d and oldbank (inside compare function) is always the same even though oldbank was populated during GETFOCUS
So if I change the DCGET's value to something else, I should expect oldbank will retain the old value in order to compare between the old and new value.
What am I missing here?
Note: Xbase++ 2.0.721 and Express 2.0.263
Code: Select all
USE YTDAP NEW ALIAS GST
@ 0,0 DCSTATIC TYPE XBPSTATIC_TYPE_RECESSEDBOX SIZE 200,200 ;
OBJECT oBrowBox
@ 1,1 DCBROWSE oBrowse ALIAS 'GST' SIZE 70,70 PARENT oBrowBox;
PRESENTATION DC_BrowPres() ;
EDIT xbeBRW_ItemSelected MODE DCGUI_BROWSE_EDITACROSSDOWN
SELECT GST
OLDBANK := SPACE(100)
DCSETPARENT oBrowse
DCBROWSECOL FIELD GST->GLAMT HEADER 'Bank' WIDTH 8 PICTURE '@!' EDITOR 'BANK1';
TOOLTIP 'Editable ONLY if the currency is based currency';
HCOLOR GRA_CLR_BLUE,GRA_CLR_YELLOW && 20080410
@nil,nil DCGET bBLOCK1 GETID 'BANK1' PICTURE '@!';
GOTFOCUS {|| OLDBANK:=GST->GLAMT}; && <-----------------------------
POPUP {|| DC_POPCALC()} GETSIZE 8; && 20161026
VALID {|o,x,d| d:=O:get:varget(), COMPARE(d, oldbank),DC_GETREFRESH(GETLIST),x} && <-----------------------------
DCREAD GUI
RETURN
function COMPARE(d,olbank)
wtf d, oldbank
RETURN NIL
Andy