Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding ASTACKINFO
Message
 
 
To
24/04/2022 11:57:55
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01684243
Message ID:
01684247
Views:
27
>>>>Hi,
>>>>
>>>>Please explain to me what I don't understand. A form is being open. The INIT should fire first. Then user clicks on a button cmd.Go_Next and the code in method thisform.go_next is executed. This code comes across an error.
>>>>I analyze the stack. But the method INIT is not in the aProgStack. This is the sample code how I scan through the stack:
>>>>
>>>>ASTACKINFO(aProgStack)
>>>>FOR iEle = 1 TO ALEN( aProgStack, 1 )
>>>>      
>>>>NEXT
>>>>
>>>
>>>Nothing missing. The form.load, each control's .init() was done, form.init()... it has all done up to form.show(), after which the execution returns to the Read Events statement.
>>>Then the click can happen.
>>
>>First, thank you for your prompt reply. Ok, I understand what you are saying.
>>How come the aProgStack has a call to my APPLICATION_SETUP.START method? Is it because this method has the READ EVENTS that it is not cleared from the stack?
>
>That's where all code returns whenever it finishes processing user input, that's where the event loop starts.
>
>>Would your explanation tells me that since the GO_NEXT code comes across an error, there was no error in LOAD and INIT methods?
>
>Well... no errors that would stop execution, or else your form wouldn't show up, right? It depends on what you consider an error...
>
>>UPDATE. Here is what I am trying to find. When a user clicks on the GO_NEXT button, the code comes across a problem where the main cursor of the form is lost. That is, the SELECT("Main_Cursor") is 0. And I am trying to find where in this form (which is quite complicated) the cursor is being closed.
>
>...because, obviously, if closing the cursor is not an error then it's the cause of it further down the road.
>
>If you can use a debugger, set a watch expression on SELECT("Main_Cursor") and put a Set Step On in form's .load(), then it should stop twice: once the cursor is created (it would show a non-zero value) and next when it's closed (becomes zero).

Unfortunately, I tried this approach. And I never get the cursor closed on my system, during testing.
This happens to some customers. And mostly in a couple of methods where the code "determines" that the cursor is closed. So the cursor gets closed in a method before the one where the error occurs.
I will have to place many test codes - checking if the cursor is closed - at design time. And maybe this will catch the problem. I suspect, but I can't prove, that the cursor is closed because something happens to the desktop.
Although I don't know for sure.
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