>>>>Hi,
>>>>
>>>>My app keeps log of all errors that a user would come across. I periodically checks this error log in order to "clean" up issues that users never report. Often times it is hard to figure what actually caused the error.
>>>>
>>>>Therefore, I decided to add 2 more pieces of information to the error log:
>>>>1. Last key user pressed (lastkey())
>>>>2. Where did he/she clicked with the mouse. And this one I don't know how to do. How can I "catch" (and would this really be helpful) where the user clicked right before the error occurred?
>>>>
>>>>TIA.
>>>Dmitry,
>>>
>>>I fully agree with Cetin, f.y.i. I have in my Error.log
>>>
>>>
>>>ASTK Local A errorlogging
>>> ( 1, 1) N 1 ( 1,00000000)
>>> ( 1, 2) C "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
>>> ( 1, 3) C "frmgooglemail1.gglmailbox1.gglgrid1.column1.gglcntgrid1.lblname.click"
>>> ( 1, 4) C "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
>>> ( 1, 5) N 1 ( 1,00000000)
>>> ( 1, 6) C "this.Parent.doit()"
>>> ( 2, 1) N 2 ( 2,00000000)
>>> ( 2, 2) C "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
>>> ( 2, 3) C "frmgooglemail1.gglmailbox1.gglgrid1.column1.gglcntgrid1.doit"
>>> ( 2, 4) C "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
>>> ( 2, 5) N 77 ( 77,00000000)
>>> ( 2, 6) C " .Left = m.lnLeft"
>>> ( 3, 1) N 3 ( 3,00000000)
>>> ( 3, 2) C "d:\foxproprojects\zorgenzekerheid\progs\errorlogging.fxp"
>>> ( 3, 3) C "ON... "
>>> ( 3, 4) C "d:\foxproprojects\zorgenzekerheid\progs\errorlogging.prg"
>>> ( 3, 5) N 91 ( 91,00000000)
>>> ( 3, 6) C "= Astackinfo(m.aStk)"
>>>
>>>
>>>
>>>which is produced by this code:
>>>
>>>
>>>For i = Alen(m.aStk, 1) - 1 To 1 Step - 1
>>>* I named each element to make it easier to understand (jjh)
>>> lcCurPrg = m.aStk(m.i, 2)
>>> lcModule = m.aStk(m.i, 3)
>>> lcSource = m.aStk(m.i, 4)
>>> lcModLine = Transform(m.aStk(m.i, 5))
>>> lcSrcCode = m.aStk(m.i, 6)
>>>
>>>
>>>Regards,
>>>
>>>Koen
>>
>>Maybe I missing something. But I don't see in your code above showing the Lastkey() or what user pressed that "caused" the error. Is it there but I don't see it?
>Isnt Astck(1,2) giving the answer?
>Regards,
>Koen
Not really. But it was easy enough for me to add the value of the Lastkey() to the error log.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham