Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching error information
Message
 
 
To
26/06/2018 19:00:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01660874
Message ID:
01660902
Views:
40
>>>>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.
>>>
>>>MROW()
>>>MCOL()
>>>
>>>Then translate foxels to pixels - (google knows, I have forgotten that 5 times now, or was that 4 times?)
>>
>>Thank you. But now I am wondering if, when I will be looking at the error log much later after the error occurred, if these values will make sense to me. Ideally it would be nice to know which button or grid or object where the user clicked last (that fired something that caused the error). But I don't know how to get it.
>
>Either write a hook pattern into the uppermost base class of your clickable controls or employ bindevent() to selectively hook some controls.
>Text logs easy and probably not huge (one line per click) but needing to be cleaned on each program start. If you employ a sngle error log, your hook code could also fill a small stack of "latest clicked controls" with timestamp which could be serialized into your errorlog to give "current" latest clicks.

Writing a hook pattern or employ bindevent() is over my head. It will most likely break something. And I do maintain a pretty complete text log of errors. But sometimes the description does not give me enough information to duplicate it (on my PC). This is why I will be adding some more info to the text log (e.g. lastkey()).
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform