1. Still having Win32lib problem
- Posted by DB James <larches at co?cast.net> Jul 22, 2007
- 512 views
Hi, Didn't get any answer to this before, but I still need it. I have been unable to get text back out of a RichEdit control. I tried poking around in win32lib.ew and w32dll.ew, but no luck so far. I made a little test program in Judith's IDE:
sequence line,text text={} line=" This is some text to test RichEdit Control\r\n" for i=1 to 10 do text&=line end for setText(RichEdit2,text) --works fine text={} text=getRichText(RichEdit2,-1) -- FAIL text={32 }
The content of "text" is {32 } (first char). I am surprised no one else has reported this problem, if it isn't somehow just on my machine. Has anyone had success getting text from a RichEdit? --Quark
2. Re: Still having Win32lib problem
- Posted by Craig Welch <euphoriah at ?welch.org> Jul 22, 2007
- 497 views
DB James wrote: > I have been > unable to get text back out of a RichEdit control. I tried poking around > in win32lib.ew and w32dll.ew, but no luck so far. <snip> > The content of "text" is {32 } (first char). This has to do with the RichEdit class changing from WinXP SR1 onwards, so that it expects strings in Unicode. Have you tried using getStream instead? That should work fine. -- Craig
3. Re: Still having Win32lib problem
- Posted by DB James <larches at co??ast.net> Jul 22, 2007
- 482 views
Craig Welch wrote: > > DB James wrote: > > > I have been > > unable to get text back out of a RichEdit control. I tried poking around > > in win32lib.ew and w32dll.ew, but no luck so far. > > <snip> > > > The content of "text" is {32 } (first char). > > This has to do with the RichEdit class changing from WinXP SR1 onwards, so > that > it expects strings in Unicode. > > Have you tried using getStream instead? That should work fine. > > -- > Craig Thank you, Craig. That did the trick -- onward! --Quark
4. Re: Still having Win32lib problem
- Posted by CChris <christian.cuvier at agri?ulture.gouv.fr> Jul 22, 2007
- 491 views
DB James wrote: > > Hi, > > Didn't get any answer to this before, but I still need it. I have been > unable to get text back out of a RichEdit control. I tried poking around > in win32lib.ew and w32dll.ew, but no luck so far. > > I made a little test program in Judith's IDE: > > }}} <eucode> > sequence line,text > text={} > line=" This is some text to test RichEdit Control\r\n" > for i=1 to 10 do text&=line end for > setText(RichEdit2,text) --works fine > text={} > text=getRichText(RichEdit2,-1) -- FAIL text={32 } > </eucode> {{{ > > The content of "text" is {32 } (first char). > > I am surprised no one else has reported this problem, if it isn't somehow > just on my machine. Has anyone had success getting text from a RichEdit? > > --Quark This problem has been there for a long time already: precisely, since Microsoft started to ship RichEdit controls v3.0 and higher, because they no longer store text in UTF-8, but UTF-16 instead. You probably noticed that demos using RichEdit controls weren't fully working. The next version of win32lib will solve this; the fix was not trivial. CChris
5. Re: Still having Win32lib problem
- Posted by DB James <larches at comcast.??t> Jul 22, 2007
- 499 views
CChris wrote: > > DB James wrote: > > <SNIP> > > I am surprised no one else has reported this problem, if it isn't somehow > > just on my machine. Has anyone had success getting text from a RichEdit? > > > > --Quark > > This problem has been there for a long time already: precisely, since > Microsoft > started to ship RichEdit controls v3.0 and higher, because they no longer > store > text in UTF-8, but UTF-16 instead. You probably noticed that demos using > RichEdit > controls weren't fully working. > > The next version of win32lib will solve this; the fix was not trivial. > > CChris Hi CChris, Thanks for the information on this. The update on win32lib will be most welcome when it happens. --Quark