WBrowse changes the current file record by itself

Re: WBrowse changes the current file record by itself

Postby concentra » Fri Feb 03, 2012 12:09 pm

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

Re: WBrowse changes the current file record by itself

Postby Enrico Maria Giordano » Fri Feb 03, 2012 12:35 pm

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

Re: WBrowse changes the current file record by itself

Postby concentra » Mon Feb 06, 2012 4:06 pm

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

Re: WBrowse changes the current file record by itself

Postby Enrico Maria Giordano » Mon Feb 06, 2012 7:45 pm

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

Re: WBrowse changes the current file record by itself

Postby carlos vargas » Mon Feb 06, 2012 10:48 pm

you can use
debug function for bypass the focus in controls.

dbwin32.exe or dbgview.exe


Code: Select all  Expand view


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

Re: WBrowse changes the current file record by itself

Postby concentra » Tue Feb 07, 2012 3:27 pm

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests