xBrowse : SameArrayStruct( oBrw, aNew ) (fwh8.10)

xBrowse : SameArrayStruct( oBrw, aNew ) (fwh8.10)

Postby demont frank » Mon Dec 22, 2008 10:24 am

Hello

Setarray calls this function

For me same arraystructure means :
LEN(adata) == LEN(aNew)
AND
Each column from olddata must have the same valtype from new data

Must line :

if nLen <= Len( aNew ) <=== !!!!!!!!!!

not be changed in

if nLen = Len( aNew[1] ) <=== !!!!!!!!!!

Frank

Code: Select all  Expand view
function SameArrayStruct( oBrw, aNew )

   local lSame := .t.
   local n, nLen, aData


   aData    := oBrw:aArrayData  // old Data
   if ValType( aData ) == ValType( aNew )
      if ValType( aData ) == 'A'
         if Len( aData ) > 0 .and. Len( aNew ) > 0
            if ValType( aData[ 1 ] ) == 'A' .and. ValType( aNew[ 1 ] ) == 'A'
               nLen  := Len( aData[ 1 ] )
               if nLen <= Len( aNew )   <=== !!!!!!!!!!
                  lSame := ( AScan( aData[ 1 ], { |u,i| ValType( u ) != ;
                           ValType( aNew[ 1 ][ i ] ) }, 1, nLen ) == 0 )
               else
                  lSame := .f.
               endif
            endif
         else
            lSame    := .f.
         endif
      endif
   else
      lsame    := .f.
   endif
demont frank
 
Posts: 167
Joined: Thu Mar 22, 2007 11:24 am

Re: xBrowse : SameArrayStruct( oBrw, aNew ) (fwh8.10)

Postby Antonio Linares » Wed Dec 31, 2008 9:26 am

Frank,

In FWH 8.12 it is fixed in the way you describe :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 92 guests