The error is present only when using Msgrun(...) in the bAction from the timer!
This test can you show the problem! Please type in get any character and wait for reaction.
Antonio, in some rare cases the program terminates not but in the get suddenly comes chinese letters!
(Unicode?)
- Code: Select all Expand view
- function abnormal(oWnd)
local oDlg, oTimer , oSay , cSay := " " , oGet , cGet := space(10) , cBuffer
DEFINE TIMER oTimer INTERVAL 1000 OF oWnd
DEFINE DIALOG oDlg OF oWnd FONT oFont_normal
@ 1, 2 GET oGet VAR cGet
oGet:bPostKey := {|x,buffer|if(empty(buffer),NIL,;
(oTimer:bAction:={||NIL},;
cBuffer := buffer,;
oTimer:bAction:={||msgrun("Test","Test",{||(cSay := cBuffer, oSay:refresh(),oTimer:deactivate())})},;
oTimer:activate()))}
@ 2, 2 SAY oSay PROMPT cSay SIZE 50,15
@ 3,2 SBUTTON PROMPT "&End" OF oDlg SIZE 50,15 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil