Page 1 of 1

ERROR XBROWSE + Empty TARRAYDATA object

Posted: Fri Jul 03, 2020 12:32 pm
by vilian
Hi Guys,
I Have a xBrowse where I'm showing the content of a TARRAYDATA object( oArr ). IF i do oArr:SetFilter(" status = 1") and there is no records in oArr with status = 1, there is happening the error bellow:

Code: Select all

Error description: Error BASE/1132  Bound error: array access
   Args:
     [   1] = A   { ... }
     [   2] = N   0

Stack Calls
===========
Called from: TARRDATA.PRG => TARRAYDATA:BOOKMARK( 584 )
Called from: TARRDATA.PRG => (b)TARRAYDATA_SETXBROWSE( 1309 )
Called from: XBROWSE.PRG => TXBROWSE:SELECT( 8388 )
Called from: XBROWSE.PRG => TXBROWSE:SELECTROW( 8277 )
Called from: SGV2028.hrb => (b)TVFAPRG_DEFDIALOG( 184 )
Do you know why ?

Re: ERROR XBROWSE + Empty TARRAYDATA object

Posted: Fri Jul 03, 2020 12:44 pm
by nageswaragunupudi
We will look into this.

Re: ERROR XBROWSE + Empty TARRAYDATA object

Posted: Fri Jul 03, 2020 1:10 pm
by nageswaragunupudi
The line numbers in your errorsys do not match with any recent version of TArrayData.
Please check if you are linking a much older version of the class.

We tested this sample and it is working fine here.

Code: Select all

function TestArrayData

   local oData, aData, aStru

   aStru := { { "MONTH", "C", 4, 0 }, { "SALES", "N", 4, 0 }, { "COSTS", "N", 4, 0 }, { "STATUS", "N", 1, 0 } }
   aData := { { "JAN", 1000, 500, 0 }, { "FEB", 1200, 800, 0 } }

   oData := TArrayData():New( aData, aStru )

   XBROWSER oData SETUP oBrw:bRClicked := { |r,c,f,o| oData:SetFilter( "STATUS == 1" ), o:Refresh() }

return nil
 

Re: ERROR XBROWSE + Empty TARRAYDATA object

Posted: Fri Jul 03, 2020 2:16 pm
by vilian
My Fwh is May/2019. I'm not linking an older version on tArraydata

Re: ERROR XBROWSE + Empty TARRAYDATA object

Posted: Fri Jul 03, 2020 2:54 pm
by nageswaragunupudi
Just tested with 1905 and current versions.
We confirm bug in 1905.
Works well with current versions.

Re: ERROR XBROWSE + Empty TARRAYDATA object

Posted: Fri Jul 03, 2020 5:17 pm
by vilian
Thanks