Johan,
I think things have become better since I changed something major. I need to explain a little better what we did:
Our users see only one form, basically. All other forms are loaded in a tab panel on that form (tabs are hidden, a navigation logic jumps to the right tab). Some of the forms that are shown have tab panels themselves, it can be nested up to five levels deep, maybe.
On most forms we apply “global logic”, for example the highlighting of required fields etc. We try to approach these issues “globally”, so we don’t have to change this on 55 forms. In the beginning we thought that the easiest way was to have for example a method _formOnShow in every form, that is fired onShow and that calls a global onShow method. The same for onHide, onRecordSelection, onLoad and so forth.
For us it seemed very easy then to do something “globally”. If, for example, somebody wants all integer fields with a green background (to make a stupid example), we could have easily created a global method that walks through the elements of form… and attach that to our global onShow method.
Since our solution has grown more complex, this technique is the source of lots of trouble, it seems. If we show one form with several tabs, tons of onShow, onLoad and onRecordSelection methods are called, all of these calling global methods and so forth. Yesterday I started to take out many of those that are not necessary (those, that could have been necessary one day…) and a few problems disappeared.
The things that do look better and that I have reported are the value list problem we discussed here (is gone now) and the strange changing to design mode if showing a dialog (strange error when showing a dialog - Classic Servoy - Servoy Community). In the latter case I noticed in the debugger, that when the dialog is shown all kinds of onLoad methods were executed, even though no new form was shown. The dialog was called in one form, just showing its message. It can’t see why this leads to the calling of several onLoads, but it did.
Maybe you can tell is if we were madmen to do what we did or if this kind of setup should actually work ok.
Thanks
Patrick