FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xbrowse: too many recoursive handler calls error
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
xbrowse: too many recoursive handler calls error
Posted: Tue Jul 29, 2008 06:20 PM

Can you please let us know the FWH version? The line number in the error log does not correspond to any executable code either in 8.06 or 8.07.

In any case, since the error is in oBrw:aRow method, it appears that ::nArrayAt is 0 (Zero) at the time of the call. A relook into the code is needed.

Regards



G. N. Rao.

Hyderabad, India
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
xbrowse: too many recoursive handler calls error
Posted: Tue Jul 29, 2008 07:04 PM

Hi,
I'm using FWH May 2008.

The problem appairs in the row
METHOD aRow INLINE ( ::aArrayData[ ::nArrayAt ] )

The strange is that I didn't make any changes on the nArrayAt value,
the error start from a simply sysrefresh().

In order to increase the selection speed I made in my function a routine that execute my code only when a key is released for more than 0.25 seconds. Could be this a problem ? See my code as follows.

Function Main()

.. && I create xbrowse as Objects[6]
..
..
aObjects[6]:bChange:={|| SelectFunc_Cons()} && action to do when any selection is made

return

Function SelectFunc_Cons()
local nSeconds

aObjects[6]:bChange:={|| nil}

nSeconds:=seconds()
do while .t.
sysrefresh() && xbrowse is refreshed and the error appairs
if seconds()-nSeconds>.25
exit
endif
enddo
..
..
.. my code
..

aObjects[6]:bChange:={|| SelectFunc_Cons()}

return

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xbrowse: too many recoursive handler calls error
Posted: Tue Jul 29, 2008 10:07 PM

Frank,

> what is your opinion on this matter ?

Windows has its own rules to generate and manage events. If Windows allows to click several times and keep generating an event, then we have to adapt our code to Windows.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
xbrowse: too many recoursive handler calls error
Posted: Tue Jul 29, 2008 10:13 PM

Marco,

This could be a possible temporary workaround:

METHOD aRow INLINE ( ::aArrayData[ Max( ::nArrayAt, 1 ) ] )

or

METHOD aRow INLINE If( Len( ::aArrayData ) > 0, ::aArrayData[ Max( ::nArrayAt, 1 ) ], "" ) // maybe nil instead of ""

Please try it and lets see what further info we get

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
xbrowse: too many recoursive handler calls error
Posted: Wed Jul 30, 2008 05:40 PM

I just sent to my customer an update with the turn-around.
I will know you if the problem still appairs.

Thanks for the support.

Best Regards,



Marco Turco

SOFTWARE XP LLP

Continue the discussion