Hi Dan!
This is a continuation of a previous post regarding the addWires method.
I use wires in my code to connect two non-ZIM objects, using the addWires method to do so. I am not using DUO for the parameters being sent to the "wire()" method, because I understood it was not supported for non-ZIM objects.
Having upgraded to ZIM 018, the code goes into an infinite recursion.
This seems to be due to an addition made to the addWires() code to enable DUO.
Here is some example code that can be run in the ZIM Editor:
// Given F, S, W, H or frame, stage, stageW, stageH
const source = {
a: 45,
b: 70,
c: 100,
d: 125
};
const target = {
one: null,
two: ""
};
addWires(source).wire(//wire target.one to source.a
target,
"one",// prop
null,
null,
null,
null,
"a"// input
);
new Label(target.one).centerReg();
You can see that addWires calls itself in an infinite recursion.
Thank you for your attention 
Moshe
Thanks @Moshe_Maltz should be able to fix that up tomorrow - will let you know. Cheers.
2 Likes
Ah... yes. I see the problem. Just going into a meeting. Will have a look afterwards.
Still trying to figure out what is going on. Can't even get addWires() working with yours or the Docs example once we remove the added DUO code and even with older versions. So... need to dig into it more - but have to go now. Will let you know... maybe tonight, maybe tomorrow. Sorry for the delay. Is it working in ZIM 016 for what you are wanting to do?
Okay - tricky one. I think we got it and have patched ZIM 018 - do a hard refresh.
We had added ZIM DUO to the addWires() when we really wanted to add the ZIM DUO to each of the wire(), noWire(), wired(), noWired() set by the addWires(). I guess we must have not properly tested in ZIM 017.
Please let us know how it works for you. We got our Docs example working.
Your example is working too:
const source = {
a: 45,
b: 70,
c: 100,
d: 125
};
const target = {
one: null,
two: ""
};
addWires(source).wire(//wire target.one to source.a
target,
"one",// prop
null,
null,
null,
null,
"a"// input
);
const label = new Label({text:"", align:CENTER}).centerReg()
interval(.2, ()=>{
source.a = rand(100);
label.text = target.one;
S.update()
})
Great! Ill try it out soon. Thank you 
1 Like