Re: [ANN] win32lib update - call for testers

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bob Thompson wrote:
> 
> CChris wrote:
> 
> > This post is a call for as many people
> > as possible to test the library and report any bugs they find. The preferred
> > way is to use the bug tracker on Sourceforge.
> > The project home page is at <a
> > href="http://sourceforge.net/projects/win32libex">http://sourceforge.net/projects/win32libex</a>
> 
> > CChris
> 
> Hi.
> 
> I've just dropped what I believe to be bug report at sourceforge regarding
> paste issues with 70.1 but had some difficulty navigating the site and didn't
> fancy registering.
> 
> Anyway, it's there in its raw state. Any help would be appreciated.
> 
> Regards,
> 
> Bob

I think I got it. Locate the getData()  function in win32lib.ew and replace the
starting if branch like this:
if ctrl_Type[ id ] = RichEdit then
        -- return selection
        buffer = w32to_memory(0,ID_CHARRANGE, {0, -1})
        VOID = sendMessage( id, EM_EXGETSEL, 0, buffer )
        result = w32fetch( buffer, CHARRANGE_cpMax ) -
                    w32fetch( buffer, CHARRANGE_cpMin )
        w32release_mem(buffer)

        if result > 0 then
            if equal(WC_RICHEDIT,WC_RICHEDIT50) then
buffer = w32acquire_mem(0, 2*result + 2 ) --  add 2 for '/0'
                character.
                iLength = sendMessage( id, EM_GETSELTEXT, 0, buffer )
                text=repeat(0,iLength)
                lmh=buffer
                for i=1 to iLength do
                    text[i]=peek(lmh)+256*peek(lmh+1)
                    lmh+=2
                end for
            else
buffer = w32acquire_mem(0, result + 1 ) --  add 1 for '/0'
                character.
                iLength = sendMessage( id, EM_GETSELTEXT, 0, buffer )
                text = peek( {buffer , iLength})
            end if
            w32release_mem( buffer )
        else
            iLength=getCharacterCount(id,0)
            buffer=w32acquire_mem(0,iLength)
            lmh=w32to_memory(0,ID_GETTEXTEX, {iLength,GT_DEFAULT,CP_ACP,0,0})
            iLength=sendMessage(id,EM_GETTEXTEX,lmh,buffer)
            text=peek({buffer,iLength})
        end if


So it wasn't a wrong messahe, but a wrong buffer length with the newer RE
controls.
Please report whether this fixes the issue for you. I'll update the bug
accordingly.

CChris

Note: all fixes are now going in the 70.2 version, which discontinues support
for the onXXX syntax. I'll upload it when a couple more bugs are reported and
fixed.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu