FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse Error With 10.2
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
xBrowse Error With 10.2
Posted: Thu Mar 18, 2010 04:16 PM

Hi,

Just upgraded xHarbour commercial (Nov 09) & Fivewin (10.2) and get the follwoing error in an xBrowse:

Application

Path and name: G:\6.00\Exe\ORD_MOD.EXE (32 bits)
Size: 4,965,376 bytes
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 18/03/2010, 15:51:10
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 3

Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINTHEADER(1472)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1271)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(1174)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1439)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT(10470)
Called from: .\source\classes\WINDOW.PRG => _FWH(3378)
Called from: => UPDATEWINDOW(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(955)
Called from: .\source\classes\MDICHILD.PRG => TMDICHILD:ACTIVATE(245)
The previous version of Fivewin i was using was 09.5 and it worked fine - no code changes just recompiled and got this error. Any ideas?

Regards,

Pete

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Error With 10.2
Posted: Fri Mar 19, 2010 10:11 AM

From versions 9.01 TO 10.02, bClrHeader is expected to return array of 3 colors. Third color is meant for the color of the pen used to paint lines for the header.

Please change your source code so that bClrHeader returns an array of 3 colors.

Regards



G. N. Rao.

Hyderabad, India
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse Error With 10.2
Posted: Fri Mar 19, 2010 12:04 PM

Thanks, that seems to have fixed the problem!

One thing i've noticed is that the size of the header has grown between versions - how can i set it back to how it was?

Regards,

Pete

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Error With 10.2
Posted: Fri Mar 19, 2010 12:41 PM
PeterHarmes wrote:Thanks, that seems to have fixed the problem!

One thing i've noticed is that the size of the header has grown between versions - how can i set it back to how it was?

Regards,

Pete

Is it so? May I know with which version are you comparing? I like to see if there is any change in the code.
Anyway you can control header size with oBrw:nHeaderHeight := <n> ( in pixels )
Regards



G. N. Rao.

Hyderabad, India
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse Error With 10.2
Posted: Fri Mar 19, 2010 01:58 PM

I was originally using 09.05

Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse Error With 10.2
Posted: Thu Mar 25, 2010 04:57 PM

Anyone got any ideas about the header height problem?

Regards,

Pete

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Error With 10.2
Posted: Fri Mar 26, 2010 02:20 AM
From version 9.12, the header height is increased by 4 pixels.
For the old look, line no 8063 of xbrowse.prg ( 10.2 )
Code (fw): Select all Collapse
         nHeight := ( FontHeight( ::oBrw, ::oHeaderFont ) + 2 ) * MLCount( ::cHeader ) + 2

may be modified as
Code (fw): Select all Collapse
         nHeight := FontHeight( ::oBrw, ::oHeaderFont )  * MLCount( ::cHeader )
Regards



G. N. Rao.

Hyderabad, India
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse Error With 10.2
Posted: Fri Mar 26, 2010 02:24 PM

I would say that the size of the header has nearly doubled!!

I will try and get some screen shots

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Error With 10.2
Posted: Fri Mar 26, 2010 02:34 PM
PeterHarmes wrote:I would say that the size of the header has nearly doubled!!

I will try and get some screen shots

I have verified the code and also compared the headerheight by msginfo in both versions. You may try this small code in both versions:
Code (fw): Select all Collapse
#include 'fivewin.ch'
#include 'xbrowse.ch'

function Main()

   XBROWSER {{ 'Right Click', 'To know header height' }} ;
   SETUP ( oBrw:bRClicked := { |r,c,f,o| MsgInfo( o:nHeaderHeight ) } )

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse Error With 10.2
Posted: Fri Mar 26, 2010 02:48 PM

Thanks, i'll try that in a min - I dont actually specify a font or size for the header of the browse so this could be the cause of the problem - i use a generic function for all of my browses, so it wouldnt take much to apply a height to all browses - how do i apply a height?

oBrw:nHeaderHeight := nn?

Regards,

Pete

Posts: 363
Joined: Wed Feb 15, 2006 02:06 PM
Re: xBrowse Error With 10.2
Posted: Fri Mar 26, 2010 02:58 PM

Ignore previous post - I have put oBrw:nHeaderHeight := 20 into my xBrowse setup function and that works perfectly in both FW09.5 & FW10.2

Thanks for your help you

Best Regards,

Pete

Continue the discussion