On Wed, 08 Oct 2008, Gerald Drouillard wrote:

Hi Gerald,

> I am running Harbour's tbrowse in the latest version of xHarbour in the 
> following issues I have found:
> METHOD refreshAll() CLASS TBROWSE
>    ::setUnstable()
> // The following 2 lines do not follow clipper behavior:
> //   Eval( ::bSkipBlock, 1 - ::nBufferPos )
> //   ::nBufferPos := 1
>    ::lFrames := .T.
>    ::lRefresh := .T.
>    RETURN Self

Do you have any code example?
Even this simple test:
   proc main()
      local o:=tbrowsenew()
      o:skipBlock:={|x,y,z|qout(x,y,z),x}
      o:refreshAll()
   return

shows that Clipper evaluates skipBlock() inside refresh all.
I've tried with CL5.2 and CL5.3 - both gives the same results
as Harbour. Also such things should be caught by Viktor's
TBROWSE regression test and I do not remember any problems
here.

> Not sure if the following is a difference in xhb/hb:
> METHOD stabilize() CLASS TBROWSE
> ....
>          FOR EACH lStat, lDisp IN ::aCellStatus, ::aDispStatus DESCEND
>             IF !lStat
>
>                IF lRead
>                   RETURN .F.
>                ENDIF
> //this line was changed in xhb to work correctly:
>                lRead := ::readRecord( nrowcount+lStat:__enumIndex()+1 )       
>         
>             ENDIF
>             IF lDisp
>                ::dispRow( nrowcount+lDisp:__enumIndex()+1 )
>             ENDIF
>          NEXT
>
> lStat:__enumIndex() returns a negative number in xhb when using "DESCEND" 
> and it seems like we are trying to paint from the bottom up.

xHarbour does not support extended FOR EACH functionality like in Harbour.
It has some emulation using preprocessor directives but it does not replicate
Harbour behavior. The above is one of such examples. In Harbour this code is:

         FOR EACH lStat, lDisp IN ::aCellStatus, ::aDispStatus DESCEND
            IF !lStat
               IF lRead
                  RETURN .F.
               ENDIF
               lRead := ::readRecord( lStat:__enumIndex() )
            ENDIF
            IF lDisp
               ::dispRow( lDisp:__enumIndex() )
            ENDIF
         NEXT

reads and shows records from the top to down.

I cannot say how tbrowse code will work in xHarbour. Harbour does not
have some important functionality which exist only in Harbour and maybe
used by this code in some places.
Anyhow if you will find any incompatibilities to Clipper then please
send a message here. Maybe sth has to be fixed yet.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to