From: Alexander S.K. <al...@be...> - 2015-07-09 12:45:16
|
Itamar M. Lins Jr. Lins пишет: > Hi! > This example show with more detail the bug. > > #include "hwgui.ch <http://hwgui.ch>" > Function main > LOCAL oDlg ,obt, cVar:= "X" > > INIT DIALOG oDlg clipper title "Typing <END>,<ENTER> and > abcd...<enter>,abcd...<enter>!" AT 0,0 SIZE 800,400 > > @ 10,10 get oVar VAR cVar SIZE 500,300 STYLE ES_MULTILINE + > ES_AUTOVSCROLL + WS_VSCROLL + ES_WANTRETURN > > @ 600,200 button obt caption "show me" size 100,30 on click {|| > hwg_msginfo(cVar,"FAIL! Only show one line!"), > hwg_msginfo(oVar:GetText(cVar),"Works Fine !") , Hwg_EndDialog() } > > oDlg:Activate(,,,.T.) > > hwg_msginfo( oVar:GetText(cVar),"NOW FAIL :(" ) > Now about this sample. The final hwg_msginfo( oVar:GetText(cVar),"NOW FAIL :(" ) can't work, because the dialog is destroyed already - I wrote about it in previous message. BTW, the :gettext() vethod doesn't have a parameter, it should be simply oVar:GetText(). The hwg_msginfo(cVar,"FAIL! Only show one line!") really shows one line, moreover, only one symbol - because the initial value of a get variable has one symbol length - and, as we consider this issue a month or two ago, the final length of a variable must be limited to the same value if no PICTURE or MAXLENGTH are declared. If you add MAXLENGTH 100 to the get declaration, all lines will be visible. Regards, Alexander. |