FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error running \Samples\testmerg.prg
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Error running \Samples\testmerg.prg
Posted: Wed Dec 09, 2009 01:42 AM
In FWH 9.06, this is the error message that I got

Application
===========
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 12/09/09, 09:37:57
Error description: Error BASE/1073 Argument error: <
Args:
[ 1] = U
[ 2] = N 0

Stack Calls
===========
Called from: .\source\classes\XBROWSE.PRG => XBROWSENEW(9788)
Called from: testmerg.prg => MAIN(27)
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error running \Samples\testmerg.prg
Posted: Wed Dec 09, 2009 05:03 AM
This sample is working well for me, when I compiled with version 9.06.

Can you please reproduce the line 9788 of xbrowse.prg in your fwh\source\classes folder?

The line 9788 of my c:\fwh906\source\classes\xbrowse.prg is
Code (fw): Select all Collapse
      if Len( aPics ) >= i .and. ! Empty( aPics[ i ] )
Regards



G. N. Rao.

Hyderabad, India
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Error running \Samples\testmerg.prg
Posted: Wed Dec 09, 2009 06:32 AM
Here's the code Rao. Thank you for responding. I've placed '//9788' on the offending line below

Code (fw): Select all Collapse
function XbrowseNew( oWnd, nRow, nCol, nWidth, nHeight,;
                     aFlds, aHeaders, aColSizes,  ;
                     bChange, bLDblClick, bRClick, ;
                     oFont, oCursor, nClrFore, nClrBack, ;
                     cMsg, lUpdate, cDataSrc, bWhen, ;
                     lDesign, bValid, lPixel, nResID, lAutoSort, lAddCols, ;
                     aPics, aCols, aJust, aSort, lFooter, lFastEdit, ;
                     lCell, lLines, aRows )

   local oBrw, n, i, oCol

   // This function is intended only to support command syntax
   // and not to be used directly in application program

   oBrw            := TXBrows():New( oWnd )

   oBrw:lAutoSort  := lAutoSort
   oBrw:bLDblClick := bLDblClick
   oBrw:bRClicked  := bRClick

   aFlds          := CheckArray( aFlds )
   aHeaders       := CheckArray( aHeaders )
   aColSizes      := CheckArray( aColSizes )
   aPics          := CheckArray( aPics )
   aCols          := CheckArray( aCols )
   aJust          := CheckArray( aJust )
   aSort          := CheckArray( aSort )

   XbrwSetDataSource( oBrw, cDataSrc, lAddCols, lAutoSort, aCols, aRows  )

   DEFAULT aHeaders := {}, aPics := {}, aColSizes := {}, aSort := {}

   if ! Empty( aFlds )
      for n := 1 to Len( aFlds )
         oBrw:AddCol():bEditValue   := aFlds[ n ]
      next
   endif

   for i := 1 to Len( oBrw:aCols )
      oCol  := oBrw:aCols[ i ]
      if Len( aPics ) >= i .and. ! Empty( aPics[ i ] )
         oCol:cEditPicture := aPics[ i ]
      endif
      if Len( aHeaders ) >= i .and. ! Empty( aHeaders[ i ] )
        oCol:cHeader   := aHeaders[ i ]
      endif
      if Len( aColSizes ) >= i
         if aColSizes[ i ] < 0 // 9788
            n              := -aColSizes[ i ]
            oCol:nDataLen  := Int( n )
            if n > oCol:nDataLen
               n           := Int( 10 * ( n - oCol:nDataLen ) )
               oCol:nDataDec  := n
            endif
         else
            oCol:nWidth    := aColSizes[ i ]
         endif
      endif
      if Len( aSort ) >= i .and. ! Empty( aSort[ i ] )
         oCol:cSortOrder := aSort[ i ]
      endif
   next i
  .
  .
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Error running \Samples\testmerg.prg
Posted: Wed Dec 09, 2009 06:56 AM
Please change the offending line as
Code (fw): Select all Collapse
         if aColSizes[ i ] != nil .and. aColSizes[ i ] < 0

You better change this code and relink to your libraries
Regards



G. N. Rao.

Hyderabad, India
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Error running \Samples\testmerg.prg
Posted: Wed Dec 09, 2009 07:37 AM

Thanks for the prompt response Rao

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion