jcompagner wrote:no that can lead to the same problem because if somehow the second variable is initialized before the first then the first will not be there.
and you have here a sample that already shows that this is very hard to catch (and make an error in the developer)
In that case the only safe option for now is to not allow any references to functions or other variables in the initialization of Servoy form/global variables. It should be possible to create a warning for that.
As a side note, I would like to stress the fact that this different solution behavior between the Servoy Developer and Servoy App Server is very bad. Developers write code which does not have any warnings, works as expected in Servoy Developer, all unit tests pass and yet when the code is deployed things break. It would be extremely valuable if developers can run from within the Servoy Developer the code exactly as it would run on a live server (even without debugging support).