xBrowse with array

Re: xBrowse with array

Postby PeterHarmes » Mon Jun 14, 2010 8: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
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: xBrowse with array

Postby Antonio Linares » Mon Jun 14, 2010 10:51 am

Pete,

Yes, you did it right :-)

Please try it this way:
Code: Select all  Expand view

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xBrowse with array

Postby PeterHarmes » 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)
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: xBrowse with array

Postby Antonio Linares » Mon Jun 14, 2010 11:00 pm

Pete,

I guess we just have a missing try :-)
Code: Select all  Expand view

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: Select all  Expand view

METHOD ColAtPos( nPos ) INLINE ::aCols[ ::aDisplay[ nPos ] ]
 
regards, saludos

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

Re: xBrowse with array

Postby nageswaragunupudi » Tue Jun 15, 2010 4: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse with array

Postby PeterHarmes » Thu Jun 24, 2010 1: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)
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: xBrowse with array

Postby nageswaragunupudi » Thu Jun 24, 2010 4: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
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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