FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse with array
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse with array
Posted: Mon Jun 14, 2010 08:23 AM

Antonio,

i get this error when dragging the scroll bar to the right, sorry

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

Stack Calls

Called from: C:\FWH\source\classes\xbrowse.prg => (b)TXBROWSE:TXBROWSE(478)
Called from: => TXBROWSE:COLATPOS(0)
Called from: C:\FWH\source\classes\xbrowse.prg => (b)TXBROWSE:TXBROWSE(481)
Called from: => TXBROWSE:SELECTEDCOL(0)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:PAINT(1195)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:DISPLAY(1177)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1439)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:HANDLEEVENT(10473)
Called from: .\source\classes\WINDOW.PRG => _FWH(3378)

Just to make sure i've done everything correctly,

I modified xBrowse.prg with your modification, then linked the modified prg into my app - is this correct?

Pete

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBrowse with array
Posted: Mon Jun 14, 2010 10:51 AM
Pete,

Yes, you did it right :-)

Please try it this way:
Code (fw): Select all Collapse
METHOD ColAtPos( nPos ) INLINE ::aCols[ Max( 1, ::aDisplay[ MinMax( If( nPos == nil .or. nPos == 0, 1, nPos ), 1, Len( ::aDisplay ) ) ] ) ]
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse with array
Posted: Mon Jun 14, 2010 11:01 AM

Still getting an error i'm afraid:

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

Stack Calls

Called from: C:\FWH\source\classes\xbrowse.prg => (b)TXBROWSE:TXBROWSE(479)
Called from: => TXBROWSE:COLATPOS(0)
Called from: C:\FWH\source\classes\xbrowse.prg => (b)TXBROWSE:TXBROWSE(483)
Called from: => TXBROWSE:SELECTEDCOL(0)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:PAINT(1197)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:DISPLAY(1179)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1439)
Called from: C:\FWH\source\classes\xbrowse.prg => TXBROWSE:HANDLEEVENT(10475)
Called from: .\source\classes\WINDOW.PRG => _FWH(3378)

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xBrowse with array
Posted: Mon Jun 14, 2010 11:00 PM
Pete,

I guess we just have a missing try :-)
Code (fw): Select all Collapse
METHOD ColAtPos( nPos ) INLINE ::aCols[ ::aDisplay[ MinMax( If( nPos == nil, 1, nPos ), 1, Max( 1, Len( ::aDisplay ) ) ) ] ]


but that may generate an out of bounds error if Len( ::aDisplay ) is zero...

Maybe we could also try, to start it simple:
Code (fw): Select all Collapse
METHOD ColAtPos( nPos ) INLINE ::aCols[ ::aDisplay[ nPos ] ]
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse with array
Posted: Tue Jun 15, 2010 04:19 AM

Even this does not work.
This problem arises when we use HScroll thumb with any single column xbrowse, whether it is array or dbf.
We need to trace the problem starting from method hscroll(..)

Regards



G. N. Rao.

Hyderabad, India
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse with array
Posted: Thu Jun 24, 2010 01:48 PM

Antonio,

Still get the error with 10.06 i'm afraid :(

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

Stack Calls

Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE(492)
Called from: => TXBROWSE:COLATPOS(0)
Called from: .\source\classes\XBROWSE.PRG => (b)TXBROWSE:TXBROWSE(494)
Called from: => TXBROWSE:SELECTEDCOL(0)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1211)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(1193)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1458)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT(10744)

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse with array
Posted: Thu Jun 24, 2010 04:00 PM

Yes. The problem is not yet fixed, even in 10.06.
Let us await the fix.
Meanwhile we try to avoid HScroll bar for single column xbrowse.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion