Order of initialisation for Lua code blocks

Oh that’s true. Sorry about that.

I found the culprit though. Here’s the quick solution: put the following piece of code under System Setup:

for i = 0, #element - 1 do
    element[i]:ini()
end

The long answer is that you were right. The initialization order has been changed, and I didn’t realize how much this will influence.
Since the latest release FW the order changed to the following:

  1. System Setup
  2. System other Events
  3. Element 0 Setup
  4. Element 0 other Events
  5. Element 1 Setup
  6. Element 1 other Events

and so on…

The problem with the above is that you (and most everyone that makes configs for Grid) distributes their function initializations all over the Setup Events of the module. But if you also call the incomplete function on the first element, the whole initialization process breaks.

So for now the solution is to pre-trigger all Setup events after System Setup runs. It’s ugly but it works.