Hi, I have this function :
//------------------------
function translate(cprog)
//------------------------
INIT DIALOG oDlg1 CLIPPER NOEXIT TITLE cTitle AT oMainWindow:nLeft+140,oMainWindow:nTop+130 SIZE 940,352 FONT oFont
@ 10,30 say cProg SIZE 220, 22 BACKCOLOR hwg_ColorC2N("#83E4CA") COLOR hwg_ColorC2N("0000FF") TOOLTIP cTooltip01
@ 10,60 SAY _("English comment") SIZE 200, 20 COLOR hwg_ColorC2N("FF0000") TOOLTIP cTooltip02
@ 10,80 HCEDIT oComment_EN SIZE 450, 60 BACKCOLOR hwg_ColorC2N("FFFFFF") COLOR hwg_ColorC2N("000000")
oComment_EN:SetText(cComment_EN,,,,)
@ 480,60 SAY _("French comment") SIZE 200, 20 COLOR hwg_ColorC2N("FF0000") TOOLTIP cTooltip02
@ 480,80 HCEDIT oComment_FR SIZE 450, 60 BACKCOLOR hwg_ColorC2N("FFFFFF") COLOR hwg_ColorC2N("000000")
oComment_FR:SetText(cComment_FR,,,,)
@ 10,150 SAY _("English info") SIZE 200, 20 COLOR hwg_ColorC2N("FF0000") TOOLTIP cTooltip03
@ 10,170 HCEDIT oInfo_EN SIZE 450, 60 BACKCOLOR hwg_ColorC2N("FFFFFF") COLOR hwg_ColorC2N("000000")
oInfo_EN:SetText(cInfo_EN,,,,)
@ 480,150 SAY _("French info") SIZE 200, 20 COLOR hwg_ColorC2N("FF0000") TOOLTIP cTooltip03
@ 480,170 HCEDIT oInfo_FR SIZE 450, 60 BACKCOLOR hwg_ColorC2N("FFFFFF") COLOR hwg_ColorC2N("000000")
oInfo_FR:SetText(cInfo_FR,,,,)
@ 350,300 BUTTON _("Save") OF oDlg1 ID IDOK ;
SIZE 100, 32 COLOR hwg_ColorC2N("FF0000")
@ 470,300 BUTTON _("Cancel") OF oDlg1 ID IDCANCEL ;
SIZE 100, 32 COLOR hwg_ColorC2N("FF0000")
ACTIVATE DIALOG oDlg1
After a few of copy/paste, I have sometimes a crash like this :
Daté du 26/09/22 09:05:17
---------------------------------------------
Error BASE/3012 Argument error: HB_UTF8STUFF
Called from HB_UTF8STUFF(0)
Called from HCED_STUFF(2764)
Called from HCEDIT:INSTEXT(2050)
Called from HCEDIT:ONKEYDOWN(1516)
Called from HCEDIT:ONEVENT(526)
Called from HWG_ACTIVATEDIALOG(0)
Called from HDIALOG:ACTIVATE(183)
Called from TRANSLATE(488)
Called from APPLICATIONS(430)
Called from (b)MAIN(903)
Called from HOWNBUTTON:MUP(329)
Called from HOWNBUTTON:ONEVENT(152)
Called from HWG_ACTIVATEMAINWINDOW(0)
Called from HMAINWINDOW:ACTIVATE(351)
Called from MAIN(2386)
I dont know if it's due to the zone where I click to enter in an hcedit function (in the texte or in a zone which is in hcedit but out of the text, but it crashes (program is not closed, and I must kill it)
I don't know, but it seems due to hcedit ...
I have also sometimes another type of crash with this function, but in this case, it closes my program, and it is very talkative in a console. I will send it when it will come again.
Thanks
A+
Good morning Alain,
for saving time please can you complete your sample,
so that it runs with alone with the appended hbp file ?
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
I have retrieved this old ticket.
I have build Ticket113.prg using the hbp.
It builds, but crashes when running.
If I comment this line, it crashes no more ...
I don't find any reason.
A+
Hello Alain,
the objects oComment_xx , cInfo_xx are not created.
So i look for this ticket the next few days.
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
There were a typo in line 77 of Test113.prg ???
instead of :
which was the reason of :
Probably because oInfo_EN was NIL ...
But I must retest the original crash, because I don't remember the problem ...
Thanks
A+
Hello Alain,
with commit r3225 i added the corected sample program
in the "test" directory, please check.
Be shure, that the object names are corresponding:
(for example)
HCEDIT oComment_FR ... && ==> object created, so after this the methods can be called
oComment_FR:SetText(cInfo_FR,,,,)
I appended the screenshot made on Windows 11,
but of corse i done a test on LINUX.
With regards
MNI TNX, 73 es 55 de
DF7BE, Wilfried