Some questions about getText() and setText() in lua
Posted: Fri Feb 02, 2007 03:41
Sample_Demo8:
code as follows:
local text = winMgr:getWindow("Demo8/Window1/Controls/Editbox"):getText()
winMgr:getWindow("Demo8/Window1/Controls/Editbox"):setText(text)
if the string text contains Chinese characters,then i call setText(text),now
you can't see the text of editbox,it has been confused,you just can view another symbol.
I use font simhei-12.font, you can set Chinese characters in c++ code,
for example setText((utf8*)"中"),the editbox can show right, but call
getText() then call setText() in lua,it fails.
code as follows:
local text = winMgr:getWindow("Demo8/Window1/Controls/Editbox"):getText()
winMgr:getWindow("Demo8/Window1/Controls/Editbox"):setText(text)
if the string text contains Chinese characters,then i call setText(text),now
you can't see the text of editbox,it has been confused,you just can view another symbol.
I use font simhei-12.font, you can set Chinese characters in c++ code,
for example setText((utf8*)"中"),the editbox can show right, but call
getText() then call setText() in lua,it fails.