Hello,
Dispaying a text as "Test&Test" gives a difference betseen a get and a say (Absurd !!!!!!)
See the example , you can test with activating or not TEST1 or TEST2
I don't understand the diference between varput in oGet and osay , followed by refresh() :
In both cases bSetget is executed and at the end from the process SetWindowText( ::hWnd, cTxt )
Frank
Dispaying a text as "Test&Test" gives a difference betseen a get and a say (Absurd !!!!!!)
See the example , you can test with activating or not TEST1 or TEST2
I don't understand the diference between varput in oGet and osay , followed by refresh() :
In both cases bSetget is executed and at the end from the process SetWindowText( ::hWnd, cTxt )
# define TEST1 // Desactivate to test without init test()
//# define TEST2 // To Correct the display from appersands in a say object
#include "FiveWin.ch"
function Main()
***************
local oDlg, oSay, oGet
local ctxt := PAD("Test&Test&test&",25)
DEFINE DIALOG oDlg
@ 2, 2 SAY oSay PROMPT cTxt
@ 4, 2 GET oGet VAR cTxt
# ifdef TEST1
ACTIVATE DIALOG oDlg CENTERED ON INIT Test(oSay , oGet ) //( SetWindowText( oSay:hWnd, Tst(cTxt) ) )
# else
ACTIVATE DIALOG oDlg CENTERED // ON INIT Test(oSay , oGet ) //( SetWindowText( oSay:hWnd, Tst(cTxt) ) )
# endif
return nil
FUNC ConvertAppersandToSay(cTxt)
*******************************
IF "&" IN cTxt
cTxt := AtRepl("&" , cTxt , "&&")
END
RETURN cTxt
PROC Test(oSay , oGet)
**********************
# ifdef TEST2
oSay:Varput(ConvertAppersandToSay("VarputinSay&VarputinSay&"))
# else
oSay:Varput("VarputinSay&VarputinSay&")
# endif
oSay:Refresh()
oGet:Varput("VarputinGet&VarputinGet&")
oGet:Refresh()
RETURNFrank