lib/template.js
function assignOneDual(bConns, item) {
    var fn = exprDict[item];
    if (!fn) return;
    try {
      var bConn = gui.connectTo[item];
      if (bConn) {
        // this action is listened
        var oldValue = comp.state[item];
        fn(comp); // try update with expression
        var newValue = comp.state[item];
        if (newValue !== oldValue) // succ update expression and get a new value
          bConns.push([bConn, newValue, oldValue, item]); // wait to fire listen-function
      } else fn(comp);
    } catch (e) {
      console.log(e);
    }
  }
function assignOneDual(bConns, item) {
    var fn = exprDict[item];
    if (!fn) return;
    try {
      var bConn = gui.connectTo[item];
      if (bConn) {
        // this action is listened
        var oldValue = comp.state[item];
        fn(comp); // try update with expression
        var newValue = comp.state[item];
        if (newValue !== oldValue) // succ update expression and get a new value
          bConns.push([bConn, newValue, oldValue, item]); // wait to fire listen-function
      } else fn(comp);
    } catch (e) {
      console.log(e);
    }
  }
function assignOneDual ( bConns , item ) { var fn = exprDict [ item ] ; if ( ! fn ) return ; try { var bConn = gui . connectTo [ item ] ; if ( bConn ) { // this action is listened var oldValue = comp . state [ item ] ; fn ( comp ) ; // try update with expression var newValue = comp . state [ item ] ; if ( newValue !== oldValue ) // succ update expression and get a new value bConns . push ( [ bConn , newValue , oldValue , item ] ) ; // wait to fire listen-function } else fn ( comp ) ; } catch ( e ) { console . log ( e ) ; } }
if return true means comp.state.xxx is changed
if return true means comp . state . xxx is changed