diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 69d1c9837a..99b32582ef 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,24 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-21 12:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbxbp/xbp.ch + + Fixed non-debug branch to work in both normal code and codeblocks. + Thanks Przemek. + * Changed debug macro to generate portable HB_TRACESTRING() calls + by default. This is very easy to use in default Harbour builds. + To enable it's enough to set HB_TR_OUTPUT to the output filename + to be used by trace calls: + set HB_TR_OUTPUT=trace.log + NOTE to Pritpal: To keep using special Windows debug output you + need to also add -D__HB_WINDEBUG__ to HB_USER_PRGFLAGS. + ; TODO: Would it be possible to add timestamp to our HB_TRACE() + calls? At least the user level (HB_TRACESTRING()) ones, + if that would make low level too slow. + + * contrib/hbxbp/tests/demoxbp.prg + + Readded HB_OUTDEBUG() calls. + 2009-06-21 11:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbxbp/xbp.ch ! Restored non-debug behavior due to other problems. @@ -29,7 +47,7 @@ * contrib/hbxbp/xbp.ch ! Fixed for non-debug. Currently it's suboptimal as non-debug mode will generate extra code in binaries. - ; TOFIX + ; TOFIX [DONE] + Added non-Windows specific debug mode by enabling __HB_NOWINDEBUG__ macro. This may change in the future to the default, also names may change in the future. diff --git a/harbour/contrib/hbxbp/tests/demoxbp.prg b/harbour/contrib/hbxbp/tests/demoxbp.prg index 452d1479d9..155f83fe2c 100644 --- a/harbour/contrib/hbxbp/tests/demoxbp.prg +++ b/harbour/contrib/hbxbp/tests/demoxbp.prg @@ -140,7 +140,7 @@ PROCEDURE BuildADialog() /* Very important - destroy resources */ oDlg:destroy() - RETURN nil + RETURN /*----------------------------------------------------------------------*/ @@ -613,13 +613,13 @@ STATIC FUNCTION Build_ComboBox( oWnd ) // Code block for selection: // - assign to LOCAL variable using :getData() // - display LOCAL variable using DispoutAt() - bAction := {|mp1, mp2, obj| obj:XbpSLE:getData() } + bAction := {|mp1, mp2, obj| obj:XbpSLE:getData(), hb_outDebug( 'Highlighted: '+cDay ) } // Assign code block for selection with Up and Down keys oCombo:ItemMarked := bAction // Assign code block for selection by left mouse click in list box - oCombo:ItemSelected := {|mp1, mp2, obj| obj:XbpSLE:getData() } + oCombo:ItemSelected := {|mp1, mp2, obj| obj:XbpSLE:getData(), hb_outDebug( 'Selected: '+cDay ) } // Copy data from array to combo box, then discard array FOR i := 1 TO 7 diff --git a/harbour/contrib/hbxbp/xbp.ch b/harbour/contrib/hbxbp/xbp.ch index 588b13375c..17a5ef9a66 100644 --- a/harbour/contrib/hbxbp/xbp.ch +++ b/harbour/contrib/hbxbp/xbp.ch @@ -5,14 +5,13 @@ #ifndef _XBP_CH #if defined( __HB_OUTDEBUG__ ) - #if defined( __PLATFORM__WINDOWS ) .AND. ! defined( __HB_NOWINDEBUG__ ) + #if defined( __PLATFORM__WINDOWS ) .AND. defined( __HB_WINDEBUG__ ) #xtranslate HB_OUTDEBUG( [] ) => wapi_OutputDebugString( ) #else #xtranslate HB_OUTDEBUG( [] ) => hb_TraceString( ) #endif #else - /* TOFIX: To generate NOOP code. */ - #xtranslate HB_OUTDEBUG( [] ) => + #xtranslate HB_OUTDEBUG( [] ) => iif( .T.,, ) #endif /*----------------------------------------------------------------------*/