A couple of weeks ago, I posted about strange problems I was having in preOpenCard. I thought I had got rid of them by moving some code into a separate handler and using "send in zero" to execute it.
However, the problems are back, different ones this time. I can tell from various variables and files that a good portion of my preOpenCard code is not being executed. However, as on the last occasion, as soon as I go into debug mode to track down what is going wrong (almost always need a breakpoint command rather than a red dot), everything works. I also notice that things work differently, but still incorrectly, when the stack is run as a plugin than when it is run toplevel. I've tried the obvious debug methods of inserting either "answer" or "put" to the message box commands, but they also make things work correctly - I guess they delay processing long enough for whatever the problem is to go away. It doesn't feel like I'm doing anything unreasonable in the code: - Set some variables - Enable/Disable come controls - Open a prefs file and read its contents (create it and its enclosing folders if not present) - Check either demo expiration or valid license code - Put data into one of the fields - set the rectangle of the stack - Insert a front script - that's the very last thing I do before exiting preOpenCard I'm hoping for some suggestions as to how on earth to debug this. I'm using 5.5.0 on OSX 10.7.4 and I've also tried 5.5.1 with the same problem. Or maybe I should just move all the code to openCard and see if it works there since there's very little screen manipulation going on. preOpenCard just seems to be very flakey these days! Pete lcSQL Software <http://www.lcsql.com> _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode