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.
This commit is contained in:
Viktor Szakats
2009-06-21 10:50:28 +00:00
parent 69d54317ab
commit dc7ac1505a
3 changed files with 24 additions and 7 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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( [<x>] ) => wapi_OutputDebugString( <x> )
#else
#xtranslate HB_OUTDEBUG( [<x>] ) => hb_TraceString( <x> )
#endif
#else
/* TOFIX: To generate NOOP code. */
#xtranslate HB_OUTDEBUG( [<x>] ) =>
#xtranslate HB_OUTDEBUG( [<x>] ) => iif( .T.,, )
#endif
/*----------------------------------------------------------------------*/