-----Messaggio Originale----- Da: "Przemyslaw Czerpak" <dru...@acn.waw.pl>
A: "Enrico Maria Giordano" <e.m.giord...@emagsoftware.it>
Data invio: mercoledì 2 settembre 2009 23.13
Oggetto: Re: [xHarbour-developers] Bug in defcolor


On Wed, 02 Sep 2009, Enrico Maria Giordano wrote:

Hi,

In the following sample the colors are wrong. Please compare with Clipper.

Or with Harbour which works like Clipper.

The problems with TBROWSE in xHarbour seems to be never ending story and
still many things do not work correctly.

In Harbour TBROWSE was rewritten over year ago and in practice it resolved
all compatibility problems also in code which extensively exploits some
hidden Clipper TBROWSE behaviors. Seems that such compatibility level
is unreachable for xHarbour.
Just try the attached code.
Harbour and Clipper gives exactly the same results with the exception
to the bug in calculation column size for logical values with picture
which in Harbour code is hidden replicated when HB_C52_STRICT macro
is set:

  #ifdef HB_C52_STRICT
        /* This is bug in CA-Cl*pper TBrowse. It causes that column
         * is not well centered when picture increase the field size
         * it also has other bad side effects in Clipper. :hiLite()
         * method does not check for the cell size and shows the whole
         * formatted string starting from the middle of column. When
         * string is long enough it causes buffer overflow and other
         * TBrowse data becomes corrupted. I do not want to replicate
         * it. [druzus]
         */
        IF cType == "L"
           aCol[ _TBCI_CELLPOS ] := Int( aCol[ _TBCI_COLWIDTH ] / 2 )
        ENDIF
  #endif

Please make some navigation to check how data is refreshed (i.e. in
column 2) and how it's displayed. You can use the same keystrokes in
Harbour and Clipper. In SkipBlock this code has intentional delay
which allows to see how data is read and refreshed on the screen
so it may work slowly.

Then compile this code using xHarbour and compare results.
Please tell me if you believe that xHarbour ever reach compatibility
level in TBROWSE code like in Harbour.
Please note that the most important and hard work with detail tests
of Clipper behavior was done in Harbour so xHarbour developers can
easy check it looking at Harbour code so such job should be trivial.

best regards,
Przemek

Attachment: tb1.prg
Description: Binary data

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers

Reply via email to