well, that turned out to be a much deeper rabbit hole than I expected...
I made each component a "Node" (renamed Family1 to NodeFamily), and after looking at the Circuit project at the top of the thread decided we needed to add an Connector object as well, because you can drag Nodes or you can drag the connection point.
so, after a lot of debugging, infinite recursive loops, and strange side-effects, I think I have the connecting of Nodes working pretty well. Right now the Connector objects know how things are joined together, but the Nodes themselves don't build a proper linked list that would be required to test the logic of the circuit...
drag Nodes or connectors until they overlap (the connectors will turn blue), when you drop the object the connection is made. Right now there is no way to break a connection. And each connector can only make one connection (unlike the example Circuit project linked at the top). My code needs a lot more comments to be readable! and it probably could be cleaned up now that it is mostly working.
Awesome!!! Very nice example!
As I understand it, it is still not possible to check if the circuit was assembled correctly (following the same order of the diagram), right?
Components could not be connected to components directly. How could I do to add this rule?
And with regard to breaking the connection, I thought about erasing (destroying) a wire to be able to release the stuck component. Would that be a good idea?
I found a small problem: if I bring the cable close to the battery, perpendicularly, the wire connects to the two nodes of the battery, automatically