Dear,
I'm creating some custom configuration nodes and have a problem where I need to access config data of a node which is not instantiated yet.
The idea is the following:
- I have a "Structure" configuration node where the user can create multiple structures. Every structure is basically some collection of (nested) properties that define how some json data will look like. A property can also be another Structure (I'll add logic to avoid cyclic dependencies)/
- I have an "Instance" configuration node where the user can create an instance of a defined structure. At runtime this node will create a json obj according to the linked structure
Now the problem is the following:
- I create one Structure "Main" and 2 Structures "Sub1" and "Sub2". Sub1 and Sub2 are properties of the "Main" structure config object (Sub1 and Sub2 don't exist as single properties in "defaults", I just have a "attributes" property where I dynamically store my data. When a property is of Structures type I just store the node id in there, which might be part of the problem I think)
- I create one Instance "MainX" which at instantiation, should execute functions defined in Main, Sub1, Sub2.
The problem is that first "Main" is created, and then "MainX" before "Sub1" and "Sub2".
Is there anyway I can control the order of creation of configuration nodes at startup? I want node-red to first create my Structure config nodes before it creates my Instance config nodes.
Kr
Sven