Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching error Record is out of Range
Message
 
 
To
29/04/2022 06:06:40
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01684146
Message ID:
01684308
Views:
39
>>>>Hi,
>>>>
>>>>I read (again and again) all the messages regarding this problem (in threads I posted before). I also viewed the screen images (my error handler saves the screen image at the time of the error) at the time of the errors. And the images show one of the form (very complicated form) with the PageFrame.Page container showing the page with a Grid.
>>>>Note that the error message of this error is caught by the Start() method (the method which calls READ EVENTS and then closes the application.
>>>>So, I am convinced that the error is caused by some Thisform.referesh() or another call in this form, when something "odd" happens in the grid.
>>>>My question. What type of code do you suggest I add to this form and where to, hopefully, catch this error?
>>>>
>>>
>>>I'm also chasing a bug involving "Record is out of range" and a grid right now. In my case, most columns of the grid contain a textbox with a When method that returns .F. Only one or two columns allow the user to do anything.
>>>
>>>The problem occurs when the user clicks into one of the columns that doesn't accept focus. The error shows as on the READ EVENTS. I haven't yet figured out why this happens, but thought my situation might shed light on yours.
>>>
>>>Tamar
>>
>>I am having exactly the same problem. I am glad that I am in the same boat with the exert like you.
>>Thank you.
>
>Dmitry--I wanted to let you know that I think I've solved my problem. In my case, the textbox in every column in the grid that isn't supposed to accept focus has RETURN .F. in its When method. When I turned on the Event Tracker, I found that ultimately the Valid of the textbox in the column that accepts focus was running and it apparently was calling some code that messed with the cursor under the grid. I wrapped that Valid method so that it wouldn't run in View mode (this app requires users to explicitly put forms into Edit mode), and that appears to have solved this one. Haven't turned it over to the client yet for them to pound on it, but so far, so good.
>
>Tamar

Tamar,
First, thank you so much for sharing your solution.
The key is that I need to learn how to use the Event Tracker (just been busy putting out other fires)
My form grid is different (the image is attached).
The grid Readonly is set to .T. All text boxes of the grid are VFP 9 base classes and they do not use When method.
All editing is done in the text boxes below the grid.
I am sure, however, that there is something that goes on in the grid that causes the error. Because you had a grid and the same error would show.
I need to spend more time on it.
"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
Reply
Map
View

Click here to load this message in the networking platform