Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding ASTACKINFO
Message
From
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:
01684246
Views:
26
>>>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).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform