Page 4 of 4

Re: Error in DCBrowse

Posted: Fri Sep 24, 2021 8:54 am
by rdonnay
Why i do get xbeBRW_ItemMarked events with different parameters ??
This is because both the XbpBrowse and XbpCellGroup objects generate an xbeBRW_ItemMarked event.

When the event is generated by XbpBrowse, mp1 and mp2 are both numeric.
When the event is generated by XbpCellGroup, mp1 is a 2-element array and mp2 is a NIL.

I am working this, but I think that the error trap needs to be a a lower level, where the error actually occurs.

Re: Error in DCBrowse

Posted: Fri Sep 24, 2021 9:24 am
by rdonnay
Try this as a fix:

In _DCXBROW.PRG, add the following method at Line 3051:

Code: Select all

* ------------

METHOD DC_XbpBrowse:gotoItem( nRow, nCol, lDehilite )

DEFAULT nRow := 1, ;
        nCol := 1

RETURN ::xbpBrowse:gotoItem( nRow, nCol, lDelhilite )
This will make sure that both the nRow and nCol parameters are numeric.
This should prevent the error.

You will also need to add the following at Line 161:

Code: Select all

  METHOD gotoItem

Re: Error in DCBrowse

Posted: Fri Sep 24, 2021 9:36 am
by Wolfgang Ciriack
Thank you Roger,
i will change this and give that to my customers next week. I think, in a few days i will see the result and report it here.

Re: Error in DCBrowse

Posted: Fri Sep 24, 2021 10:19 am
by Wolfgang Ciriack
Hello Roger,

i am still using version 266, the lines are others, but this is no problem.
But i get an error... unknown.. lDehilite.
What is the default value for lDehilte ? Can i change it to

Code: Select all

DEFAULT nRow := 1, ;
        nCol := 1, ;
        lDehilite := .F. 
I have changed the method to:

Code: Select all

METHOD DC_XbpBrowse:gotoItem( nRow, nCol )

DEFAULT nRow := 1, ;
        nCol := 1

RETURN ::xbpBrowse:gotoItem( nRow, nCol, .F. )
Is this ok ?

Re: Error in DCBrowse

Posted: Fri Sep 24, 2021 10:58 am
by rdonnay
That was a typo:

Change lDelhilite to lDeHilite

Re: Error in DCBrowse

Posted: Fri Sep 24, 2021 10:06 pm
by Wolfgang Ciriack
Thanks. I did not see this :oops:

Re: Error in DCBrowse

Posted: Sun Oct 10, 2021 10:57 pm
by Wolfgang Ciriack
Hello Roger,
thanks for this solution. Since i have changed this, i do not get related errors to "gotoitem" anymore.

Re: Error in DCBrowse (solved)

Posted: Mon Oct 11, 2021 5:12 am
by rdonnay
thanks for this solution. Since i have changed this, i do not get related errors to "gotoitem" anymore.
That is good news. This fix will be in next eXpress++ release.