Error in DCBrowse (solved)
Re: Error in DCBrowse
Hi, Wolfgang.
I'm trying to find it. If LbClick was created very fast and repeatly, a parameter in HandleEvent was missing its second part. We just placed a simple IF there, as I remember, but I'm not sure.
I'm trying to find it. If LbClick was created very fast and repeatly, a parameter in HandleEvent was missing its second part. We just placed a simple IF there, as I remember, but I'm not sure.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Error in DCBrowse
The workaround could be put into a custom handler, but I don't like that as a solution.If LbClick was created very fast and repeatly, a parameter in HandleEvent was missing its second part. We just placed a simple IF there, as I remember, but I'm not sure
Alternatively, the error could be trapped in the eXpress++ main handler: DC_GETLIST:EVENTLOOP(4784)
A third option would be to make the change to xbp-browse.prg (Alaska's source) and add that file to the DCLIPX_20.XPJ project file.
Let's talk about this before we move forward.
The eXpress train is coming - and it has more cars.
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Error in DCBrowse
Hello Roger,
because i only get this error in one of many used DCBROWSEs in my app, i would first like to put this workaround in a custom handler.
The one i use for this DCBROWSE looks so:
So what i have to add here to see, if this can avoid this error ?
because i only get this error in one of many used DCBROWSEs in my app, i would first like to put this workaround in a custom handler.
The one i use for this DCBROWSE looks so:
Code: Select all
Static Function My_BrwHandler(nEvent, mp1, mp2, oXbp, GetList, oDialog, aRef)
LOCAL oMBrw := aRef[1], oS := aRef[2]
Unused(GetList) ; Unused(oDialog), Unused(oXbp)
if nEvent == xbeP_Keyboard
if SetAppFocus() == oMBrw
if mp1 >= 32 .and. mp1 < 165
SetAppFocus(oS)
PostAppEvent(xbeP_Keyboard, mp1, mp2, oS)
endif
endif
endif
return (DCGUI_NONE)
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Error in DCBrowse
The error shows that :gotoItem is comparing an array to a numeric, therefore the error.
It is still not clear to me that this is a secondary error, caused by a failure of lbClick.
I want to hear from Tom first about what he finds in his code.
It is still not clear to me that this is a secondary error, caused by a failure of lbClick.
I want to hear from Tom first about what he finds in his code.
The eXpress train is coming - and it has more cars.
Re: Error in DCBrowse
Hi,
Since ascan always returns a numeric, it must be ::NavigationMode that is sometimes an array. The errorlog points to line 2411, but this is because 2410 and 2411 are one line of code.
Code: Select all
(::NavigationMode == XBPBRW_NAVIGATION_1XCOMPATIBLE .OR.;
AScan(::aRecNo, ::RowPhyPos) == nRow) <-------------row 2411
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Error in DCBrowse
Hello Chris,
I have analysed the events which are generated of the DCBrowse.
Why i do get xbeBRW_ItemMarked events with different parameters ??
There are some with f.e.
For me it is not clear, which events i have to check in my handler for right parameters.
xbeM_LbDown, xbeM_LbClick or xbeBRW_ItemMarked ?
I think, here you are wrong. I think it is the comparison ofSince ascan always returns a numeric, it must be ::NavigationMode that is sometimes an array.
Code: Select all
lIsMarked := (nRow == ::nRowPos) .and. .....
Why i do get xbeBRW_ItemMarked events with different parameters ??
There are some with f.e.
Code: Select all
xbeBRW_ItemMarked mp1:3 mp2:1
xbeBRW_ItemMarked mp1:{1, 1} mp2:NIL
xbeM_LbDown, xbeM_LbClick or xbeBRW_ItemMarked ?
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Error in DCBrowse
Hello Roger,
Tom do not find his "workaround", but see in his error logs, that he get these errors, too.
So can you please have a look at my previous post ?
Thank you.
Tom do not find his "workaround", but see in his error logs, that he get these errors, too.
So can you please have a look at my previous post ?
Thank you.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Error in DCBrowse
As Wolfgang mentioned - I can't find it. The problem is caused by several LbClick/LbDblClick/LbDown on a browse created fast after another. Sometimes, the HandleEvent() calling XbpBrowse:GotoItem misses its second parameter. This happens if the method called after GotoItem takes some time, i.e. something is done on the cell contens. If the users click fast while this happens, the second parameter sometimes get lost.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Error in DCBrowse
Hello Roger,
can you please take a look at this topic ?
can you please take a look at this topic ?
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
Re: Error in DCBrowse
Ok, I'll get on it today.Hello Roger,
can you please take a look at this topic ?
The eXpress train is coming - and it has more cars.