Hi Dan.
We are trying to update our version of ZIM, and I ran into the following problem. In ZIM016, in order to add a wire between two non-ZIM objects, ZIM offers the addWires() method. However, it does not seem to be working for me. This is my code:
const person = {age: 30, name: "John Smith"};
const displayObjParams = {
label1:{
color: red,
text: "-- before wire has effect --",
size: 25
},
label2:{
color: blue,
text: "--before wire has effect--",
size: 30
}
}
addWires(person).wire({
input: "age",
target: displayObjParams.label1,
prop: "text"
}).wire({
input: "name",
target: displayObjParams.label2,
prop: "text"
});
new Label(displayObjParams.label1)
.centerReg()
.pos({horizontal:CENTER, x:-150});
new Label(displayObjParams.label2)
.centerReg()
.pos({horizontal:CENTER, x:150});
The resulting labels show that the "text" properties of the displayObjParams objects have not been changed, even though "wire" has been called to change them. Am I doing something wrong?
Thanks!