I am having a lot of trouble building an app, and I'm frustrated because I don't have any information to work with on what is going wrong. I am a very experienced developer, though new to BrightScript. I have had some early success in getting my app working, but after "refactoring" into multiple .brs files and Functions, nothing seems to work predictably.
Here's the situation. I want to have a series of "screens" that progress through the user experience, from a Welcome screen to a Registration screen to a Play Movie screen. Each of these screens has worked, but when I try to orchestrate them in sequence, things quit working. The Welcome screen works, but when I dismiss it, the Reg screen fails. If I comment out the call to the Welcome screen, then the Reg screen works correctly.
It seems like it must be related to screens, message ports, and events, but I've been trying for two days to narrow it down, unsuccessfully.
The symptoms right now are that a screen that "used to work" will fail silently, partway through, without throwing any exceptions or giving any errors. The app just terminates, there is nothing on the telnet debugger screen, and no indication of what's wrong.
I don't know how to be more specific in asking this, because I don't have any repeatable scenarios. Things work sometimes, then fail silently partway through. I have even run the app twice in a row, with no changes, and it fails the first time, then works the second time.
I can provide sample code or specifics as needed, but I'm wondering if this is a "common problem" for newbies who don't get something about the event model? I've tried lots of things, like not reusing ports or variable names, closing screens when I'm done with them and not closing them, etc, etc. I'm meticulous in my debugging, but I don't know how to debug this!
Thanks for any help.
Glenn Reid