xBrowse Error With 10.2

xBrowse Error With 10.2

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

Re: xBrowse Error With 10.2

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Error With 10.2

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

Re: xBrowse Error With 10.2

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Error With 10.2

Postby PeterHarmes » Fri Mar 19, 2010 1:58 pm

I was originally using 09.05
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: xBrowse Error With 10.2

Postby PeterHarmes » Thu Mar 25, 2010 4:57 pm

Anyone got any ideas about the header height problem?

Regards,

Pete
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: xBrowse Error With 10.2

Postby nageswaragunupudi » Fri Mar 26, 2010 2: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: Select all  Expand view  RUN
        nHeight := ( FontHeight( ::oBrw, ::oHeaderFont ) + 2 ) * MLCount( ::cHeader ) + 2
 

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Error With 10.2

Postby PeterHarmes » Fri Mar 26, 2010 2:24 pm

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

I will try and get some screen shots
PeterHarmes
 
Posts: 363
Joined: Wed Feb 15, 2006 2:06 pm
Location: Oxford, England

Re: xBrowse Error With 10.2

Postby nageswaragunupudi » Fri Mar 26, 2010 2: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: Select all  Expand view  RUN
#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
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Error With 10.2

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

Re: xBrowse Error With 10.2

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 50 guests