Error in DCBrowse (solved)

This forum is for eXpress++ general support.
Message
Author
User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Error in DCBrowse

#21 Post by Tom »

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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error in DCBrowse

#22 Post by rdonnay »

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
The workaround could be put into a custom handler, but I don't like that as a solution.

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.

Wolfgang Ciriack
Posts: 478
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Error in DCBrowse

#23 Post by Wolfgang Ciriack »

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:

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)
So what i have to add here to see, if this can avoid this error ?
_______________________
Best Regards
Wolfgang

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error in DCBrowse

#24 Post by rdonnay »

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.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Error in DCBrowse

#25 Post by skiman »

Hi,

Code: Select all

 (::NavigationMode == XBPBRW_NAVIGATION_1XCOMPATIBLE .OR.;
  AScan(::aRecNo, ::RowPhyPos) == nRow)    <-------------row 2411
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.
Best regards,

Chris.
www.aboservice.be

Wolfgang Ciriack
Posts: 478
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Error in DCBrowse

#26 Post by Wolfgang Ciriack »

Hello Chris,
Since ascan always returns a numeric, it must be ::NavigationMode that is sometimes an array.
I think, here you are wrong. I think it is the comparison of

Code: Select all

lIsMarked := (nRow == ::nRowPos) .and. ..... 
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.

Code: Select all

xbeBRW_ItemMarked    mp1:3               mp2:1
xbeBRW_ItemMarked    mp1:{1, 1}          mp2:NIL
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 ?
_______________________
Best Regards
Wolfgang

Wolfgang Ciriack
Posts: 478
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Error in DCBrowse

#27 Post by Wolfgang Ciriack »

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.
_______________________
Best Regards
Wolfgang

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Error in DCBrowse

#28 Post by Tom »

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."

Wolfgang Ciriack
Posts: 478
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Error in DCBrowse

#29 Post by Wolfgang Ciriack »

Hello Roger,
can you please take a look at this topic ?
_______________________
Best Regards
Wolfgang

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error in DCBrowse

#30 Post by rdonnay »

Hello Roger,
can you please take a look at this topic ?
Ok, I'll get on it today.
The eXpress train is coming - and it has more cars.

Post Reply