WBrowse changes the current file record by itself

User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: WBrowse changes the current file record by itself

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: WBrowse changes the current file record by itself

Post 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
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: WBrowse changes the current file record by itself

Post 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 ?
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: WBrowse changes the current file record by itself

Post 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
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: WBrowse changes the current file record by itself

Post 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
 
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: WBrowse changes the current file record by itself

Post 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.
Post Reply