First I wanted to mention like the thread a couple of months ago that I also find this forum to be very helpful and lots of people willing to help the XOJO users community, indeed very refreshing. I haven’t been on here a lot but do find lots of informative (albeit sometimes opinionated ) topics and I usually post something when I’m stuck. When I get a little more experience with using the XOJO IDE then I hope to become more of a contributor.
I have been working away on my game and am getting a Stack OverFlow Exception when I try to run in a Quick Play Mode. There are no methods calling themselves and there are no DoEvents in the program flow. However, I suppose it could be considered recursive in that it is repeatedly calling some of the same methods numerous times, triggered by a method called both from the Quick Play mode and also when a push button is clicked. Both the push button and this Quick Play mode are calling the same method and theoretically executing the same code, the only difference is that Quick Play mode is repeating the same program flow (a series of methods) until a certain condition is met, and if it isn’t in Quick Play mode the same program flow is only executed once from the Action event of the button. I don’t have any issues when the flow runs only once from the push button event.
I could post some of the code here but it is several methods and would be fairly lengthy. I am hoping this makes sense and someone may have a suggestion as to what could be doing this. This program was running on VB6 and I am using a similar concept with XOJO, actually porting a good chunk of the code. All of my methods have either an Exit or a Return depending on what they do, and as I mentioned there are no DoEvents in this flow. It fails on both Windows and the Mac but seems to fail sooner on the Mac, perhaps because it uses a smaller stack. Since it isn’t an issue from the push button event seems to suggest that the stack is starting anew from the event, but just keeps growing when doing the Quick Play mode. It would be fine if it could do the same thing with Quick Play Mode once it starts a new iteration of the program flow, as I don’t care about what happened from the previous iteration of the flow.
I hope this makes sense … thanks…
Richard