Page 2 of 2

Re: WBrowse changes the current file record by itself

Posted: Fri Feb 03, 2012 12:09 pm
by concentra
Antonio Linares wrote:As Enrico has pointed, the problem comes from changing the focus meanwhile the browse is working.
If you need to check some values, etc. you can use the function LogFile() or change the caption of the window, etc. Use other ways to report info without interfering with the focus :-)
Hi Antonio.
Sorry I didn't get it...
This isn't a bug ?
It is the expected behavior ?

[[]] Maurício

Re: WBrowse changes the current file record by itself

Posted: Fri Feb 03, 2012 12:35 pm
by Enrico Maria Giordano
There are many places in an event driven application (like the Windows GUI one) in which you can find strange behavior if the focus is altered.

EMG

Re: WBrowse changes the current file record by itself

Posted: Mon Feb 06, 2012 4:06 pm
by concentra
Enrico Maria Giordano wrote:There are many places in an event driven application (like the Windows GUI one) in which you can find strange behavior if the focus is altered.

EMG
Seems I am too dumb, still didn't understand.
Is this a bug or the expected behavior ?

Re: WBrowse changes the current file record by itself

Posted: Mon Feb 06, 2012 7:45 pm
by Enrico Maria Giordano
Hard to say. You have to check without changing the focus and if the problem is still there it could be a bug.

EMG

Re: WBrowse changes the current file record by itself

Posted: Mon Feb 06, 2012 10:48 pm
by carlos vargas
you can use
debug function for bypass the focus in controls.

dbwin32.exe or dbgview.exe

Code: Select all


function main()
   ?KDSDebug( version() )
return

FUNCTION KDSDebug( xVal, lReturn )
   DEFAULT lReturn := FALSE

   OutPutDebugStringC( CStr( xVal ) + IIf( lReturn, FINL, "" )  )

RETURN NIL

#pragma BEGINDUMP

/*definición de constante necesaria para compilador XCC de xharbour.com*/
#ifndef __BORLANDC__
   #define WINVER 5
#endif

#ifdef __XCC__
#endif

/*llamada a encabezados de api de xharbour y windows SDK*/
#include "hbapi.h"
#include "windows.h"

/*funcion wrapper de api para mostrar un valor en un depurador*/
HB_FUNC( OUTPUTDEBUGSTRINGC )
{
    PHB_ITEM szMsg = hb_param(1, HB_IT_STRING );

    if( szMsg != NULL )
    {
        OutputDebugStringA( hb_itemGetC( szMsg ) );
        OutputDebugStringA( "\n" );
    }
    hb_retc( "" );
}

#pragma ENDDUMP
 

Re: WBrowse changes the current file record by itself

Posted: Tue Feb 07, 2012 3:27 pm
by concentra
Ok.

Since in the sample if I only replace wbrowse to xbrowse the problem disappears, no mater focus changing, it's clear to me that wbrowse i buggy !

And wbrowse should be avoided, deprecated to xbrowse, in order to avoid unpredictable behavior.

So I will hunt for wbrowse in all my code and replace with xbrowse.