How to use other node instances / objects across nodes

Adding wires autonomously, checking for input/outputs sounds complicated (and messy IMO).

I still suggest using RED.events or my call back suggestion above etc etc.
its pretty trivial for RED.events

RED.events.emit('<UNIQUE-TO-YOUR-CONTRIB>:SOME-EVENT',{"Hello":"World"})
RED.events.on('<UNIQUE-TO-YOUR-CONTRIB>:SOME-EVENT',(Data) =>{
 Data.Hello // World
})

All your nodes can then use this domain <UNIQUE-TO-YOUR-CONTRIB>:xxxxx

Just tailor your needs around the RED.events API.
Flow wiring, should be kept for userland, and shouldn't be relied upon for your internal logic to function (IMO)

RED.events is not documented as being for general use however :sweat_smile: hence my suggestion or @TotallyInformation to use your own instance of the emitter

1 Like