Hi,
Nice. But seeing as you asked for comments :-)
Generally we like to try and preserve as much of the msg passing through as possible.. ie all the other properties. You generate a new msg in each node.
Ideally the red status should be the ring shape so people who are red/green colour blind can spot the difference more easily.
Not sure the debug node is needed when they all show their output status anyway.
Could the invert not just need another option within the main node ?
> Yeah, I thought about that but decided to go for this solution as it didn't make sense to modify the payload while keeping the other parts; they'll be out of context when the payload changes.
But that means it is impossible to use these nodes with, for example, the HTTP In/Response nodes. You don't know what other properties the user has added. By dropping them you are limiting how useful these nodes are.
Nick
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.
Though - if the node is waiting for (say) 3 incoming topics from different places which of those input msgs should supply the extra properties ? Especially if the arrival order is not consistent.
Re debug
Or indeed we already have parsers that do string to Json and such like... So it could be an "anything" to Boolean node (ie have an output) ... Or is that just a case of a one input or gate ;-)
But with no preserved message properties you make it impossible to do any future merge reliably.... you cannot correlate the messages coming out of your node with what was put in. That's fine if your flows are entirely synchronous, but as soon as you have an async element it is entirely possible for messages to over take one another, so you cannot rely on order.
Nick
Yes, also a reason why I chose the current solution.Nick's use case mixes boolean logic with data-flow. I think it is better to split the flows in two, then merge it all at the end.
--
Well they could default to 2 inputs but allow the user to set it to 1 if you wanted...
Or hide the numbers input option when invert mode was selected, etc.
Also slightly confusing that 2 is true and "2" is false, but at least it is documented. Guess that's why you need the debug !
But at the end of the day they are your nodes :)